usr of NSCustomPersistantContainer with "forSecurityApplicationGroupIdentifier"

For using today extension, I override default directory with app group.

class NSCustomPersistentContainer: NSPersistentContainer {
override open class func defaultDirectoryURL() -> URL { var storeURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.YourApp") storeURL = storeURL?.appendingPathComponent("YourApp.sqlite") return storeURL!
}
}

it's working fine : on my widget I could retrieve my Coredata information...

BUT I've notice that an error appear on the first time I install my app

returned error NSCocoaErrorDomain(512) with userInfo dictionary {

    reason = "Failed to create file; code = 2";


it's not crashing app and could use Coredata but could you tell me how why this error on debug?

thanx a lot
usr of NSCustomPersistantContainer with "forSecurityApplicationGroupIdentifier"
 
 
Q