Thanks for showing the code of PersistentStack. Simply saying, your two codes, in Swift and in Objective-C, are completely different in instantiating and setting up managedObjectContext and persistentStoreCoordinator. If you want to make your Swift code work as the same as Objective-C code, do the same thing.
Topic:
Programming Languages
SubTopic:
Swift
Tags: