Skip to content

Migration executed but not required #2

@serluca

Description

@serluca

I had this issue in my app and I tried to figure out what was happening, I realised that sometimes the migration happened also when it was already happened, or on a new app.

The problem was always happening when apps was called in background, in my case I'm using background fetch, investigating a bit I realised that NSUserDefaults uses NSFileProtectionCompleteUntilFirstUserAuthentication. This cause the problem.

If the background fetch is executed before the first user authentication, the migration happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions