Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to read the enterprise iOS download link plist from within the app?

I'd like to distribute an Enterprise iOS app such that by the time the user opens it, it is already displaying their name and other info, even though the .ipa is the same .ipa that every other user downloads. I figure that I could do this by giving the user an app download URL specific to them and generating the required Enterprise download plist to include some user data, but my question is:

Is it even possible to access/read the Plist from the download link from within the app? If so, how?

like image 259
Alexander Wallace Matchneer Avatar asked Jul 30 '15 21:07

Alexander Wallace Matchneer


3 Answers

There is a way to read the enterprise download link from within the App (but I'm sure you're not asking for the code to download and read a file), but there is no way to display something different in the App based on a parameter on the index page or manifest file, without changing the IPA itself.

Unfortunately, the installed App has no knowledge of the manifest file or index page that it was downloaded from.

EDIT with References / Sources

This link, under the section, titled "Exporting Your App for Testing Outside the App Store": Exporting Your App for Testing (iOS, watchOS), discusses manifest files, but makes no mention of any chain of data from web deployment to the app.

I also spoke to a senior Apple adviser, who confirmed that there is no mechanism that gives an App any knowledge of where the App was installed from.

like image 170
Sheamus Avatar answered Nov 13 '22 19:11

Sheamus


The only way I could think of doing this is sending all users the same link ( examplesite.com/ios/download) and also send them a unique user identifier "SG5JD5J". When the app is downloaded and opened for the first time, prompt the user to enter their unique user identification code. At which point your app can then update their plist and progress into the app.

Unfortunately the way you want to do it would require private API's or a jailbroken iOS device so that you can look at the web browsers history, find your URL (example site.com/ios/download) with a unique identifier at the end and update the plist as need be.

If you find a solution to this, please comment as I would be interested to see.

like image 20
Erion S Avatar answered Nov 13 '22 17:11

Erion S


I can think of two options:

  1. You could create "personalized" IPAs. In other words, when a user requests to download the IPA your server would generate a plist containing all of the user info, save the file inside the IPA, and run codesign. Then just serve the IPA to the user.
  2. Use MDM to inject the information directly into NSUserDefaults: https://developer.apple.com/library/ios/samplecode/sc2279/Introduction/Intro.html
like image 26
Jack Lawrence Avatar answered Nov 13 '22 18:11

Jack Lawrence