Search code examples
iosswiftinstallationkeychain

Determine if your app was installed before in iOS


I need to check if my app was installed before on the device.

I had a method that stored some data on the keychain and then in the first launch, checked if the data exists and therefore determined if the app was installed before.

Unfortunately, like everyone I encountered the "Export Compliance Information" regarding the use of encryption in your app that Apple ask for when uploading the build. It's not clear if using the keychain is legaly included in the use of encryption that we are being asked for, it's just a huge headache and not something in the field of experties for a developer to determine..

Is there any other way to determine if an app was installed before ?


Solution

  • Storing info in the keychain is the only reliable way at the moment, until Apple finally decides to remove this (mis)feature.

    "Export Compliance Information" does not play a role here, this question is related to encryption like in https. Unless you implement custom encryption schemes, you can usually answer "No" to the question (or add ITSAppUsesNonExemptEncryption with your answer to your Info.plist).