導(dǎo)讀
iOS開(kāi)發(fā)之ipa包Application Loader上傳到Appstore
我們?cè)诠ぷ髦猩蟼鱅PA包基本上都會(huì)用到Application Loader,那么在上傳IPA包的時(shí)候肯定會(huì)遇到一些報(bào)錯(cuò)問(wèn)題迈窟,以下就來(lái)說(shuō)一下:
第一種
Archive upload failed due to the issues listed below:
ERROR ITMS-90534:"Invalid Toolchain. New apps and app updates must be built with the public(GM) versions of Xcode 6 or later,macOS,and iOS SDK or later. Don't submit apps built with beta software including beta macOS builds.
這個(gè)問(wèn)題說(shuō)的就是我們?cè)诖虬臅r(shí)候用的beta版本的xcode打的罗珍,需要用xcode6及以后的正式版xcode打包。
有興趣的童鞋可以了解下:iOS打包的兩種方式
這個(gè)問(wèn)題的背景是蘋果WWDC大會(huì)發(fā)布了beta版本的xcode為了體驗(yàn)一下就下了一個(gè)崩哩,但是打包的時(shí)候用了beta版本的來(lái)打包漓滔,所以這個(gè)報(bào)錯(cuò)了。我們只需要切換到正式版本打包就行了呀酸。
第二種
Archive upload failed due to the issues listed below:
The session's status is FAILED and the error description is 'Connection lost in midst of data session, SSH connection failure: Operation timed out(16)'...
the max number of retries was performed. the package will not be upload
像這種情況是因?yàn)榫W(wǎng)絡(luò)的問(wèn)題,解決辦法有兩種:
- 再次雙傳琼梆,因?yàn)榭赡苤型竞吞O果的連接斷了
- 換一個(gè)穩(wěn)定點(diǎn)的網(wǎng)絡(luò)性誉,這樣保證在傳輸過(guò)程中鏈路是穩(wěn)定的
第三種
Archive upload failed due to the issues listed below:
ERROR ITMS-90122:"Invalid Executable Size. The size of your app's executable file '*********' is 86605824 bytes for architecture 'armv7',which exceeds the maxmum allowed size of 60MB."
ERROR ITMS-90122:"Invalid Executable Size. The size of your app's executable file '*********' is 86343680 bytes for architecture 'arm64',which exceeds the maxmum allowed size of 60MB."
像這個(gè)問(wèn)題說(shuō)的是我們打包之后的ipa包中打開(kāi)的二進(jìn)制可執(zhí)行文件不能超過(guò)60M茎杂,并不是說(shuō)ipa包不能超過(guò)60M蝗砾,其中我們很多能做成資源文件的就把這部分放到外面來(lái)曾棕,然后動(dòng)態(tài)加載,以下是官方文檔要求的:
Submitting the App to App Review
For iOS and tvOS apps, check that your app size fits within the App Store requirements.
Your app’s total uncompressed size must be less than 4GB. Each Mach-O executable file (for example, app_name.app/app_name) must not exceed these limits:
For apps whose MinimumOSVersion is less than 7.0: maximum of 80 MB for the total of all __TEXT sections in the binary.
For apps whose MinimumOSVersion is 7.x through 8.x: maximum of 60 MB per slice for the __TEXT section of each architecture slice in the binary.
For apps whose MinimumOSVersion is 9.0 or greater: maximum of 500 MB for the total of all __TEXT sections in the binary.
However, consider download times when determining your app’s size. Minimize the file’s size as much as possible, keeping in mind that there is a 100 MB limit for over-the-air downloads. Abnormally large build files are usually the result of storing data, such as images, inside the compiled binary itself instead of as a resource inside your app bundle. If you are compiling an image or large dataset into your binary, it would be best to split this data out into a resource that is loaded dynamically by your app.
PS: MinimumOSVersion版本也就是Development Target版本
7.0版本以下的二進(jìn)制文件的__TEXT最大80M
7.0-8.0版本的二進(jìn)制文件的__TEXT最大60M
9.0-以后版本二進(jìn)制文件的__TEXT最大500M
其中后面內(nèi)容還有講到解壓縮之后安裝在手機(jī)上最大4G.
查看二進(jìn)制文件的大忻链:
但是怎么查看__TEXT的大小呢?
其實(shí)只要用size命令查看一下剛剛找到的二進(jìn)制文件即可:
PS: 這里顯然只有32KB锁保,那么比169KB是要小很多了蜜托,當(dāng)然這個(gè)里面有我很多的重復(fù)代碼,可能會(huì)影響這個(gè)數(shù)字,一般如果沒(méi)有很多重復(fù)代碼的話差別應(yīng)該不會(huì)太大但是一定會(huì)小棠涮。
請(qǐng)參考:iOS坑:IPA可執(zhí)行文件大小限制
后面如果遇到別的問(wèn)題還會(huì)繼續(xù)添加的谦屑,希望能給大家?guī)?lái)幫助酝枢!
以上袍患!