I wrote a program in the 3.2 SDK. I just upgraded to the new 4.2 SDK today. I can run the application fine in the 3.2 simulator. When I switch to the 4.2 simulator, the application crashes right after launching. I get the following error:
"Failed to load NSMainNibFile MainWindow"
I'm not understanding how this runs fine with 3.2 and not 4.2. Any suggestions would be much appreciated.
I had this exact thing happen to me. I
traced it to a bunch of missing Nib
files Target > [App Name] > Copy
Bundle resources. The MainWindow.xib
file was missing in this directory
along with a bunch of other files. I
deleted all the nib files from my
Resources directory (only the
references) and then added the
existing files back and everything
started working again. It definitely
looks like an XCode bug.
from - http://www.iphonedevsdk.com/forum/iphone-sdk-development/4958-failed-load-nsmainnibfile-mainwindow.html
Related
Using Xcode 5.1 to debug an iOS 7.1 iPad application.
When I build and run my project in the iOS Simulator, the simulator opens and my app icon pops up for a second. Then it looks like the app stops installing and the simulator goes to the home screen. Xcode still thinks it's debugging and it doesn't show any errors in Xcode or the simulator. I can go to my app in the simulator and click it again, but it just crashes. I get the same behavior in iPad, iPad Retina, and iPad Retina (64 bit). Any subsequent tries to run the app in the simulator doesn't even attempt to pop the app icon up until I quit the iOS Simulator and try again. All the usual fixes haven't worked for me yet.
Fixes I've Tried:
1. iOS Simulator > Reset Content and Settings...
2. Window(in Xcode) > Organizer > Delete Derived Data & Delete Snapshots
3. Delete Contents in ~/Library/Application Support/iPhone Simulator
4. Uninstall Xcode and reinstall
5. Clean project and rebuild
6. Restart machine
I'm out of ideas. Is there something I've missed?
Thanks all!
Create another app with the exact same template and look at the app delegates and make sure they are the same.
Example: AppDelegate.h and AppDelegate.m
You might've accidentally deleted an area that helps load the App.
Alright I found the problem. I was playing with how we load our frameworks because we were having other issues before and I left a bad value in our Linking settings.
Here's how I fixed it:
Project > Build Settings > Linking > Mach-O Type set to "Executable"
It was set to "Bundles" before which causes Xcode to package the app in a way that caused ours to break.
Helpful Post: In Xcode project target build settings, What is Mach-O Type?
I created a tabbed application with xCode 5.01, recently downloaded from Apple, and put nothing else in it. It runs fine on the simulator, but when I try to run it on my iPhone 4S, which has OS6 on it, the build fails with these errors:
UIKit/UIKit.h is not found.
The Prefix.pch file is not found.
I looked everywhere and changed the deployment target to 6.0, but it doesn't solve the issue. What's going on?
EDIT: also, following an advice, I deleted the UIKit framework, but when I tried to re-add it (as per the advice) it turns out it's not there.
EDIT 2: Reinstalling xCode solved the issue. Go figure.
Reinstall XCode 5, it is still quite buggy, also when renaming folders, this can cause corrupt data structure inside the project file.
I recently updated both OSX and Xcode. Now I can't open any storyboard, because Xcode crashes every time I try to. I downloaded Xcode 5.0.1, tried to run the project on different OSX user's account - nothing changed.
Error log: http://hastebin.com/dapitesalu.avrasm
What can cause the problem?
I've updated to the latest version of Xcode 4.5.1 and I have some troubles. When I build debug version of the project and run it on iOS simulator everything works just fine. But when I switched to release flavour in project schema and build project nothing happened. I mean project runs on simulator, but Build folder of my project remains empty.
I tried to follow this advice
Why doesn't Xcode 4 create any products?
but in the created folder DerivedData there are only logs and indexes folders and no .app files.
So the question is: How to get executable on real iOS6 device .app file in Xcode 4.5.1? I'm really a newbie and the delivery/deployment process in iOS is unknown to me.
Change your choice of deployment devices to an actual iOS device (don't use the simulator). After that, execute an "Archive" build (Product -> Archive). This option will be grayed out if you don't choose to deploy to an actual iOS device.
I got a application from my teammate, and it is for both iphone and ipad devices (which it is developed under iPhone SDK 3.2).
I have iPhone SDK 3.1.3 installed in my mac book. When i tried to compile the application for iphone simulator i got the following error.
Interface builder is unable to open documents of type iPad XIB.
The above error is for interface builder created for ipad.
My Question is we can't compile the application on iPhone SDK 3.1.3 which the application developed under iPhone SDK 3.2?
Please shed some light of this?
thanks
mindus
Go to your project settings, and delete the line that says Interface Builder Plugin search path or something similar.
the exact line in project.pbxproj is: IBC_PLUGIN_SEARCH_PATHS = "${PROJECT_DIR}/**";
Short answer
Temporarily remove the iPad xib when working with the 3.1.3 SDK. Put them back when you go back to 3.2 and above.
Longer answer
This cropped up for me when compiling against 3.1.3. You can use conditional compiling to get code user newer features to build successfully (see Matt Gallagher's helpful post on conditional compiling).
There may be a smarter way to tell the compiler not to look at the iPad xibs. For testing on the 3.1.3 simulator I simply made a copy all my iPad xibs and then removed them from the xcode project. When going back to my current development set up, you have to put them back. It's a bit of pain, but not that fiddly.
To fix this:
Press Command-1 to go to the project tree
Select your project
The in the right panel select your project, and then click on "Build Settings"
In search field just below the "Build Settings" enter: "Overriding Plug-In"
Now, the only visible setting left should say "Overriding Plug-In and Framework Directory"
Double-click the value and remove all entries using "-" button
Click somewhere else so settings are saved
That should fix it