mbahadirb
mbahadirb

Reputation: 25

Can't run application in iOS 6.0 or 6.1

I am currently developing an application for iOS 6 and 7. I am using storyboards for the first time. When I use an iPhone or simulator with iOS 7 my app works fine.

However when I tried to run it on an iOS 6 or 6.1 it crashes with below error:

 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithString:]: nil argument'

Note: My Deployment Target is 6.0, but my Base SDK is Latest(iOS 7.0).

Upvotes: 1

Views: 1335

Answers (2)

Holly
Holly

Reputation: 5290

I encountered such an issue when I updated to iOS 7 as well. The problem ended up being connected to the use of UITextField. Using the iOS 7 SDK and compiling for iOS 6, an empty text field returns nil instead of @"". As a result, if you do something like

NSMutableString *myString = [[NSMutableString alloc] initWithString:self.myTextField.text];

it will cause your code to explode as you are describing.

Upvotes: 1

Ajay
Ajay

Reputation: 1622

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSPlaceholderString initWithString:]: nil argument'

It clearly states about the exception that you are having an NSString object in your code somewhere which is getting the nil argument. So try to place breakpoint and use the debugger to check that where your NSString object is getting the nil argument and try to correct it accordingly.

Upvotes: 0

Related Questions