Pang Zi Yang
Pang Zi Yang

Reputation: 95

How can I view the data I retrieved from my .SQLITE database in my debug area using the NSLog command?

Whenever when I press build, it would give me the SIGABORT sign and goes back to the code. Do I need a usable storyboard view or without it I could see the output in the Debug Area

The code I used was

for (PokemonAbility *theability in items) {

 NSLog(@"Number: %@  Name: %@ Generation: %@ Desc: %@",theability.rowid, theability.abilityname, theability.abilitygeneration, theability.abilitydesc);

 }

Referenced from: Code Reference

Upvotes: 0

Views: 50

Answers (1)

Owen Hartnett
Owen Hartnett

Reputation: 5935

Hard to tell from what you wrote, but I bet that you're using raw data from SQLite, which is a C string, and using it in NSLog as an NSString. Try

[NSString stringWithCString:theability.rowid];

etc.

Upvotes: 1

Related Questions