1

I am writing this little tool to query and update sqlite databases.

the database files that we need to query are not located in the sandbox but are external files.

when I sandbox the app it can access the .db file not not wal or the shm files preventing me from updating the database.

Now after the docs on sandboxing it mentions something about related files.

but it also says

Note: In the case of a SQLite journal file, beginning in 10.8.2, journal files, write-ahead logging files, and shared memory files are automatically added to the related items list if you open a SQLite database, so this step is unnecessary.

i also added this to my plist file

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>db</string>
            <string>sqlite</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>SQLite Database</string>
        <key>CFBundleTypeOSTypes</key>
        <array>
            <string>****</string>
        </array>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
    </dict>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>*</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>Other Document Type</string>
        <key>CFBundleTypeOSTypes</key>
        <array>
            <string>****</string>
        </array>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
    </dict>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>db-shm</string>
            <string>db-wal</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>Support Type</string>
        <key>CFBundleTypeOSTypes</key>
        <array>
            <string>****</string>
        </array>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>NSIsRelatedItemType</key>
        <true/>
    </dict>
</array>

dose anyone have any idea how I fix this issue

canderse
  • 299
  • 1
  • 15

0 Answers0