简体   繁体   English

我的应用程序在iPad模拟器上运行良好,但在iPad(iOS 8.4)上崩溃了,xcode显示无法捆绑捆绑NIB

[英]My app works well on iPad simulator but crashed on iPad(iOS 8.4) ,the xcode says Could not load NIB in bundle

Here is the full message i got: 这是我收到的完整消息:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/EA93D8D1-339F-4007-A5AA-671461179671/******.app> (loaded)' with name 'a0J-YD-TZi-view-qwI-Ja-FwJ''

I had searched a lot of answers about 'Could not load NIB in bundle',my condition seems different from these,i have never used a nib named a0J-YD-TZi-view-qwI-Ja-FwJ in my project. 我搜索了很多有关“无法将NIB装入捆绑包”的答案,我的情况似乎与此不同,我从未在项目中使用过名为a0J-YD-TZi-view-qwI-Ja-FwJ的笔尖。 there are two storyboard in my project(Main_iPad,Main_iPhone), and the app works well on iPhone and iPhone simulator. 我的项目中有两个情节提要板(Main_iPad,Main_iPhone),该应用程序在iPhone和iPhone模拟器上运行良好。 any help will be appreciate! 任何帮助将不胜感激!

Try resetting the Simulator and also cleaning your build folder. 尝试重置模拟器,并清理构建文件夹。

Another problem could be that the nib is part of the bundle resources that are copied to the app during building. 另一个问题可能是,笔尖是捆绑资源的一部分,捆绑资源在构建期间会复制到应用程序。 Can you check if the file is included in the Copy Bundle Resources build phase? 您可以检查文件是否包含在“副本捆绑资源”构建阶段中吗?

Might be this is happening due to iOS is case sensitive, simulator is not. 可能由于iOS区分大小写而不是模拟器而导致发生这种情况。 Make sure you use the correct file names, . 确保使用正确的文件名。 so if it works in simulator but not on device check the cases on the file name. 因此,如果它可以在模拟器中运行但不能在设备上运行,请检查文件名中的大小写。

Another thing is when you add a new file to the project xcode will automatically add it to the "Copy Bundle resources" section of your target. 另一件事是,当您将新文件添加到项目xcode时,它将自动将其添加到目标的“复制捆绑包资源”部分。

Sometimes, if you are collaborating with another person the project.pbxproj will get out of sync and this entry will get removed. 有时,如果您正在与其他人协作,则project.pbxproj将不同步,并且该条目将被删除。 The fix is to ensure that all the files in the Resources folder (that are required in the release) are also present in the "Copy Bundle resources" section, and if it isn't just drag it from the resources to that section. 该修补程序是为了确保“复制捆绑资源”部分中还存在“资源”文件夹中的所有文件(版本中必需的),如果不是,则仅将其从资源拖到该部分中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 '无法在包中加载 NIB:'NSBundle | 切换到 Xcode 4 并创建应用程序的 iPad 版本时出错 - 'Could not load NIB in bundle: 'NSBundle | Error while switching to Xcode 4 and creating an iPad version of an app iPad App:不断收到此错误“ NSInternalInconsistencyException”,原因:“无法在捆绑包中加载NIB - iPad App: Keep getting this error 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle iOS应用-无法在捆绑包中加载NIB - iOS App - Could not load NIB in bundle 应用程式可在模拟器上运作,但不适用于iPad - App works on simulator but not on iPad Phonegap应用程序可在iPad 3 ios 6上的模拟器上运行(苹果说) - Phonegap app runs on Simulator not on iPad 3 ios 6 (apple says) iOS - 无法加载包中的 NIB - iOS - Could not load NIB in bundle 应用程序仅在ipad模拟器4.3上崩溃 - App crashed on ipad simulator 4.3 only Xcode 我的应用程序无法在 iPad 模拟器中运行,但适用于 iPhone 模拟器 - Xcode my app won't work in the iPad simulator but works on iPhone simulators UIWebView在Simulator中效果很好,但在iPad设备中效果不佳 - UIWebView works well in Simulator but not in iPad device 将文件夹添加到iPad捆绑包适用于模拟器,而不适用于设备 - Adding folder to iPad bundle works on simulator, not on device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM