Library to create/return unique device identifier
- Compile AggregateFramework target to create .xcframework
- Locate created xcframework in top level xcframework folder
- Drag the xcframework to your project /frameworks folder
- Don't forget to select Copy files if needed and check to add to your projects target
- See usage section
- Copy DeviceFingerPrintSDK folder to the top level of your project (same folder as your .xcodeproj)
- Drag and drop
DeviceFingerPrintSDK.xcodeProjfile to top level of your project in Xcode project navigator - In your project go to General -> Frameworks, Libraries and embed content
- Tap the + button to add new framework
- Locate
DeviceFingerPrintSDKand select it - See usage section
- Add
import DeviceFingerPrintSDKon top swift class wheredeviceIdwill be used - Call
Device.deviceId(forceReplace: false)to return existingdeviceIdor create a new one - Call
Device.deviceId(forceReplace: true)to force creation of a newdeviceId
- More convenient and future proof approach to import and distribute dependencies
- Supports simulator, devices with a single xcframework file
- Can be compiled starting Xcode 12
- No need for separate frameworks for simulator and device
- Supports arm64
- No need to strip architectures when submitting to app store
- All dependencies for xcframework must contain arm 64 slices.
- Easier drag and drop approach
- Xcode compiles framework for you when you compile main project
- Can include old objective - C dependencies only having 32 bit slices
- Can easily adjust/fix issues in source code
- Can see documentation in source code
- Will loose support from apple as xcframework will be preffered
- Exposes source code, must use lipo to distribute framework without source code
- DeviceId property is a UUID stored in devices keychain
- When user provisions a new device a new deviceId must generated via
Device.deviceId(forceReplace: true) - Device id can be used to uniquely identify a user session for his device
- Between app reinstalls
deviceIdpersists in keychain - Only when user logs in
deviceIdmust be changed - Device Id is not accessible by other apps, but it can be if we provide shared access group to its keychain item