导读
iOS开发之ipa包Application Loader上传到Appstore
我们在工作中上传IPA包基本上都会用到Application Loader,那么在上传IPA包的时候肯定会遇到一些报错问题,以下就来说一下:
第一种
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.
这个问题说的就是我们在打包的时候用的beta版本的xcode打的,需要用xcode6及以后的正式版xcode打包。
有兴趣的童鞋可以了解下:iOS打包的两种方式
这个问题的背景是苹果WWDC大会发布了beta版本的xcode为了体验一下就下了一个,但是打包的时候用了beta版本的来打包,所以这个报错了。我们只需要切换到正式版本打包就行了。
第二种
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
像这种情况是因为网络的问题,解决办法有两种:
- 再次双传,因为可能中途和苹果的连接断了
- 换一个稳定点的网络,这样保证在传输过程中链路是稳定的
第三种
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."
像这个问题说的是我们打包之后的ipa包中打开的二进制可执行文件不能超过60M,并不是说ipa包不能超过60M,其中我们很多能做成资源文件的就把这部分放到外面来,然后动态加载,以下是官方文档要求的:
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版本以下的二进制文件的__TEXT最大80M
7.0-8.0版本的二进制文件的__TEXT最大60M
9.0-以后版本二进制文件的__TEXT最大500M
其中后面内容还有讲到解压缩之后安装在手机上最大4G.
查看二进制文件的大小:
但是怎么查看__TEXT的大小呢?
其实只要用size命令查看一下刚刚找到的二进制文件即可:
PS: 这里显然只有32KB,那么比169KB是要小很多了,当然这个里面有我很多的重复代码,可能会影响这个数字,一般如果没有很多重复代码的话差别应该不会太大但是一定会小。
后面如果遇到别的问题还会继续添加的,希望能给大家带来帮助!
以上!