ioslaunching-application

How to check if app launched from TestFlight or App Store?


I want to check if my app was opened from the TestFlight app or the AppStore app.

I made a test and found this information in didFinishLaunchingWithOptions when launching it from TestFlight:

if launchOptions?[UIApplicationLaunchOptionsKey.sourceApplication] as? String == "com.apple.TestFlight" {
    // ...
}

But I don't know how to check if the app is opened from the AppStore. What's the identifier?

Thanks for your help.


Solution

  • The Bundle Identifier for the App Store iOS app is com.apple.AppStore