a. 编译相关
提示 Prefix.pch has been modified since the precompiled header was built,先Clean了重编译
提示 ARC forbids ... 一般是引入的他人的库之类。
修改方法见 http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project
更多说明见 http://www.onevcat.com/2012/06/arc-hand-by-hand/
b. 签名相关
查看一个app的签名 终端下 codesign -dvvv x.app
注意一个应用,发布用来上传的签名和最后通过苹果审核后,给玩家下载的签名是不同的,后者经过苹果的重签名,见
参考 http://afp548.com/2012/06/05/re-signining-ios-apps/
查看一个签名的细节,可以直接文本打开 .app文件夹下的embedded.mobileprovision文件,即可看到诸如此类的签名标识
<key>UUID</key>
<string>BANANANA-1234-5678-ABCD-BANANANANANA</string>
又如签名过期时间
<key>ExpirationDate</key>
<date>2014-03-15T03:57:15Z</date>
事实上,除了用XCode,也可以直接使用命令行的codesign做重签名,重签名的批处理resign.sh,注意换号符要用unix的
IPA=$1
PROVISION="/Users/nd/Documents/resign/BANANANA-1234-5678-ABCD-BANANANANANA.mobileprovision"
CERTIFICATE="Banana Wireless Websoft Technology Limited" # must be in keychain
CENT="/Users/nd/Documents/resign/resign.xcent"
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate"
# unzip the ipa
rm -rf Payload
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 --entitlements "$CENT" Payload/*.app
# zip it back up
zip -qr resigned.ipa Payload
codesign -dvvv Payload/*.app
执行resign x.ipa即可。头几行要设置相关证书文件。
提示 Prefix.pch has been modified since the precompiled header was built,先Clean了重编译
提示 ARC forbids ... 一般是引入的他人的库之类。
修改方法见 http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project
更多说明见 http://www.onevcat.com/2012/06/arc-hand-by-hand/
b. 签名相关
查看一个app的签名 终端下 codesign -dvvv x.app
注意一个应用,发布用来上传的签名和最后通过苹果审核后,给玩家下载的签名是不同的,后者经过苹果的重签名,见
参考 http://afp548.com/2012/06/05/re-signining-ios-apps/
查看一个签名的细节,可以直接文本打开 .app文件夹下的embedded.mobileprovision文件,即可看到诸如此类的签名标识
<key>UUID</key>
<string>BANANANA-1234-5678-ABCD-BANANANANANA</string>
又如签名过期时间
<key>ExpirationDate</key>
<date>2014-03-15T03:57:15Z</date>
事实上,除了用XCode,也可以直接使用命令行的codesign做重签名,重签名的批处理resign.sh,注意换号符要用unix的
IPA=$1
PROVISION="/Users/nd/Documents/resign/BANANANA-1234-5678-ABCD-BANANANANANA.mobileprovision"
CERTIFICATE="Banana Wireless Websoft Technology Limited" # must be in keychain
CENT="/Users/nd/Documents/resign/resign.xcent"
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate"
# unzip the ipa
rm -rf Payload
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 --entitlements "$CENT" Payload/*.app
# zip it back up
zip -qr resigned.ipa Payload
codesign -dvvv Payload/*.app
执行resign x.ipa即可。头几行要设置相关证书文件。