dimanche 25 mai 2014

iPad - n'a pas pu charger NIB en bundle: « NSBundle » - Stack Overflow


What is the error listed below?



2011-02-23 21:24:12.218 Success[7238:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/jimkillen12/Library/Application Support/iPhone Simulator/4.2/Applications/BAA5E0E7-AF12-4301-A4F8-1B9797C9E82D/Success.app> (loaded)' with name 'MainWindow-iPad''





in Build Phases -> expand Copy Bundle Resources -> press this at bottom (+) -> and add the required NIB file. Clean your build by shift+cmd+K Run problem will be solved.




Probably, you have named your NIB in a call by lowercase letters. The simulator works fine in this case, but an iPhone device will return an error during runtime.


For example,


DetailViewController *detailViewController = [[DetailViewController alloc]
initWithNibName:@"detailViewController" bundle:nil];

will fail. You need to change to:


DetailViewController *detailViewController = [[DetailViewController alloc]
initWithNibName:@"DetailViewController" bundle:nil];



In your Build Settings, Add Architecture =>> armv6 and armv7


I just removed my error using this




I have got the same problem, but it was because i wrote the extension .xib and it is not neccessary


token_view = [[GetToken alloc] initWithNibName:@"GetToken_iPad.xib" bundle:nil];

instead of


token_view = [[GetToken alloc] initWithNibName:@"GetToken_iPad" bundle:nil];



In my case was next:


I loaded in code XIB with name "??????Ipad" but XIB filename was "??????IPad"




Are there any warnings related to the NIB? This is usually do to an error in the NIB file (such as incorrect type of NIB).


Right click on the file and click "Get Info" to verify that the type is what you would expect.




Just check that file MainWindow.xib exist in your project. If not, just add the new interface file with name MainWindow.xib.




An other possible issue: you are using Base Localization on iOS 5 (caution, it kinda work on the iOS Simulator, but not on a device), but it is supported only starting from iOS 6.


For more info, see: Could not load nib in bundle base internationalization




Bah - i guess ~ or - does not matter. How did you create the .xib file? Check that the file is actually in your project. I noticed that when i created a .xib file it created it in the class folder of another project.



What is the error listed below?



2011-02-23 21:24:12.218 Success[7238:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/jimkillen12/Library/Application Support/iPhone Simulator/4.2/Applications/BAA5E0E7-AF12-4301-A4F8-1B9797C9E82D/Success.app> (loaded)' with name 'MainWindow-iPad''




in Build Phases -> expand Copy Bundle Resources -> press this at bottom (+) -> and add the required NIB file. Clean your build by shift+cmd+K Run problem will be solved.



Probably, you have named your NIB in a call by lowercase letters. The simulator works fine in this case, but an iPhone device will return an error during runtime.


For example,


DetailViewController *detailViewController = [[DetailViewController alloc]
initWithNibName:@"detailViewController" bundle:nil];

will fail. You need to change to:


DetailViewController *detailViewController = [[DetailViewController alloc]
initWithNibName:@"DetailViewController" bundle:nil];


In your Build Settings, Add Architecture =>> armv6 and armv7


I just removed my error using this



I have got the same problem, but it was because i wrote the extension .xib and it is not neccessary


token_view = [[GetToken alloc] initWithNibName:@"GetToken_iPad.xib" bundle:nil];

instead of


token_view = [[GetToken alloc] initWithNibName:@"GetToken_iPad" bundle:nil];


In my case was next:


I loaded in code XIB with name "??????Ipad" but XIB filename was "??????IPad"



Are there any warnings related to the NIB? This is usually do to an error in the NIB file (such as incorrect type of NIB).


Right click on the file and click "Get Info" to verify that the type is what you would expect.



Just check that file MainWindow.xib exist in your project. If not, just add the new interface file with name MainWindow.xib.



An other possible issue: you are using Base Localization on iOS 5 (caution, it kinda work on the iOS Simulator, but not on a device), but it is supported only starting from iOS 6.


For more info, see: Could not load nib in bundle base internationalization



Bah - i guess ~ or - does not matter. How did you create the .xib file? Check that the file is actually in your project. I noticed that when i created a .xib file it created it in the class folder of another project.


0 commentaires:

Enregistrer un commentaire