xcode “此时无法安装此应用程序”CFBundleIdentifier 错误

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

"This app could not be installed at this time" CFBundleIdentifier error

iosswiftxcodeswift4cfbundleidentifier

提问by KevinLauOfficial

I encountered the "This app could not be installed at this time" error. I have tried several methods such as reloading the simulator, deleting the app in the simulator and cleaning the Xcode project. However, it still has this error. I turned to the CoreSimulator file and found an error because of the CFBundle Identifier. Here is the log below:

我遇到了“此时无法安装此应用程序”错误。我尝试了几种方法,例如重新加载模拟器,删除模拟器中的应用程序和清理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}}}

Sorry I couldn't turn it to code format. Here is a screenshot: Screenshot of error

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

DBS.app/Frameworks/HandySwift.framework did not have a CFBundleIdentifier in its Info.plist}}} shows that the HandySwift.framework did not have a CFBundleIdentifier in its Info.plist . What should I add to the property list? Here is a screenshot of my Info.plist.

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

info.plist

信息.plist

Please help me fix this error, thanks a lot!

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

回答by COVID19

I have faced same issue. After long research find below solution. Please follow it, I am sure it will work for you.

我遇到了同样的问题。经过长时间的研究,找到以下解决方案。请遵循它,我相信它会对你有用。

Solution: 1

解决方案:1

Erase All content and settings.

Clean your project

擦除所有内容和设置。

清理你的项目

Solution: 2

解决方案:2

Changing the CFBundleShortVersionString in InfoPlist.strings to match the one in info.plist fixed this for me. I had to use the simulator's "Erase All Content and Settings" after making this change.

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

Solution: 3

解决方案:3

I deleted pods from project and installed it again and it surprisingly works fine.

我从项目中删除了 pods 并重新安装了它,它令人惊讶地工作正常。

For remove pod file:

对于删除 pod 文件:

pod deintegrate

For install pod:

对于安装吊舱:

pod install

Then run again your project.

然后再次运行您的项目。

回答by nishee

Make Target membership tic-mark

制作 Target 会员资格

enter image description here

在此处输入图片说明

OrUninstall your pod file and reinstall pod file

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

回答by Tr??ng Th? H??ng Giang

I also meet this problem. The reason why I meet this error is that I changed the bundle Id only the general of Menu of the project. You must also change it Test and UiTest too. After I change them, the problem is solved.

我也遇到这个问题。我遇到这个错误的原因是我把bundle Id只改成了项目Menu的一般。你也必须改变它 Test 和 UiTest 。我更改它们后,问题就解决了。

回答by Eli Zhang

XCode: 11.3.1 Cocoapods: 1.9.1

XCode:11.3.1 Cocoapods:1.9.1

None the previous solutions worked for me.

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

This should be related to the pod info.plistfile setting. You might want to select Pods directory in the navigation panel of XCode and then set the info list files for each pod framework.

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

Image - Correctly placed identity of each pod framework

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

If there's anything goes wrong with this, there will be a button to choose the info.plistfile.

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

Just click on that button and navigate to the bottom of the Pods directory from popup file dialog, and select your project's pods-info.plistfile. It will automatically assign the correct identity for that pods framework like you see in the above image. This will solve the problem.

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