从 Xcode 6 安装失败:“存在内部 API 错误”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32287926/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:44:21  来源:igfitidea点击:

Failed install from Xcode 6: "There was an internal API error"

iosxcodeipad

提问by Andreas

I tried running an app that works fine on my phone (ios 8.4.1) on an ipad (ios 7.1.2). Xcode says "There was an internal API error" and that's it.

我尝试在 ipad (ios 7.1.2) 上运行在我的手机 (ios 8.4.1) 上运行良好的应用程序。Xcode 说“有一个内部 API 错误”,就是这样。

I'm not sure how to interpret the logs. What's wrong? How do I fix this?

我不确定如何解释日志。怎么了?我该如何解决?

The ipad log:

ipad日志:

Aug 29 17:39:23 Esters-iPad lockdownd[52] <Notice>: 00201000 set_response_error: handle_get_value GetProhibited
Aug 29 17:39:23 Esters-iPad lockdownd[52] <Notice>: 01a88000 set_response_error: handle_get_value GetProhibited
Aug 29 17:39:24 Esters-iPad mobile_installation_proxy[2054] <Warning>: LaunchServices: installing app for existing placeholder LSApplicationProxy: aka-strax
Aug 29 17:39:24 Esters-iPad mobile_installation_proxy[2054] <Warning>: LaunchServices: Not creating progress for LSApplicationProxy: aka-strax since it is not a placeholder.
Aug 29 17:39:24 Esters-iPad installd[1988] <Notice>: 0x2c7000 handle_install_for_ls: Install of "/var/mobile/Media/PublicStaging/A?ka Strax.app" requested by mobile_installation_proxy
Aug 29 17:39:24 Esters-iPad installd[1988] <Error>: 0x2c7000 init_pack_state: Can't stat /var/mobile/Media/PublicStaging/A??ka Strax.app: No such file or directory
Aug 29 17:39:24 Esters-iPad installd[1988] <Error>: 0x2c7000 MobileInstallationInstall_Server: Could not initialize package state
Aug 29 17:39:24 Esters-iPad installd[1988] <Error>: 0x2c7000 handle_install_for_ls: API failed
Aug 29 17:39:24 Esters-iPad mobile_installation_proxy[2054] <Error>: 0x305000 MobileInstallationInstallForLaunchServices: failed with -1
Aug 29 17:39:24 Esters-iPad mobile_installation_proxy[2054] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Aug 29 17:39:24 Esters-iPad mobile_installation_proxy[2054] <Error>: 0x305000 handle_install: Installation failed: Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x16d28710 {Error=APIInternalError}

This is the OSX system log:

这是 OSX 系统日志:

2015-08-29 17:39:22,511 Xcode[432]: AMDeviceSecureInstallApplicationBundle (thread 0x127be6000): ENTRY, options: {
    PackageType = Developer;
    ShadowParentKey = "file:///var/folders/vh/z7jrdtc16mv_ml4rdf3c_yf40000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode/";
}
2015-08-29 17:39:22,522 Xcode[432]: copy_string_value_from_device (thread 0x127be6000): AMDeviceCopyValueWithError: 0xe8000016
2015-08-29 17:39:22,522 Xcode[432]: AMDeviceSecureInstallApplicationBundle (thread 0x127be6000): device os is at least 7.0
2015-08-29 17:39:22,522 Xcode[432]: createShadowPath (thread 0x127be6000): ENTRY bundle: /Users/andreas/Library/Developer/Xcode/DerivedData/Aka_Strax-elchrqyqzidfakebtddarrtffemg/Build/Products/Debug-iphoneos/A??ka Strax.app
2015-08-29 17:39:22,523 Xcode[432]: create_shadow_dir_path (thread 0x127be6000): bundle: /Users/andreas/Library/Developer/Xcode/DerivedData/Aka_Strax-elchrqyqzidfakebtddarrtffemg/Build/Products/Debug-iphoneos/A??ka Strax.app
2015-08-29 17:39:22,523 Xcode[432]: createShadowPath (thread 0x127be6000): returning: /var/folders/vh/z7jrdtc16mv_ml4rdf3c_yf40000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode/93b97a6a8fc08d7d84994efa7c4f96fb/6f5103ee7f37d220cf45535ea8fb76a2de87a5e4/A??ka Strax.app
2015-08-29 17:39:22,523 Xcode[432]: createSiblingInPath (thread 0x127be6000): returning: /var/folders/vh/z7jrdtc16mv_ml4rdf3c_yf40000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode/93b97a6a8fc08d7d84994efa7c4f96fb/6f5103ee7f37d220cf45535ea8fb76a2de87a5e4/ManifestCache.plist
2015-08-29 17:39:22,569 Xcode[432]: _AMDeviceCopyInstalledAppInfo (thread 0x127be6000): no app info
2015-08-29 17:39:22,572 Xcode[432]: AMDeviceSecureInstallApplicationBundle (thread 0x127be6000): unable to get installed app info, falling back to old skool install
2015-08-29 17:39:22,572 Xcode[432]: AMDeviceSecureInstallApplicationBundle (thread 0x127be6000): Blasting the bundle over to the device in an old skool way
2015-08-29 17:39:22,572 Xcode[432]: AMDeviceSecureTransferPath (thread 0x127be6000): disableDelta: TRUE, unzipOnFly: TRUE, StagingPath: PublicStaging
2015-08-29 17:39:22,572 Xcode[432]: AMDeviceSecureTransferPath (thread 0x127be6000): Trying SZConduit for transfer
2015-08-29 17:39:22,613 Xcode[432]: copy_string_value_from_device (thread 0x127be6000): AMDeviceCopyValueWithError: 0xe8000016
2015-08-29 17:39:22,661 Xcode[432]: nuke_path (thread 0x127be6000): AFCRemovePath of 'PublicStaging/A??ka Strax.app' returned 8
2015-08-29 17:39:22,662 Xcode[432]: AMDeviceSecureTransferPath (thread 0x127be6000): AMDeviceSecureTransferPath:1864 starting delta_transfer_directory, ref_afc: 0x0
2015-08-29 17:39:24,064 Xcode[432]: AMDeviceSecureTransferPath (thread 0x127be6000): AMDeviceSecureTransferPath:1867 finished delta_transfer_directory
2015-08-29 17:39:24,127 Xcode[432]: AMDErrorForMobileInstallationCallbackDict (thread 0x127be6000): GOT AN ERROR 0xe8000067
2015-08-29 17:39:24,127 Xcode[432]: perform_command (thread 0x127be6000): There was an error communicating with the service agent: 0xe8000067
2015-08-29 17:39:24,127 Xcode[432]: AMDeviceSecureInstallApplication (thread 0x127be6000): Old style install failed for (PublicStaging/A?ka Strax.app)
2015-08-29 17:39:24,128 Xcode[432]: AMDeviceSecureInstallApplication (thread 0x127be6000): Could not install package on device: kAMDAPIInternalError
2015-08-29 17:39:24,128 Xcode[432]: _AMDeviceSecureInstallTheBundleAlready (thread 0x127be6000): AMDeviceSecureInstallApplication failed: 
2015-08-29 17:39:24,132 Xcode[432]: _AMDeviceTransferAndInstall (thread 0x127be6000): _AMDeviceSecureInstallTheBundleAlready failed: 0xe8000067
falling back to file delta
2015-08-29 17:39:24,134 Xcode[432]: writeDictToFile:1239 open failed for /var/folders/vh/z7jrdtc16mv_ml4rdf3c_yf40000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode/93b97a6a8fc08d7d84994efa7c4f96fb/6f5103ee7f37d220cf45535ea8fb76a2de87a5e4/ManifestCache.plist : No such file or directory
2015-08-29 17:39:24,135 Xcode[432]: MDMCacheDirectoryManifest:1313 writeDictToFile failed to write to /var/folders/vh/z7jrdtc16mv_ml4rdf3c_yf40000gn/C/com.apple.DeveloperTools/6.4-6E35b/Xcode/93b97a6a8fc08d7d84994efa7c4f96fb/6f5103ee7f37d220cf45535ea8fb76a2de87a5e4/ManifestCache.plist : No such file or directory
2015-08-29 17:39:24,135 Xcode[432]: AMDeviceSecureInstallApplicationBundle (thread 0x127be6000): returning 0xe8000067
2015-08-29 17:42:46,372 Xcode[432]: <DYMobileDeviceTransport: 0x7fed3febc410>: read io failure: Broken pipe (32)
2015-08-29 17:42:46,373 Xcode[432]: CompanionProxy: _SocketReadCallback:128 (0x0x12786d000): Failed to receive response from AMDevice 0x7fed3feb40e0 {UDID = a84bc06ca4b54d9a575d111abe0a09d7a7b2377a, device ID = 8, FullServiceName = e0:66:78:c2:06:34@fe80::e266:78ff:fec2:634._apple-mobdev2._tcp.local.}: 0xe8000084
2015-08-29 17:42:46,374 Xcode[432]: CompanionProxy: _SocketReadCallback:200 (0x0x12786d000): Stopped listening for paired devices from AMDevice 0x7fed3feb40e0 {UDID = a84bc06ca4b54d9a575d111abe0a09d7a7b2377a, device ID = 8, FullServiceName = e0:66:78:c2:06:34@fe80::e266:78ff:fec2:634._apple-mobdev2._tcp.local.}: 0xe8000084

Update: This is, obviously, an error pertaining to special characters, but the problem from my point of view is:

更新:这显然是与特殊字符有关的错误,但从我的角度来看,问题是:

  • Which project properties are used as a base for the filenames? Product Namehas been suggested -- I don't doubt it -- but is there any documentation on this? I can't find any official description of the purpose of that property. What I didfind was a description of that property as "user facing", which has to be incorrect. Surely there isn't a user facing property in iOS 7 that only allows ASCII?
  • 哪些项目属性用作文件名的基础?Product Name已经有人建议了——我不怀疑——但是有没有关于这个的文件?我找不到有关该财产用途的任何官方说明。我确实发现了将该属性描述为“面向用户”的描述,这肯定是不正确的。iOS 7 中肯定没有只允许 ASCII 的面向用户的属性吗?

回答by Stefan Edenfeld

I had the same problem! You need to change your product name under build settings for iOS 7. Special characters are not allowed for iOS 7 devices (?ka Strax)

我有同样的问题!您需要在 iOS 7 的构建设置下更改您的产品名称。iOS 7 设备不允许使用特殊字符(ka Strax)