Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
fix core data related crash
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Apr 20, 2021
1 parent 2762bf3 commit 1a99ba0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions TUM Campus App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1179,11 +1179,11 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 49;
CURRENT_PROJECT_VERSION = 50;
DEVELOPMENT_TEAM = 2J3C6P6X3N;
INFOPLIST_FILE = "TUM Campus App/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 3.11;
MARKETING_VERSION = 3.12;
PRODUCT_BUNDLE_IDENTIFIER = de.tum.tca;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1203,11 +1203,11 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 49;
CURRENT_PROJECT_VERSION = 50;
DEVELOPMENT_TEAM = 2J3C6P6X3N;
INFOPLIST_FILE = "TUM Campus App/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 3.11;
MARKETING_VERSION = 3.12;
PRODUCT_BUNDLE_IDENTIFIER = de.tum.tca;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
argument = "-com.apple.CoreData.SQLDebug 1"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-com.apple.CoreData.ConcurrencyDebug 1"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-logout"
isEnabled = "NO">
Expand Down
2 changes: 1 addition & 1 deletion TUM Campus App/Entity/EntityImporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ final class Importer<EntityType: Entity, EntityContainer: Decodable, DecoderType
}()

lazy var context: NSManagedObjectContext = {
let context = coreDataStack.newBackgroundContext()
let context = coreDataStack.viewContext
context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump
return context
}()
Expand Down
2 changes: 1 addition & 1 deletion TUM Campus App/Entity/NewsImporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class NewsImporter {
return fetchedResultsController
}()
let context: NSManagedObjectContext = {
let context = coreDataStack.newBackgroundContext()
let context = coreDataStack.viewContext
context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump
return context
}()
Expand Down

0 comments on commit 1a99ba0

Please sign in to comment.