Craig
Craig

Reputation: 556

Thread 1: signal SIGABRT xcode 4.4 ios 5.1 objective-c HELP >.<

Ok so yesterday I had some trouble with this error, turned out I just needed to be patient and read through more of the book. This time I have got to the end of the project and I am getting this error at a different point.

I have isolated the line of code causing the issue but I'm not sure what the issue is!

htmlString=[htmlString stringByAppendingString: appDelegate.savedNumber];

Debug console is saying:

2012-08-09 13:06:47.235 tester[1357:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSCFConstantString stringByAppendingString:]: nil argument'

*** First throw call stack:
(0x14b3022 0xeb3cd6 0x145ba48 0x145b9b9 0x941b92 0x29bd 0xdda1e 0x3c401 0x3c670 0x3c836 0x4372a 0x24c2 0x14386 0x15274 0x24183 0x24c38 0x18634 0x139def5 0x1487195 0x13ebff2 0x13ea8da 0x13e9d84 0x13e9c9b 0x14c65 0x16626 0x20e2 0x2055)
terminate called throwing an exception

Anyone have any ideas? :)

Upvotes: 1

Views: 2609

Answers (2)

sergeyne
sergeyne

Reputation: 1318

It is because appDelegate.savedNumber is nil (does not set) . And why it is nil this is another question.

Upvotes: 3

ksh
ksh

Reputation: 1904

Looks like exactly what's written, you're passing nil argument to the method. Check if your savedNumber is a valid string object.

Upvotes: 2

Related Questions