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

Crash after migrating from IOS12 to IOS13 #323

Open
ovidiuadorian opened this issue Sep 21, 2019 · 4 comments
Open

Crash after migrating from IOS12 to IOS13 #323

ovidiuadorian opened this issue Sep 21, 2019 · 4 comments

Comments

@ovidiuadorian
Copy link

There seems to be a crash after migrating from IOS 12 to IOS 13. Some things have changed it the app is crashing.

The error is here:

  • (NSDictionary<NSString *,id> *)metadata
    {
    NSDictionary<NSString *,id> *superMetadata = super.metadata;

I believe is something related to NSData type that changed his behaviour of description method.

I've investigated but did not found a fix for it till now.

Did someone encountered something the same?

Thx

@ovidiuadorian
Copy link
Author

I ended up deleting the DB and recreate it at startup

@jcavar
Copy link
Contributor

jcavar commented Sep 23, 2019

I think the problem is introduction of NSStoreModelVersionHashesDigest metadata option in iOS 13. NSPersistentStore internally checks if it is set, and tries to load metadata again. This second attempt to load metadata fails because we are already inside of transaction.

@jcavar
Copy link
Contributor

jcavar commented Sep 23, 2019

I was able to fix it by doing:
[metadata setValue:@"" forKey:@"NSStoreModelVersionHashesDigest"];
in EncryptedStore.m.

This might not be safe solution, as this is private identifier, so some internal code might rely on it.

@ovidiuadorian
Copy link
Author

Yeah, they added it and its not documented, I don't know if there are any other implications.
Strange that even looking at "NSStoreModelVersionHashesDigest" on Apple website returns no results.

It seems an internal code

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