0

Is there a way to programmatically determine if the installed version of an iOS came from TestFlight (beta) or production (App Store)? To simplify testing of in-app purchases, I'd like to disable the entire store flow for beta testers.

Bonus points for providing the answer in both Objective-C and Swift.

brandonscript
  • 62,971
  • 29
  • 152
  • 211

1 Answers1

1

Try this code:

    if ([[NSBundle mainBundle] pathForResource:@"embedded"
                                        ofType:@"mobileprovision"]) {
      // not from app store, eg: testflight or others
    } else {
      // from app store

}

Refferece answer from here

Community
  • 1
  • 1
Rajesh Loganathan
  • 10,935
  • 4
  • 76
  • 89
  • Can you elaborate on why this would work? Where does the iTunesMetadata plist come from and why would it be there in one situation and not another? – brandonscript Dec 10 '14 at 06:25