1

我遇到了“此时无法安装此应用程序”错误。我尝试了几种方法,例如重新加载模拟器,删除模拟器中的应用程序和清理Xcode项目。但是,它仍然有这个错误。我翻到CoreSimulator 文件,发现因为CFBundle Identifier 的错误。这是下面的日志:

Apr 26 18:49:49 kevins-air com.apple.dt.Xcode[27210] <Error>: installApplication:withOptions:error:: Error Domain=IXUserPresentableErrorDomain Code=1 "This app could not be installed at this time." UserInfo={NSLocalizedDescription=This app could not be installed at this time., NSUnderlyingError=0x7faad5709050 {Error Domain=MIInstallerErrorDomain Code=12 "Bundle at path /Users/kevinlauofficial/Library/Developer/CoreSimulator/Devices/0EB4D69B-61C8-468B-9D3D-2D6761E1D9D6/data/Library/Caches/com.apple.mobile.installd.staging/temp.IMKy1v/extracted/DBS.app/Frameworks/HandySwift.framework did not have a CFBundleIdentifier in its Info.plist" UserInfo={LegacyErrorString=MissingBundleIdentifier, FunctionName=-[MIBundle _validateWithError:], SourceFileLine=45, NSLocalizedDescription=Bundle at path /Users/kevinlauofficial/Library/Developer/CoreSimulator/Devices/0EB4D69B-61C8-468B-9D3D-2D6761E1D9D6/data/Library/Caches/com.apple.mobile.installd.staging/temp.IMKy1v/extracted/DBS.app/Frameworks/HandySwift.framework did not have a CFBundleIdentifier in its Info.plist}}}

抱歉,我无法将其转换为代码格式。这是一个屏幕截图: 错误截图

DBS.app/Frameworks/HandySwift.framework 在其 Info.plist 中没有 CFBundleIdentifier}}} 表明 HandySwift.framework 在其 Info.plist 中没有 CFBundleIdentifier。我应该在属性列表中添加什么?这是我的 Info.plist 的屏幕截图。

信息列表

请帮我解决这个错误,非常感谢!

4

4 回答 4

9

我遇到了同样的问题。经过长时间的研究,找到以下解决方案。请关注它,我相信它会为你工作。

解决方案:1

抹掉所有内容和设置。

清理你的项目

解决方案:2

更改 InfoPlist.strings 中的 CFBundleShortVersionString 以匹配 info.plist 中的那个为我解决了这个问题。进行此更改后,我必须使用模拟器的“擦除所有内容和设置”。

解决方案:3

我从项目中删除了 pod 并再次安装它,它工作得非常好。

对于删除 pod 文件:

pod deintegrate

对于安装吊舱:

pod install

然后再次运行您的项目。

于 2018-04-26T11:55:42.117 回答
2

使 Target 会员资格 tic-mark

在此处输入图像描述

或者卸载您的 pod 文件并重新安装 pod 文件

于 2018-04-26T11:12:10.707 回答
2

XCode:11.3.1 Cocoapods:1.9.1

以前的解决方案都不适合我。

这应该与podinfo.plist文件设置有关。您可能希望在 XCode 的导航面板中选择 Pods 目录,然后为每个 pod 框架设置信息列表文件。

图片 - 每个 pod 框架的正确放置标识

如果这有什么问题,会有一个按钮来选择info.plist文件。

只需单击该按钮并从弹出文件对话框导航到 Pods 目录的底部,然后选择您的项目pods-info.plist文件。如上图所示,它将自动为该 pod 框架分配正确的身份。这将解决问题。

于 2020-05-11T20:36:11.360 回答
0

我也遇到这个问题。我遇到这个错误的原因是我只更改了项目菜单的常规包ID。您还必须更改它 Test 和 UiTest 。在我改变它们之后,问题就解决了。

于 2019-10-08T08:14:42.207 回答