如何对ipa文件进行重新签名?
在使用不同的配置文件生成如下所示的 IPA 后,如何使用配置配置文件对 .ipa 文件进行签名?我想使用用于 Beta 测试的临时配置文件签署 IPA,然后使用应用程序商店的应用程序提交配置文件重新签署确切的 IPA。
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}"
How do I sign the .ipa file with a provisioning profile after I generate an IPA like the following with a different provision profile? I would like to sign the IPA with an ad-hoc provisioning profile for beta testing, and then re-sign the exact IPA with an app submission provisioning profile for the app store.
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
从命令行可以很容易地做到这一点。我有一个执行此操作的脚本要点。它现已合并到 https://github.com/RichardBronosky/ota-tools 我每天都使用它。如果您对使用这些工具有任何疑问,请随时询问。
其核心是:
您的新签名应用程序称为 resigned.ipa
It's really easy to do from the command line. I had a gist of a script for doing this. It has now been incorporated into the ipa_sign script in https://github.com/RichardBronosky/ota-tools which I use daily. If you have any questions about using these tools, don't hesitate to ask.
The heart of it is this:
Your new signed app is called resigned.ipa
检查 iResign 了解如何执行此操作的简单工具!
[编辑]经过一番摸索,我找到了钥匙串感知辞职的解决方案。您可以在 https://gist.github.com/Weptun/5406993 查看
Check iResign for an easy tool on how to do this!
[edit] after some fudling around, I found a solution to keychain-aware resigning. You can check it out at https://gist.github.com/Weptun/5406993
这是一个老问题,但是使用最新的 XCode,
codesign
很容易:Kind of old question, but with the latest XCode,
codesign
is easy:这里发布的答案对我来说都不太有效。他们主要跳过签署嵌入式框架(或包括权利)。
这是对我有用的方法(假设当前目录中存在一个 ipa 文件):
The answers posted here all didn't quite work for me. They mainly skipped signing embedded frameworks (or including the entitlements).
Here's what's worked for me (it assumes that one ipa file exists is in the current directory):
Fastlane 的 sigh 为退出 IPA 提供了相当强大的解决方案。
来自他们的自述文件:
它甚至会处理 为嵌套应用程序配置配置文件(例如,如果您有 watchkit 应用程序)
Fastlane's sigh provides a fairly robust solution for resigning IPAs.
From their README:
It will even handle provisioning profiles for nested applications (eg. if you have watchkit apps)
我已经更新了 Bryan 的 Sierra iMac 代码:
I've updated Bryan's code for my Sierra iMac:
_CodeSigned
文件夹embedded.mobileprovision
文件执行下面提到的命令:
/usr/bin/codesign -f -s "iPhone 发行版:证书名称" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"
现在再次压缩 Payload 文件夹,并将 .zip 扩展名更改为 .ipa
希望这会有所帮助。
作为参考,请点击下面提到的链接:
http://www.modelmetrics.com /tomgersic/codesign-re-signing-an-ipa- Between-apple-accounts/
_CodeSigned
folderembedded.mobileprovision
file with the new provision profileExecute the below mentioned command:
/usr/bin/codesign -f -s "iPhone Distribution: Certificate Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"
Now zip the Payload folder again and change the .zip extension with .ipa
Hope this helpful.
For reference follow below mentioned link:
http://www.modelmetrics.com/tomgersic/codesign-re-signing-an-ipa-between-apple-accounts/
试试这个应用程序
http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/
它应该可以帮助您重新签名 IPA 文件。我自己尝试过,但无法通过 Entitlements.plist 传递错误。可能只是我的项目有问题。你应该尝试一下。
Try this app
http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/
It supposed to help you resign the IPA file. I tried it myself but couldn't get pass an error with Entitlements.plist. Could just be a problem with my project. You should give it a try.
我一直在使用 https://github.com/xndrs/XReSign 并且它运行得非常好。
I have been using https://github.com/xndrs/XReSign and it is working really well.