Hi,
Overview
- I have an app that is available on iOS, macOS, visionOS.
- I should be able to differentiate between device 1 and device 2
- I only care about my app
Purpose:
- For core data / swift data history tracking I would like which device wrote the data
Question
- How do I get a unique id that will differentiate my app running on device 1 vs device2?
- How do I do it for iOS / macOS and visionOS?
- Or is my approach wrong?
You might just create a random UUID on first launch and store it somewhere on the device, writing it alongside each record. Or you could use identifierForVendor which should be the same across multiple apps by you (subject to the limitations in the docs), if that is important for this purpose.