How can I detect where an iOS app was distributed from? I'd like to detect if it was through Apple's TestFlight, Apple's AppStore, or Beta by Crashlytics distribution platform.
Asked
Active
Viewed 77 times
2 Answers
3
You can examine the embedded.mobileprovision
file in your .app
package. It is an s/mime / CMS signed plist, whose contents can definitely tell you whether the app was in-house, ad hoc or appstore. I haven't actually seen the plist for a test-flight build, although if you retrieve one, I'd love to see it.
You can either scrounge the plist out of the binary goo in the .mobileprovision
file, or you can properly decode the file by implementing the equivalent of
openssl smime -inform der -verify -noverify -in embedded.mobileprovision
or
security cms -D -i embedded.mobileprovision
using the Security.framework
![](../../users/profiles/22147.webp)
Rhythmic Fistman
- 30,464
- 5
- 74
- 138
0
It's not possible to know this. As others have said, the only way to do it would be to make different builds for each source.
![](../../users/profiles/78496.webp)
chedabob
- 5,716
- 2
- 23
- 42