Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to initialize class object to change password #327

Open
pratap511 opened this issue Apr 20, 2020 · 1 comment
Open

unable to initialize class object to change password #327

pratap511 opened this issue Apr 20, 2020 · 1 comment

Comments

@pratap511
Copy link

i'm inable to initialize this class. Please help me on below snippet

            EncryptedStore *store = ******
            
            if([store checkAndChangeDatabasePassphrase:@"1234" toNewPassphrase:@"5678" error:nil]) {
                NSLog(@"Changed Password");
            }
@dankito
Copy link

dankito commented Oct 10, 2020

if let encryptedStore = persistentContainer.persistentStoreCoordinator.persistentStores.compactMap { $0 as? EncryptedStore }.first {
     try? encryptedStore.checkAndChangeDatabasePassphrase("1234", toNewPassphrase: "5678")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants