Database Error : Compiling app on iphone device
Posted
by Amarpreet
on Stack Overflow
See other posts from Stack Overflow
or by Amarpreet
Published on 2010-06-07T07:45:45Z
Indexed on
2010/06/07
7:52 UTC
Read the original article
Hit count: 381
iphone
|iphone-sdk
Hi guys
I am getting a problem when i compile my iphone database application to device. When i debug the code it says database path "out of scope" on the break point and it does not compile the statement. Below is the code i am using to access the database.
databaseName = @"Zen.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES); NSString *documentsDir=[documentPaths objectAtIndex:0]; databasePath=[documentsDir stringByAppendingPathComponent:databaseName];
It works perfectly fine when i use the same code on simulator. Please help me to get this work on iphone device as well. Thanks.
© Stack Overflow or respective owner