如何使用Apple Developer帐户在我的设备上安装未签名的IPA文件? [英] How to install an unsigned IPA file on my device using an Apple Developer account?

查看:1579
本文介绍了如何使用Apple Developer帐户在我的设备上安装未签名的IPA文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的设备iPhone 5上安装一个.ipa文件。

I need to install an .ipa file that I own onto my device, iPhone 5.

我有一个设备,iOS开发者帐户(完全访问) ,xcode ..等等等等。现在,我该如何 codesign 呢,添加证书配置配置文件最后如何在我的设备中安装它?

I have a the device, the iOS developer account(complete access), xcode.. blah blah etc .. Now, how should I codesign it, add certificates, provisioning profiles and finally how do I install it in my device?

推荐答案

因为你有在ipa中,您需要做的是提取ipa(基本上是一个zip文件),提取一些与旧签名相关的文件,交换新的配置文件,然后重新签名。只需将其拉回来就可以了。你好了。

Since you have an ipa, what you need to do is extract the ipa (basically a zip file), pull out some files related to the old signing, swap in your new provision profile, and then re-sign. Simply zip it back up and you should be good to go.

IPA="/path/to/file.ipa"
PROVISION="/path/to/file.mobileprovision"
CERTIFICATE="Name of certificate: To sign with" # must be in keychain
# unzip the ipa
unzip -q "$IPA"
# remove the signature
rm -rf Payload/*.app/_CodeSignature Payload/*.app/CodeResources
# replace the provision
cp "$PROVISION" Payload/*.app/embedded.mobileprovision
# sign with the new certificate
/usr/bin/codesign -f -s "$CERTIFICATE" --resource-rules Payload/*.app/ResourceRules.plist Payload/*.app
# zip it back up
zip -qr resigned.ipa Payload

这是假设您没有尝试更改捆绑包ID或任何具有权利的内容。请注意,新配置文件必须具有必要的权利才能在设备上运行。

This is all assuming that you're not trying to change the bundle ID or anything with entitlements. Note that the new profile must have the necessary entitlements for this to work on a device.

对于也执行此操作的预制脚本,请参阅以下内容:

For a pre-made script that also does this, see the following:

https://github.com/RichardBronosky/ota-工具

这篇关于如何使用Apple Developer帐户在我的设备上安装未签名的IPA文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆