开发者

Is it possible to have an external configuration file defined in the IPA?

开发者 https://www.devze.com 2023-03-18 06:13 出处:网络
Is it possible to have an external configuration file defined in the IPA that can be changed before the ipa file is loaded onto the device ?

Is it possible to have an external configuration file defined in the IPA that can be changed before the ipa file is loaded onto the device ?

By default, the url defined in the configuration file will be http://www.google.com;

Having the config file, we will be able to modify and connect to http://www.yahoo.com if re开发者_如何学Pythonquired.

Is this possible ? plz help me

Thanks in advance.........


The app bundle contains a digital signature, which indicates that the app bundle came from you and hasn't been tampered with since you created it.

For your app to find and read the config file, it must be inside the app bundle. If you change a file inside the bundle (or just add a file to the bundle), the signature will no longer be valid, and iOS will refuse to execute your program.

Therefore, in order to do this, you must sign the app bundle again after you change the config file. That means a user cannot edit the config file himself, you must provide the customized versions for him. (Or he must have the developer tools and a valid signing certificate installed.)

So the steps are:

  1. Unzip the IPA file.
  2. Change the config file.
  3. Use the codesign command line utility to update the digital signature.
  4. Recreate the IPA using zip -y (to preserve symlinks).
0

精彩评论

暂无评论...
验证码 换一张
取 消