2016-12-02 1 views

답변

2

IPA는 단순히 .zip 아카이브입니다. 다음은 인증서의 이름을 찾기 위해 아이디어를

IPA=$1 
PROVISION="/path/to/nameOfProfile.mobileprovision" 
CERTIFICATE="iPhone Developer: nameOfCertificate (2472ZKDHVF2A)" # must exist 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 
#copy existing entitlements to use it for resigning 
cp Payload/*.app//archived-expanded-entitlements.xcent entitlements.plist 
# sign with the new certificate 
/usr/bin/codesign -f -s "$CERTIFICATE" --entitlements "entitlements.plist" Payload/*.app 
# zip it 
zip -qr newIpaName.ipa Payload 
#clean up 
rm -f entitlements.plist 
rm -rf Payload 

을 얻을 수있는 예제 스크립트입니다 :

  • 열기 "키 체인 접근"
  • 오른쪽 + 인증서를 클릭은 -> "정보 입수"
  • "일반 이름"복사하여 사용하십시오.
+0

팁 주셔서 감사합니다. 당신은 저에게 말할 수 있습니까? CERTIFICATE = "iPhone 개발자 : nameOfCertificate (2472ZKDHVF2A)" .cer 또는 다른 이름의 파일 이름입니까? –

+0

답변이 업데이트되었습니다. – shallowThought

+0

죄송합니다 .. 스크립트에 사용 된 "entitlements.plist"참조는 무엇입니까? 특정 파일이나 생성해야하는 파일이 있습니까? 사전에 감사드립니다. –

관련 문제