[英]Did Apple change the .mobileprovision file format, and how can I view the current format?
I'm finding many articles on the web where it is implied that you can view the .mobileprovision file contents in a text editor. 我在网上发现了很多文章,暗示你可以在文本编辑器中查看.mobileprovision文件内容。 For example, this Urban Airship post : 例如,这个Urban Airship帖子 :
When push notifications are enabled for an app, the aps-environment key will appear in the .mobileprovision file specifying the provisioning profile: 为应用启用推送通知时,aps-environment键将显示在指定配置文件的.mobileprovision文件中:
<key>Entitlements</key>
<dict>
<key>application-identifier</key>
...
However the mobilprovision files I have (obtained within the last few days) contain 466 1/2 rows of 8 groups of 4 hex digits, (eg 4851 3842 4176 2845 0a09 01a2 404d 4382
). 然而,我拥有的mobilprovision文件(在过去几天内获得)包含466 1/2行的8组4个十六进制数字(例如4851 3842 4176 2845 0a09 01a2 404d 4382
)。 How can I view this type of file? 如何查看此类文件?
Provisioning Profiles are encoded. 供应配置文件已编码。 To decode them and examine the XML you can use this via command line: 要解码它们并检查XML,可以通过命令行使用它:
security cms -D -i #{@profilePath}
where #{@profilePath}
is the filepath to your .mobileprovision file. 其中#{@profilePath}
是.mobileprovision文件的文件路径。
A fuller Ruby example is: 更全面的Ruby示例是:
require 'plist'
profile = `security cms -D -i #{@profilePath}`
xml = Plist::parse_xml(profile)
appID = xml['Entitlements']['application-identifier']
如果您希望Sublime Text 2能够读取.mobileprovision配置文件,则这是设置
"enable_hexadecimal_encoding": false,
You are using a text-editor that is a bit too clever for you :D. 你正在使用一个对你来说太聪明的文本编辑器: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. 您的编辑器发现该文件实际上是二进制文件并将其显示为十六进制转储 - 例如Sublime 2就是这样做的。 Open that same file using TextEdit. 使用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. 你会看到几行二进制garbledegock,然后是一些纯文本(XML)应该包含你正在寻找的信息。
However, do not edit that file using TextEdit, that will render it unusable! 然而,使用文本编辑不编辑该文件,这将使其不能使用!
您可以使用openssl输出签名配置文件的内容。
openssl smime -in /path/to/your.mobileprovision -inform der -verify
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.