Safari extension handler and CoreData

Hello,

I'm experimenting with the new Safari web extensions for iOS and iPadOS 15 but I'm hitting a wall when I try to execute a fetch request from the Web Extension Handler on a persistent store located in my app group container.

First of all, I have not found a good way to debug my extension native code from XCode so I want to ask if someone is aware of a way to debug or having crash logs regarding those extensions.

Regarding the CoreData issue, I can access the persistent store (checked with NSFileManager) in the group container and initialize my core data stack, but a simple fetch request without a predicate seem to result in a "no-response" error in the background script, possibly related to native code crash. The same code is run on another extension (Shortcuts) without problems. At this point in my testings, I'm unsure I took the wrong path and CoreDate can't be used by design, this is a beta bug or I'm missing something. Any clue is more than appreciated.

I have run my test mostly on iPadOS 15 latest beta release.

Safari extension handler and CoreData
 
 
Q