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

Untangle Core Data Setup and CrashLogging #2370

Closed
Tracked by #14050
shiki opened this issue May 29, 2020 · 3 comments · Fixed by #14013
Closed
Tracked by #14050

Untangle Core Data Setup and CrashLogging #2370

shiki opened this issue May 29, 2020 · 3 comments · Fixed by #14013
Labels
category: architecture Related to architecture such as the database, FluxC, Networking, Core Data, etc. type: task An internally driven task.

Comments

@shiki
Copy link
Member

shiki commented May 29, 2020

Found by @jaclync in p91TBi-2PM-p2#comment-860. When CrashLogging is initialized, the Core Data setup is also unexpectedly started because of this line:

var currentUser: TracksUser? {
guard let account = ServiceLocator.stores.sessionManager.defaultAccount else {
return nil
}
return TracksUser(userID: "\(account.userID)", email: account.email, username: account.username)
}

@shiki shiki added the category: architecture Related to architecture such as the database, FluxC, Networking, Core Data, etc. label May 29, 2020
@shiki
Copy link
Member Author

shiki commented May 29, 2020

This may help with #2371

@shiki
Copy link
Member Author

shiki commented Jun 18, 2021

Related discussion by @koke in paNNhX-f9-p2.

@itsmeichigo
Copy link
Contributor

CrashLogging initialization seems to no longer be tangled with Core Data after the change in #10049. I've added the initialization of Core Data as part of the AppDelegate setup in #14013, so the order of initialization should be as follows:

CrashLogging > CoreDataManager > DefaultStoresManager.

I'll mark #14013 as closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: architecture Related to architecture such as the database, FluxC, Networking, Core Data, etc. type: task An internally driven task.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants