Skip to content

Commit

Permalink
Mention that getUniqueID() can be different in app extensions
Browse files Browse the repository at this point in the history
I stumbled over this when implementing a share extension, which has a different bundle identifier than my main app.
Since I used `getUniqueID()` to construct a User-Agent that needed to be stable for Authentication purposes, this broke auth for me.
  • Loading branch information
Skn0tt authored and mikehardy committed Aug 13, 2019
1 parent 2c2bc48 commit 60e75fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,8 @@ const uniqueId = DeviceInfo.getUniqueID();

**Notes**

> * iOS: This is [`IDFV`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) or a random string if IDFV is unavaliable. Once UID is generated it is stored in iOS Keychain and NSUserDefaults. So it would stay the same even if you delete the app or reset IDFV. You can *carefully* consider it a persistent, cross-install unique ID. It can be changed only in case someone manually override values in Keychain/NSUserDefaults or if Apple would change Keychain and NSUserDefaults implementations
> * iOS: This is [`IDFV`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) or a random string if IDFV is unavaliable. Once UID is generated it is stored in iOS Keychain and NSUserDefaults. So it would stay the same even if you delete the app or reset IDFV. You can *carefully* consider it a persistent, cross-install unique ID. It can be changed only in case someone manually override values in Keychain/NSUserDefaults or if Apple would change Keychain and NSUserDefaults implementations.
> Beware: The IDFV is calculated using your bundle identifier and thus will be different in app extensions.
> * android: Prior to Oreo, this id ([ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)) will always be the same once you set up your phone.
---
Expand Down

0 comments on commit 60e75fa

Please sign in to comment.