Did Apple change the .mobileprovision file format, and how can I view the current format?

半世苍凉 提交于 2019-12-02 18:16:13

You are using a text-editor that is a bit too clever for you :D.

Your editor finds out that the file actually is binary and shows it as a hex-dump - for example Sublime 2 does it that way. Open that same file using TextEdit. You will see a couple of lines of binary garbledegock and then some plain-text (XML) that should contain the information you are looking for.

However, do not edit that file using TextEdit, that will render it unusable!

Provisioning Profiles are encoded. To decode them and examine the XML you can use this via command line:

security cms -D -i #{@profilePath}

where #{@profilePath} is the filepath to your .mobileprovision file.

A fuller Ruby example is:

require 'plist'
profile = `security cms -D -i #{@profilePath}`
xml = Plist::parse_xml(profile)
appID = xml['Entitlements']['application-identifier']

If you want Sublime Text 2 to be able to read .mobileprovision profiles this is the setting

"enable_hexadecimal_encoding": false,

You can use openssl to output the contents of the signed profile.

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