zhubch
zhubch

Reputation: 194

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. there are two storyboard in my project(Main_iPad,Main_iPhone), and the app works well on iPhone and iPhone simulator. any help will be appreciate!

Upvotes: 0

Views: 41

Answers (2)

Pradeep K
Pradeep K

Reputation: 3661

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?

Upvotes: 1

Vishal Rajole
Vishal Rajole

Reputation: 1544

Might be this is happening due to iOS is case sensitive, simulator is not. 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.

Sometimes, if you are collaborating with another person the project.pbxproj will get out of sync and this entry will get removed. 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.

Upvotes: 0

Related Questions