killswitch
killswitch

Reputation: 141

Simulator quits unexpectedly giving error, Springboard failed to launch error: -3

I am trying to make a basic Application with a background Gradient, Navigation Bar and a logo on it. When Launched in a simulator an error pops up, saying Springboard failed to launch error: -3

I am Using the Following two in code in the ViewController:-

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.navigationItem.title = @"Menu";
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(257, 3, 320, 44)];
    UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"ic_home.png"]];
    [image setFrame:CGRectMake(0, 0, 59, 36)];
    [view addSubview:image];
    [self.navigationController.navigationBar addSubview:view];
}


- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    //Add gradient background
    CAGradientLayer *bgLayer = [BackgroundLayer yellowGradient];
    bgLayer.frame = self.view.bounds;
    [self.view.layer insertSublayer:bgLayer atIndex:0];
}

Upvotes: 4

Views: 5451

Answers (4)

Eric Yang
Eric Yang

Reputation: 1022

Try reset the simulator

simulator -> reset contents and settings

It is worked for me

Upvotes: 0

Lukas Kalinski
Lukas Kalinski

Reputation: 2243

In my case, none of the above answers worked. So in my desperation I finally decided to revise all warnings and resolving them. It turned out that the root of the problem was that I was sending objects of wrong type to NSNumberFormatter and other classes/objects.

So in short: revise all your warnings and resolve all of them that mention pointer conversion problems.

Upvotes: 1

iceeggocean
iceeggocean

Reputation: 174

How about trying to delete the app from the simulator and restarting the simulator?

Upvotes: 1

blindman457
blindman457

Reputation: 293

not sure if this is the most technical answer but still...

Injectios is right, it's not your code (or at least my code never causes that) it's something to do with interface builder/putting files onto the simulator (from my experience).

Simply change the device that your building for and then switch back (for example, if developing for the 3.5" iPhone screen, click the 4" simulator and run, once it builds stop it and switch back to your target device) If you are using xcode 5 the list of devices is on the same toolbar as your Run and Stop buttons or go Product -> Destination

hope it helps

Upvotes: 1

Related Questions