再签收IPA(iPhone) [英] Re-sign IPA (iPhone)

查看:273
本文介绍了再签收IPA(iPhone)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的X codebuild其次是xcrun没有任何问题,建立我与哈德森的所有应用程序

I currently build all my applications with hudson using xcodebuild followed by a xcrun without any problems

我收到了几个来自不同的人IPA文件,我想重新签订了企业帐户,而不是公司账户(用于应用程序商店,或分布式有时临时)。

I've received a couple of IPA files from different people that I would like to re-sign with a enterprise account instead of the corporate account (for the app store, or sometimes ad-hoc distributed).

我的问题是,当我试图辞职的应用程序,它会不会我的设备上安装(它应该因为它是一个企业版本)。该错误消息是设备(未在iTunes)上,它告诉我简单地认为它无法安装应用程序。没有更多的信息中给出。

My problem is that when I try to resign the app, it won't install on my device (and it should since it's a Enterprise build). The error message is on the device (not in iTunes) and it tells me simply that it couldn't install the app. No more information is given.

我已经找到了一些资料,(<一href=\"http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-x$c$c-organizer-for-upload/\">http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-x$c$c-organizer-for-upload/ )

I've found some information, ( http://www.ketzler.de/2011/01/resign-an-iphone-app-insert-new-bundle-id-and-send-to-xcode-organizer-for-upload/ )

和,这可能是可行的。我现在面临的问题是,它似乎并没有嵌入手机配置配置文件作为我和我的正常建立(使用xcrun)做这可能与codesign工具来控制,还是有可能重新与xcrun签名了吗?

And this might be possible. The problem I'm facing is that it doesn't seem to embed the mobile provisioning profile as I do with my normal builds (using xcrun) is this possible to control with the codesign tool, or is it possible to re-sign with xcrun?

使用我的辞职剧本我目前做的

With my resign script i currently do


  • 解压app.ipa

  • 应用程序名称= $(LS负载)

  • xcrun -sdk的iPhoneOS PackageApplication -s$ provisioning_profile$ PROJECT_DIR /负载/ $ APPNAME-o$ PROJECT_DIR / APP-resigned.ipa--sign$ provisioning_profile--embed$ mobileprovision

我看了在生成的IPA文件,它似乎是非常相似的原始应用。哪些文件要真正转变吗?我最初认为的_ codeSignature / codeResources会改变,但内容看起来pretty多少完全一样的。

I've looked in the resulting ipa file and it seems to be very similar to the original app. What files should really change here? I initially thought the the _CodeSignature/CodeResources would change, but the content looks pretty much exactly the same.

指针是多少AP preciated。

Pointers are much appreciated.

推荐答案

终于得到了这个工作!

测试了IPA与cert1的应用程序商店提交没有在供应配置文件添加的设备签名。结果在一个新的IPA与企业帐户,并在内部部署移动供应配置文件(移动供应轮廓被嵌入到IPA)。

Tested with a IPA signed with cert1 for app store submission with no devices added in the provisioning profile. Results in a new IPA signed with a enterprise account and a mobile provisioning profile for in house deployment (the mobile provisioning profile gets embedded to the IPA).

解决方案:

解压IPA

unzip Application.ipa

删除旧的codeSignature

Remove old CodeSignature

rm -r "Payload/Application.app/_CodeSignature" "Payload/Application.app/CodeResources" 2> /dev/null | true

替换嵌入式移动供应配置文件

Replace embedded mobile provisioning profile

cp "MyEnterprise.mobileprovision" "Payload/Application.app/embedded.mobileprovision"

重新签名

/usr/bin/codesign -f -s "iPhone Distribution: Certificate Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"

重新打包

zip -qr "Application.resigned.ipa" Payload

编辑:删除了部分权利(见小巷评论,谢谢)

Removed the Entitlement part (see alleys comment, thanks)

这篇关于再签收IPA(iPhone)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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