您的位置:首页 > 移动开发 > IOS开发

ios9系统无法下载应用问题分析与解决

2015-10-13 11:11 661 查看
苹果更新系统后,最近打包的ipa包在ios9系统上无法安装(ios8可以),
提示“无法下载应用”,经过一系列折腾解决了问题:

参考 http://www.cocoachina.com/bbs/read.php?tid-325154.html  基本提供了以下几种解决路径,下面是折腾的过程:

1. 首先怀疑是http和https的问题,苹果更新系统要求所有请求都变成https,所以怀疑下载过程也要求这样,很快排除;

2.清除手机safari缓存,验证无效,但可能某些场景有效;
3.恢复网络设置,验证无效,但可能某些场景有效;
4.恢复出厂设置,验证无效,但可能某些场景有效;

5. 怀疑ipa的bundle id和服务器的plist上的bundle id不一致

查看服务器的plist文件,发现确实是这个原因引起,修改使之与ipa的
bundle id一致,解决;

但是后来发现新问题:
更新到9.0.2时发现5s以上设备可以安装,5c不行,反复查看了上面的解决路径5中方法,不得解,使用工具http://fir.im/tools/log_guru (很棒的开发者自己写的工具,原理就是将itunes可以看到的设备上所有log输出),直接看安装失败的log ,如下:

09:38:07 itunesstored➜[Download]:
Reprioritizing to high task: 4 for download: 4270672922564713524

09:38:08 itunesstored➜[Download]:
Reprioritizing to high task: 4 for download: 4270672922564713524

09:38:16 nsurlsessiond➜SocketStream
watchdog timer fired after 65.000000 seconds of inactivity. Timing out the connection.

09:38:16 itunesstored➜[Download]:
Retry scheduled for task: 4, download: 4270672922564713524, error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=http://www.cmccim.com/resource/littlec_iOS_1.3.0.ipa, _kCFStreamErrorCodeKey=-2104, NSErrorFailingURLKey=http://www.cmccim.com/resource/littlec_iOS_1.3.0.ipa,
NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4}

09:38:17 itunesstored➜[Download]:
Reset data consumer for task: 4, with resumption offset: 7810493

09:38:20 itunesstored➜[Download]:
Download task did finish: 4 for download: 4270672922564713524

09:38:20 itunesstored➜[ApplicationWorkspace]
Installing download: 4270672922564713524 with step(s): Install

09:38:20 itunesstored➜[ApplicationWorkspace]:
Installing software package with bundleID: com.cmcchy.xiaoxi: bundleVersion: 1.3.0 path: /var/mobile/Media/Downloads/4270672922564713524/-556691672994417771

09:38:21 itunesstored➜[ApplicationWorkspace]:
Bundle validated for bundleIdentifier: com.cmcchy.xiaoxi success: 1

09:38:21 itunesstored➜LaunchServices:
installing app for existing placeholder <LSApplicationProxy: 0x14ee3dc0> com.cmcchy.xiaoxi (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/8AD346A2-0B79-4E3E-A623-13FE5328B10A/4270672922564713524.app>

09:38:21 itunesstored➜LaunchServices:
Creating installProgressForApplication:<LSApplicationProxy: 0x14ee3dc0> com.cmcchy.xiaoxi (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/8AD346A2-0B79-4E3E-A623-13FE5328B10A/4270672922564713524.app> withPhase:1

09:38:21 installd➜0x40115000
-[MIClientConnection installPath:withOptions:completion:]: Install of "/var/mobile/Media/Downloads/4270672922564713524/-556691672994417771" type Customer requested by itunesstored (pid 310)

09:38:23 installd➜0x40081000
-[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.cmcchy.xiaoxi; Version=1, ShortVersion=1.0>

09:38:24 profiled➜(Note
) MC: Provisioning profiles changed

09:38:24 profiled➜(Note
) MC: Updating MIS trust...

09:38:24 installd➜ SecTrustEvaluate  [leaf
IssuerCommonName SubjectCommonName]

09:38:26 online-auth-agent➜ SecTrustEvaluate  [leaf
AnchorTrusted]

09:38:27 installd➜0x40081000
MIMachOFileMatchesMyArchitecture: 310: Failed to find matching arch for 64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo

09:38:27 installd➜0x40081000
-[MIInstaller performInstallationWithError:]: Verification stage failed

09:38:28 itunesstored➜0x40081000
__MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=15 "Failed to find matching arch for 64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo"
UserInfo={LegacyErrorString=IncorrectArchitecture, FunctionName=MIMachOFileMatchesMyArchitecture, NSLocalizedDescription=Failed to find matching arch for 64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo,
SourceFileLine=310}

09:38:28 itunesstored➜ERROR:
MobileInstallationInstallForLaunchServices returned nil

09:38:28 itunesstored➜LaunchServices:
installPhaseFinishedForProgress: com.cmcchy.xiaoxi.Installing - <NSProgress: 0x14debe10> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 100   called, removing progress from cache

09:38:28 itunesstored➜[ApplicationWorkspace]:
Failed to install application: com.cmcchy.xiaoxi; /var/mobile/Media/Downloads/4270672922564713524/-556691672994417771; Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=IncorrectArchitecture, ErrorDescription=Failed to find matching arch for
64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo}

09:38:28 itunesstored➜[ApplicationWorkspace]
Install complete for download: 4270672922564713524 result: Failed

09:38:28 itunesstored➜[Download]:
Fail download: 4270672922564713524 after error: Error Domain=SSMobileInstallationErrorDomain Code=0 "(null)" UserInfo={SSErrorInstallErrorNameKey=IncorrectArchitecture}

所以怀疑是ipa打包配置需要改下,经分析可能是这里的问题:

将yes

将yes改为no,重新打包安装,解决~

猜测:可能是到9.0.2优先检查ipa的最高架构,假如支持了arm64就安装此架构到设备上,而iphone5c不支持arm64,这样就报了上面的错,修改这个配置就是让其不严格校验架构,可以兼容所有支持的架构。

苹果更新系统后,最近打包的ipa包在ios9系统上无法安装(ios8可以),
提示“无法下载应用”,经过一系列折腾解决了问题:

参考 http://www.cocoachina.com/bbs/read.php?tid-325154.html  基本提供了以下几种解决路径,下面是折腾的过程:

1. 首先怀疑是http和https的问题,苹果更新系统要求所有请求都变成https,所以怀疑下载过程也要求这样,很快排除;

2.清除手机safari缓存,验证无效,但可能某些场景有效;
3.恢复网络设置,验证无效,但可能某些场景有效;
4.恢复出厂设置,验证无效,但可能某些场景有效;

5. 怀疑ipa的bundle id和服务器的plist上的bundle id不一致

查看服务器的plist文件,发现确实是这个原因引起,修改使之与ipa的
bundle id一致,解决;

但是后来发现新问题:
更新到9.0.2时发现5s以上设备可以安装,5c不行,反复查看了上面的解决路径5中方法,不得解,使用工具http://fir.im/tools/log_guru (很棒的开发者自己写的工具,原理就是将itunes可以看到的设备上所有log输出),直接看安装失败的log ,如下:

09:38:07 itunesstored➜[Download]:
Reprioritizing to high task: 4 for download: 4270672922564713524

09:38:08 itunesstored➜[Download]:
Reprioritizing to high task: 4 for download: 4270672922564713524

09:38:16 nsurlsessiond➜SocketStream
watchdog timer fired after 65.000000 seconds of inactivity. Timing out the connection.

09:38:16 itunesstored➜[Download]:
Retry scheduled for task: 4, download: 4270672922564713524, error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=http://www.cmccim.com/resource/littlec_iOS_1.3.0.ipa, _kCFStreamErrorCodeKey=-2104, NSErrorFailingURLKey=http://www.cmccim.com/resource/littlec_iOS_1.3.0.ipa,
NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4}

09:38:17 itunesstored➜[Download]:
Reset data consumer for task: 4, with resumption offset: 7810493

09:38:20 itunesstored➜[Download]:
Download task did finish: 4 for download: 4270672922564713524

09:38:20 itunesstored➜[ApplicationWorkspace]
Installing download: 4270672922564713524 with step(s): Install

09:38:20 itunesstored➜[ApplicationWorkspace]:
Installing software package with bundleID: com.cmcchy.xiaoxi: bundleVersion: 1.3.0 path: /var/mobile/Media/Downloads/4270672922564713524/-556691672994417771

09:38:21 itunesstored➜[ApplicationWorkspace]:
Bundle validated for bundleIdentifier: com.cmcchy.xiaoxi success: 1

09:38:21 itunesstored➜LaunchServices:
installing app for existing placeholder <LSApplicationProxy: 0x14ee3dc0> com.cmcchy.xiaoxi (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/8AD346A2-0B79-4E3E-A623-13FE5328B10A/4270672922564713524.app>

09:38:21 itunesstored➜LaunchServices:
Creating installProgressForApplication:<LSApplicationProxy: 0x14ee3dc0> com.cmcchy.xiaoxi (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/8AD346A2-0B79-4E3E-A623-13FE5328B10A/4270672922564713524.app> withPhase:1

09:38:21 installd➜0x40115000
-[MIClientConnection installPath:withOptions:completion:]: Install of "/var/mobile/Media/Downloads/4270672922564713524/-556691672994417771" type Customer requested by itunesstored (pid 310)

09:38:23 installd➜0x40081000
-[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.cmcchy.xiaoxi; Version=1, ShortVersion=1.0>

09:38:24 profiled➜(Note
) MC: Provisioning profiles changed

09:38:24 profiled➜(Note
) MC: Updating MIS trust...

09:38:24 installd➜ SecTrustEvaluate  [leaf
IssuerCommonName SubjectCommonName]

09:38:26 online-auth-agent➜ SecTrustEvaluate  [leaf
AnchorTrusted]

09:38:27 installd➜0x40081000
MIMachOFileMatchesMyArchitecture: 310: Failed to find matching arch for 64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo

09:38:27 installd➜0x40081000
-[MIInstaller performInstallationWithError:]: Verification stage failed

09:38:28 itunesstored➜0x40081000
__MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=15 "Failed to find matching arch for 64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo"
UserInfo={LegacyErrorString=IncorrectArchitecture, FunctionName=MIMachOFileMatchesMyArchitecture, NSLocalizedDescription=Failed to find matching arch for 64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo,
SourceFileLine=310}

09:38:28 itunesstored➜ERROR:
MobileInstallationInstallForLaunchServices returned nil

09:38:28 itunesstored➜LaunchServices:
installPhaseFinishedForProgress: com.cmcchy.xiaoxi.Installing - <NSProgress: 0x14debe10> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 100   called, removing progress from cache

09:38:28 itunesstored➜[ApplicationWorkspace]:
Failed to install application: com.cmcchy.xiaoxi; /var/mobile/Media/Downloads/4270672922564713524/-556691672994417771; Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=IncorrectArchitecture, ErrorDescription=Failed to find matching arch for
64-bit Mach-O input file /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.KV3EvC/extracted/Payload/ChatDemo.app/ChatDemo}

09:38:28 itunesstored➜[ApplicationWorkspace]
Install complete for download: 4270672922564713524 result: Failed

09:38:28 itunesstored➜[Download]:
Fail download: 4270672922564713524 after error: Error Domain=SSMobileInstallationErrorDomain Code=0 "(null)" UserInfo={SSErrorInstallErrorNameKey=IncorrectArchitecture}

所以怀疑是ipa打包配置需要改下,经分析可能是这里的问题:

将yes

将yes改为no,重新打包安装,解决~

猜测:可能是到9.0.2优先检查ipa的最高架构,假如支持了arm64就安装此架构到设备上,而iphone5c不支持arm64,这样就报了上面的错,修改这个配置就是让其不严格校验架构,可以兼容所有支持的架构。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: