ios 无法从包中加载 Info.plist

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

Failed to load Info.plist from bundle

iosxcodeswift3ios-simulatoralamofire

提问by Chanchal Raj

Cannot run app. Failed to load Info.plist from bundle error occurs. When I CMD+Kclean the project, it runs fine. But I have to clean the project every time I make changes and run the app.

无法运行应用程序。无法从包中加载 Info.plist 错误发生。当我CMD+K清理项目时,它运行良好。但是每次我进行更改并运行应用程序时,我都必须清理项目。

enter image description here

在此处输入图片说明

Following is the screenshot of my podfile: enter image description here

以下是我的 podfile 的屏幕截图: 在此处输入图片说明

回答by Reema

I had tried all suggestion and none of them work Then I tried to Reset content and Settingof simulator and it worked for me. :)

我已经尝试了所有建议,但没有一个工作然后我尝试重置模拟器的内容和设置,它对我有用。:)

回答by Musa almatri

Simply

简单地

Just quitthe simulator and open it again and it should works fine

只需退出模拟器并再次打开它,它应该可以正常工作

回答by Vinay Krishna Gupta

1: Remove app from simulator,

1:从模拟器中删除应用程序,

2: Product > Clean ,

2:产品>清洁,

3: Simulator > Hardware > Reboot ,

3:模拟器>硬件>重启,

It solved my problem. In case it doesn't resolved, change your bundle identifier.

它解决了我的问题。如果它没有解决,请更改您的包标识符。

回答by Aashish

This error occurs due to 'RealmSwift'. When you try to write in realm in certain directory, this error occurs, due to the conflicts in overwriting with realm.

由于“ RealmSwift”而发生此错误。当你尝试在某个目录的realm中写入时,会出现这个错误,因为与realm的覆盖冲突。

You may want to Reset Content & Settingsin simulatorand also try cleaning your build folder in Xcodeusing Cmd+Shift+Option+K

您可能想在模拟器中重置内容和设置,并尝试使用Cmd+Shift+Option+KXcode 中清理您的构建文件夹

回答by Lê T?n Thành

It was duplicated frameword when you config. Please check again in Embedded Binaries and Linked Frameworks and Libraries. With some frameworks, you don't need add in both sections, please remove one. It worked with me

配置时它是重复的框架字。请再次检查嵌入式二进制文件和链接框架和库。对于某些框架,您不需要在两个部分都添加,请删除一个。它和我一起工作

回答by Daniel Zhang

I encountered this error in one of my projects and narrowed down a set of exact conditionsthat are able to reproduce it, thereby preventing installation to the simulator.

我在我的一个项目中遇到了这个错误,并缩小了一组能够重现它的确切条件,从而阻止安装到模拟器。

With Xcode 10.2.1, I was testing linking a framework. I noticed in the project navigator panel that two instances of it were present. This could have been due to my multiple attempts.

使用 Xcode 10.2.1,我正在测试链接框架。我注意到在项目导航器面板中存在两个实例。这可能是由于我的多次尝试。

Inside the Xcode project package, I opened the file MyProject.xcodeproj/project.pbxprojand confirmed that the two instances were identical. The following snippet shows an example of how this was represented.

在 Xcode 项目包中,我打开文件MyProject.xcodeproj/project.pbxproj并确认两个实例是相同的。以下代码段显示了如何表示的示例。

/* Begin PBXFileReference section */
...
    65C8CE8522CA0D3500271FFD /* MyFrameworkForiOS.framework */ = { 
        isa = PBXFileReference; 
        lastKnownFileType = wrapper.framework; 
        name = MyFrameworkForiOS.framework; 
        path = "../my-frameworks/out/MyFrameworkForiOS.framework"; sourceTree = "<group>"; 
    };
    65C8CE8722CA0D3800271FFD /* MyFrameworkForiOS.framework */ = {
        isa = PBXFileReference; 
        lastKnownFileType = wrapper.framework; 
        name = MyFrameworkForiOS.framework; 
        path = "../my-frameworks/out/MyFrameworkForiOS.framework"; sourceTree = "<group>"; 
    };
...
/* End PBXFileReference section */

By removing a duplicate referencein the project navigator (with command-backspace), I was able to install my app to the simulator without the error.

通过删除项目导航器中的重复引用(使用命令退格键),我能够将我的应用程序安装到模拟器而不会出现错误。

What didn't matter was the contents of Info.plistin my framework as it only had an empty root dictionary. Therefore, the error message may be misleading relative to the actual cause.

无关紧要的是Info.plist我框架中的内容,因为它只有一个空的根字典。因此,错误消息相对于实际原因可能具有误导性。

回答by Suke

It is annoying. Temporary I remove app on simulator then rebuild project work but still waiting for a better solution This problem likely to a problem with core data i have meet in the past.

这很烦人。临时我在模拟器上删除应用程序然后重建项目工作但仍在等待更好的解决方案这个问题可能是我过去遇到的核心数据问题。

Update: this solution work for me: https://stackoverflow.com/a/24042126/5387768

更新:这个解决方案对我有用https: //stackoverflow.com/a/24042126/5387768

回答by pegpeg

Remove the app from the Simulator worked well.

从模拟器中删除应用程序运行良好。

回答by kubilay

I had this problem when integrating Firebase to my project. The issue was that Xcode automatically configured project to "Embed&Sign" the libraries when I drag&drop them into "Framworks, Libraries, and Embedded Content" section.

将 Firebase 集成到我的项目时遇到了这个问题。问题是当我将库拖放到“框架、库和嵌入内容”部分时,Xcode 自动将项目配置为“嵌入和签名”库。

To fix that, I manually set them to "Do Not Embed".

为了解决这个问题,我手动将它们设置为“不嵌入”。

回答by Amit Patel

Search for "Erase all content and settings" in help for emulator

在模拟器的帮助中搜索“擦除所有内容和设置”