5

I want to identify if the current version of an app using my SDK was downloaded from the AppStore, till now I used this code:

[[NSFileManager defaultManager] fileExistsAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"iTunesMetadata.plist"]]

Since ios8 I get false even if the version is from the AppStore.

Do you know where did the file move to? Any other mechanism you propose?

ekeren
  • 3,408
  • 3
  • 35
  • 55

1 Answers1

1

Hope this helps you:

In iOS8, the application bundle has been moved. According to @silyevsk, the plist is now one level above [the new application main bundle path], at /private/var/mobile/Containers/Bundle/Application/4A74359F-E6CD-44C9-925D-AC82Eā€Œā€Œā€‹ā€‹B5EA837/iTunesMetadata.plist, and unfortunately, this can't be accessed from the app (permission denied)

Please refer here for more details: How can I detect if the currently running app was installed from the app store?

Community
  • 1
  • 1
soumya
  • 3,801
  • 9
  • 35
  • 69