Xcode 6 中带有私有框架的应用程序“无法检查应用程序包”。缺少框架 info.plist

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26001321/
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 05:40:29  来源:igfitidea点击:

Application with private framework "could not inspect application package" in Xcode 6. Missing framework info.plist

iosiphonexcodexcode6

提问by AnthonyMDev

My application built and ran just fine in Xcode 5. I upgraded to Xcode 6 yesterday and now the application builds, but will not run on my device or in simulator.

我的应用程序在 Xcode 5 中构建并运行得很好。我昨天升级到 Xcode 6 现在应用程序构建,但不会在我的设备或模拟器上运行。

I'm getting the error "could not inspect application package" when trying to run.

尝试运行时出现错误“无法检查应用程序包”。

I checked my device logs (XCode > Windows > Devices) and after trying to run the application, I get the following error in my log:

我检查了我的设备日志(XCode > Windows > Devices),在尝试运行应用程序后,我的日志中出现以下错误:

Sep 23 10:32:46 XXXXXX's-iPhone streaming_zip_conduit[5476] : __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/ActivateMachines.app/ : Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x1355075a0 {Error=PackageInspectionFailed, ErrorDescription=Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.5lz5TS/extracted/ActivateMachines.app/Frameworks/GeLoSDK.framework}

9 月 23 日 10:32:46 XXXXXX 的 iPhone streaming_zip_conduit[5476]:__dispatch_source_read_socket_block_invoke:203:无法在 file:///var/mobile/Media/PublicStaging/ActivateMachines.app/ 安装应用程序:错误域=代码=“启动服务”操作无法完成。(LaunchServicesError 错误 0。)” UserInfo=0x1355075a0 {Error=PackageInspectionFailed,ErrorDescription=无法从路径 /private/var/mobile/Library/Caches/com.apple 的包中加载 Info.plist。 mobile.installd.staging/temp.5lz5TS/extracted/ActivateMachines.app/Frameworks/GeLoSDK.framework}

I've checked that the GeLoSDK.framework does have a Resources/Info.plist file.

我已经检查过 GeLoSDK.framework 确实有一个 Resources/Info.plist 文件。

I'm using this framework: https://github.com/GeLoInc/GeLoSDK-iOS

我正在使用这个框架:https: //github.com/GeLoInc/GeLoSDK-iOS

It should be linked properly, as it was working on Xcode 5.

它应该正确链接,因为它在 Xcode 5 上工作。

Did something change in Xcode 6 that I'm not aware of? Thanks for any help.

Xcode 6 中有什么我不知道的变化吗?谢谢你的帮助。

采纳答案by AnthonyMDev

I was able to get the application to build by moving the framework into "/Library/Frameworks" and adding it to the project from there.

我能够通过将框架移动到“/Library/Frameworks”并将其从那里添加到项目中来构建应用程序。

Previously, I had been using the framework by bundling it in with the application directly and linking the binary manually. This worked fine in Xcode 5, but not in Xcode 6.

以前,我一直通过将框架直接与应用程序捆绑在一起并手动链接二进制文件来使用该框架。这在 Xcode 5 中运行良好,但在 Xcode 6 中无效。

I'm not sure if this is a new bug in Xcode 6, or what changed, but using "/Library/Frameworks" solved the problem.

我不确定这是 Xcode 6 中的一个新错误,还是发生了什么变化,但使用“/Library/Frameworks”解决了这个问题。

回答by Chris Livdahl

I had this problem with the GoogleInteractiveMediaAds.framework:

我在 GoogleInteractiveMediaAds.framework 上遇到了这个问题:

com.apple.CoreSimulator.CoreSimulatorService[522]: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=PackageInspectionFailed, ErrorDescription=Failed to load Info.plist from bundle at path /Users/XXX/Library/Developer/CoreSimulator/Devices/B5E6B8A7-017D-4FC2-9C22-0698DFD0AC13/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ha6x7D/extracted/XXX-ios.app/Frameworks/GoogleInteractiveMediaAds.framework} configd[54]: inet_set_autoaddr(en0, 1) failed, Resource busy (16)

com.apple.CoreSimulator.CoreSimulatorService[522]: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=PackageInspectionFailed, ErrorDescription=无法从路径/Users/XXX/Library/Developer的包中加载Info.plist /CoreSimulator/Devices/B5E6B8A7-017D-4FC2-9C22-0698DFD0AC13/data/Library/Caches/com.apple.mobile.installd.staging/temp.Ha6x7D/extracted/XXX-ios.app/Frameworks/GoogleInteractiveMediaAdconfigs.framework} [54]:inet_set_autoaddr(en0, 1) 失败,资源繁忙 (16)

What worked for me was removing GoogleInteractiveMediaAds.framework from the Embed Frameworks in Build Phases for my app target.

对我有用的是从我的应用程序目标的构建阶段中的嵌入框架中删除 GoogleInteractiveMediaAds.framework。

回答by Bunny Lin

if you keep having problem in running app with custom framework and the log from simulator are as following:

如果您在使用自定义框架运行应用程序时一直遇到问题,并且模拟器的日志如下:

Oct 21 16:27:54 bunnydembp com.apple.CoreSimulator.CoreSimulatorService[1936]: Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x7fb7954c16c0 {Error=PackageInspectionFailed, ErrorDescription=Failed to load Info.plist from bundle at path /Users/bunny/Library/Developer/CoreSimulator/Devices/10D9FDBC-13B5-420B-9B9E-365E05551830/data/Library/Caches/com.apple.mobile.installd.staging/temp.4mi9Mn/extracted/radio365.app/Frameworks/SOME.framework}

10 月 21 日 16:27:54 bunnydembp com.apple.CoreSimulator.CoreSimulatorService[1936]:错误域=LaunchServicesError Code=0“操作无法完成。(LaunchServicesError 错误 0。)” UserInfo=0x7fb7954c16c0 {Error=PackageInspection ErrorDescription=无法从路径 /Users/bunny/Library/Developer/CoreSimulator/Devices/10D9FDBC-13B5-420B-9B9E-365E05551830/data/Library/Caches/com.apple.mobile.installd.staging 处的包加载 Info.plist /temp.4mi9Mn/extracted/radio365.app/Frameworks/SOME.framework}

you need to add/alias info.plistin framework sub path like this: http://i.stack.imgur.com/e8Dz2.png

你需要add/alias info.plist在这样的框架子路径中:http: //i.stack.imgur.com/e8Dz2.png

if you use the build script from http://blog.db-in.com/universal-framework-for-ios/you can just add following in line 44

如果您使用来自http://blog.db-in.com/universal-framework-for-ios/的构建脚本, 您只需在第 44 行添加以下内容

#ios8 bug in xcode 6.0.1 and 6.1
ln -s "${INSTALL_DIR}/Versions/${FMK_VERSION}/Resources/Info.plist" "${INSTALL_DIR}/Info.plist"

回答by Jeremy Huddleston Sequoia

I suspect that you really don't have an Info.plist in that bundle but that the error was being ignored and not reported in previous versions. Make sure you are really installing your Info.plist for GeLoSDK.framework.

我怀疑您在该包中确实没有 Info.plist 但错误被忽略并且未在以前的版本中报告。确保您真的为 GeLoSDK.framework 安装了 Info.plist。