Hi All,
Sqlite is not able to open database once device passcode enabled after reboot.
Here is precondition:
1) Passcode enabled on the device.
2) Reboot device.
3) Leave the device unlocked.
4) Cause my App is VoIP application, OS will launch my upon notification. for example, receiving a message, and user slide notification to open the app.
5) app try to open a database during
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *storePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:DATA_BASE_NAME];
int code = sqlite3_open([storePath fileSystemRepresentation], &m_DB);//Fail to open during reboot with passcode enabled
...
return TRUE;
}
6) open data base will fail.
All other case are working fine except the above case.
1) Unlock device, tap to launch. Pass
2) Reboot device with no passcode, slide to open app, Pass
I think it is because that pass code enabled after Reboot, OS restrain app from accessing data.
How to hanlde this case, or any idea?
Thanks,