Q:

How to detect the very first run in an ios app? 

I've search a lot of that and as conclusion:

advertisement id
vendor id
keychain

But as far as I know, all these ids can be change by users, and keychain can be disabled in icloud setting.  Some says use NSUserDefault but this will be removed once remove the app. 
What I want to achieve is detect first run on a specific device even uninstall and reinstall. 
I am new to ios dev, can some one help?  thanks in advance. 

A:

Getting the Vendor-ID and storing it to Keychain is the best way you can achieve your requirement.