Good day
I have an IOS messaging app. The app stores messages received and sent in a sqlite3 database and the app also generates log files. This can happen in foreground or as background tasks
When passcode is disabled on the IOS device everything works fine.The log files are created and the database entries can be inserted successfully in any mode of operation, even while the screen is off and the app minimised.
When the Iphone's screen is locked with a passcode it seems that the app can not access any files. My log file pointers stay null and I get this error when I try to add to the database: "sqlite_exec() -> disk i/o error."
The data protection capability is disabled. I am using background fetch and voip capabilities to execute background tasks. The code handling the database and log files are written in C and compiled separately.
Thanks
In iOS 15 and iPadOS 15, you no longer have to unlock the device, find the app on a Home screen page, and tap it. Instead, you can open an app directly from the Lock screen, assuming Settings > Face/Touch ID & Passcode > Today View and Search is turned on.
The swipe gesture to reveal Control Center from the Lock Screen should be enabled by default on your iPhone or iPad. Since, you are unable to access Control Center from the Lock Screen, it is likely that access to Control Center from the Lock Screen has been disabled on your device.
iOS encrypts the files when the phone is locked with a pass code. So if your really need to create new files while the application is running in background, you need to mark those parent folder in which you want to create folder as unprotected.
[[NSFileManager defaultManager] setAttributes:@{NSFileProtectionKey:NSFileProtectionNone} ofItemAtPath:[GlobalProvider tmpFolder] error:NULL];
[[NSFileManager defaultManager] setAttributes:@{NSFileProtectionKey:NSFileProtectionNone} ofItemAtPath:[GlobalProvider documentsFolder] error:NULL];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With