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

会有一股神秘感。 提交于 2019-12-10 02:56:26

问题


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?


回答1:


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.




回答2:


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.




回答3:


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



回答4:


No this is not possible. Plist is for iOS to find information such as download path, version and app name so iOS would know what to prompt to the user.

Your code can execute only after app has been installed in the device and at that time it has no information about that plist anymore. And there's no way for an app to find its download path information.




回答5:


There is no way to read any file from the IPA if it is not yet installed in device.

What you can do is get the user info from your website, i.e. let user fill a form in your download page. Then save the data to your server along with a GUID that you can generate from your download page.

Once the the app is installed and running, the app should recreate the GUID and then query your server to find the user info associated with the GUID.

Your app can then pre-fill the user info.

The challenge is how can your download page create a GUID that will also be recreated by the installed app? Well you can create the GUID by using browser information. Check this out on how to create the GUID using browser information:

https://andywalpole.me/#!/blog/140739/using-javascript-create-guid-from-users-browser-information



来源:https://stackoverflow.com/questions/31734409/possible-to-read-the-enterprise-ios-download-link-plist-from-within-the-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!