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

Value of type 'AppDelegate' has no member 'persistentContainer' #39

Open
mdrame opened this issue Dec 10, 2018 · 0 comments
Open

Value of type 'AppDelegate' has no member 'persistentContainer' #39

mdrame opened this issue Dec 10, 2018 · 0 comments

Comments

@mdrame
Copy link

mdrame commented Dec 10, 2018

static let context: NSManagedObjectContext = {

        guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { fatalError() }
        
   
        let persistentContainer = appDelegate.persistentContainer /* error = Value of type 'AppDelegate' has no member 'persistentContainer' */
        
        let context = persistentContainer.viewContext
        
        return context
   
    }()
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

1 participant