Share sqlite database between app and extension Share sqlite database between app and extension database database

Share sqlite database between app and extension


Apps and their extensions are separate processes, so iOS sandboxing normally means they can't touch each other's files. The page you reference doesn't appear to address this in any way.

If you want to use the same SQLite file in both your app and the extension, you need to configure the "app groups" entitlement for both of them. That sets up a new directory that both of them can access, and you put your SQLite file there. You find this directory by using the containerURLForSecurityApplicationGroupIdentifier: method on NSFileManager.

It's not clear to me whether the GitHub project you're using will make use of app groups. There's no other way to share your SQLite file, though. If that project doesn't use app groups, you'll need to either fix it so that it does or stop using it.