我們把應用上傳到app store之前需要把編譯的二進制檔案和資源檔案打成壓縮包,壓縮格式是zip。
首頁找到編譯到什麼地方,這個很重要也不太好找,我們可以看看編譯日志,找到其中的create universal binary helloworld…的内容,然後展開内容如下:
create universal binary /users/tonyguan/library/developer/xcode/deriveddata/helloworld-fzvtlfsmygaqjleczypphenzabef/build/products/release-iphoneos/helloworld.app/helloworld normal ”armv7 armv7s”
cd ”/users/tonyguan/desktop/19.1.4 helloworld”
setenv path ”/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/usr/bin:/applications/xcode.app/contents/developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
lipo -create /users/tonyguan/library/developer/xcode/deriveddata/helloworld-fzvtlfsmygaqjleczypphenzabef/build/intermediates/helloworld.build/release-iphoneos/helloworld.build/objects-normal/armv7/helloworld /users/tonyguan/library/developer/xcode/deriveddata/helloworld-fzvtlfsmygaqjleczypphenzabef/build/intermediates/helloworld.build/release-iphoneos/helloworld.build/objects-normal/armv7s/helloworld -output /users/tonyguan/library/developer/xcode/deriveddata/helloworld-fzvtlfsmygaqjleczypphenzabef/build/products/release-iphoneos/helloworld.app/helloworld
在最後日志-output之後就是應用編譯之後的位置了,其中“/users/tonyguan/library/… /products/release-iphoneos/”是編譯之後生成的目錄,helloworld.app是封包件,helloworld是二進制檔案。

封包件helloworld.app可以使用點選右鍵菜單“顯示包内容”,其中helloworld檔案是我們這個應用的二進制檔案。其它的都是資源檔案,包括圖檔、屬性清單檔案、nib和storyboardc檔案,nib是編譯之後的xib檔案,storyboardc是編譯之後的故事闆檔案等。
應用打包就是将helloworld.app封包件打包成為helloworld.zip,具體操作是右鍵點選helloworld.app封包件彈出菜單,選擇壓縮“helloworld”,這樣就會在目前目錄下生成helloworld.zip壓縮檔案了,請将這個檔案儲存好,我們會在下一節介紹,上傳應用時候還會使用到。