Program received signal SIGABRT error - xcode

I'm developing an iPhone app in which I have to call a REST service from iPhone. I did it successfully and got the response successfully. But later I have changed the xib file so that I want to display the output on a label. Then after changing the xib file when I run the application I'm getting the following exception:
Program received signal SIGABRT
in the following code? Since I'm a beginner in iPhone development, I don't know how to fix this error. Here is my code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window.rootViewController = self.viewController; ///error at this line///
[self.window makeKeyAndVisible];
return YES;
}
How to fix this error?
Thanks!

In the IphonedevsdkViewController XIB you have to connect the topmost view to the view outlet of the File Owner.

Related

xcode 4.5.2 Can't make tabbared application

I have xcode 4.5.2. I've tried for a whole day but i couldn't manage to find an appropriate tutorial or sample to create a tab bar application
If i create a tabbed application, i don't know how to add tabs into controller.
If i create an empty application, i can not start it with tab bar controller on window.
I created a xib file. Make it the main source interface source in targets. Add a window and a tabbarcontroller there and link them with the outlets of the appDelegate.
In appDelegate.m in the didFinishLaunchingWithOptions i add the following code
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window addSubview:self.tabbarController.view];
[self.window makeKeyAndVisible];
and nothing helps.
What's the matter?
How can I do that?
Look at this tutorial may help you ,
Creating a Tab Bar Application Using Storyboards.

How to set Main Inerface in xCode programatically

I am using Apples MultipleDetailViews http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html
for template as a source for my iPad app. The template is using a splitviewController in the interface builder (MainWindow). In the iPhone/iPad Deployment info of the target, MainWindow is set as the "Main Interface".
I want my app to also run on iPhone. This means I need to load a different xib when the app is run on an iPhone. I must then remove "MainWindow" from "Main Interface" because the app will crash when I load on an iPhone due to the splitViewController.
The AppDeleagte of the template look like this:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = self.splitViewController;
[self.window makeKeyAndVisible];
}
If I remove "Main Window" from "Main Interface", how do I then need to change the APpDelegate, or maybe I need to change the MainWindow.xib to also work for iPhone?
I found the answer myself, and I am ashamed about how simple it really was. There is one "Main Interface" for iPhone, and one for iPad :-S. All this messing around for nothing :-(

Xcode 4.5: Getting error "loaded the nib but the view outlet was not set"

After updating to Xcode 4.5 beta I have this error. I don't get the same error if I run the project by Xcode 4.3.3.
'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "LocationList" nib but the view outlet was not set.'
"LocationList" is a custom cell and the owner is a subclass of UITableViewController. I tried to subclass it to UIViewController and connect it to "view" in IB but then it doesn't recognize [self.tableview reloadData];
I had the same issue and what I did was just overriding the loadView method. So weird new Xcode cannot figure that it is not supposed to load the TableView from the Nib when we override the UITableViewConroller (in my case I did not use IB to put a TableView, just created a new class which is a subclass of UITableViewController, this works fine in Xcode 3.3 but not in 4.5).
This would definitely fix your issue,
-(void)loadView {
[super loadView];
}
but I am not so sure about the cause for this.

Why does iphone simulator in xcode 4.3.2 come up with a blank white screen?

I have a major problem. My app was working perfectly fine back in xcode 4.2 and in iOS 5.0. However, when I updated to xcode 4.3.2 and iOS 5.1, I ran into an issue.
When I try running my app now, ios simulator comes up with my splash screen and then a blank white screen with a status bar. I also get
2012-04-08 20:46:48.025 Birdflix[67666:fb03] Application windows are expected to have a root view controller at the end of application launch
in the log.
Please help, I really need to publish my app. Thanks in advance.
Please set self.window.rootViewController in
the application:didFinishLaunchingWithOptions: method in AppDelegate.m.
Sorry, I haven't Xcode4.3.2, not always say rightly.
xcode 4.2, don't use MainWindow.nib, so you should specify self.window.rootViewController.
the rootViewController is the ViewController that AppDelegate's view controller in
previous version's MainWindow.nib.
Suppose the class is RootViewController, then
#import "RootViewController.h"
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.window.rootViewController = [[RootViewController alloc] init];
[self.window.makeKeyAndVisible];
return YES:
}

iPad: Launch MainWindow.xib's primary view without using InterfaceBuilder confi

I get really confused using InterfaceBuilder to setup the main window xib file's primary controller view. Is there a good example or simple way to launch the ViewController I want to show by default in the Application Delegate instead of setting it up in InterfaceBuilder's MainWindow.xib file?
you can show your view by code as
FirstViewController *fvc = [[FirstViewController alloc] init];
[window addSubView:fvc];

Resources