identierForVendor should not change over the lifetime of the device
| Originator: | futuretap | ||
| Number: | rdar://14819075 | Date Originated: | 23-Aug-2013 05:13 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 6.0 |
| Classification: | Enhancement | Reproducible: | Not Applicable |
Summary: The fact that identierForVendor changes if all apps from the vendor are removed renders the API useless for purposes like trial periods for features. From -identierForVendor documentation: The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes. In our use case we want to ensure that each user (or device) can try a feature (that can later be purchased via IAP) for a certain amount of time. This demo period should not be circumvented by deleting and reinstalling the app. We used to use -uniqueIdentifier for that but -identifierForVendor does not look like a suitable replacement. And I don't see any other viable solution either.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Suggestion
You could create an UIID on the first time the app is run and save it on Keychain (which is persisted even if you app is uninstalled). Then, always query the value from the Keychain.