Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
420 views
in Technique[技术] by (71.8m points)

xcode8 - What's the replacement for Xcode's PackageApplication?

With Xcode 8.3 PackageApplication is gone. I did use it to convert an *.app package/directory to a *.ipa file (after re-signing):

xcrun -sdk iphoneos PackageApplication -v "MyApp.app" -o "MyApp.ipa"

Is there any replacement for this, so I can continue to convert .app to .ipa?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Apparently there is no need to use any other tool, and it's also not necessary to change the process that leads to the *.app package (in other words: no need to use xcodebuild -exportArchive).

All we have to do, is to zip that *.app package:

pushd "/build"
mkdir ./Payload
cp -R "$PATH_TO_SIGNED_APP_PACKAGE.app" ./Payload
zip -qyr MyApp.ipa ./Payload
rm -r ./Payload
popd

Note:

  1. Jump into the target directory, here /build. This ensures we don't have the full path in the zip archive later.
  2. Create a folder named Payload (important, this cannot vary)
  3. Copy the *.app bundle to the Payload folder
  4. Zip the folder and instead of *.zip use *.ipa as extension
  5. Jump back to where you came from

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...