{"action":"opened","issue":{"url":"https://api.github.com/repos/martijnwalraven/meteor-ios/issues/3","labels_url":"https://api.github.com/repos/martijnwalraven/meteor-ios/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/martijnwalraven/meteor-ios/issues/3/comments","events_url":"https://api.github.com/repos/martijnwalraven/meteor-ios/issues/3/events","html_url":"https://github.com/martijnwalraven/meteor-ios/issues/3","id":54985179,"number":3,"title":"Saves to server but not core data","user":{"login":"trevorbroad","id":1142213,"avatar_url":"https://avatars.githubusercontent.com/u/1142213?v=3","gravatar_id":"","url":"https://api.github.com/users/trevorbroad","html_url":"https://github.com/trevorbroad","followers_url":"https://api.github.com/users/trevorbroad/followers","following_url":"https://api.github.com/users/trevorbroad/following{/other_user}","gists_url":"https://api.github.com/users/trevorbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/trevorbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevorbroad/subscriptions","organizations_url":"https://api.github.com/users/trevorbroad/orgs","repos_url":"https://api.github.com/users/trevorbroad/repos","events_url":"https://api.github.com/users/trevorbroad/events{/privacy}","received_events_url":"https://api.github.com/users/trevorbroad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T07:07:09Z","updated_at":"2015-01-21T07:07:09Z","closed_at":null,"body":"Hey again, when I try to save some data, it crashes at runtime on the second line below (let round = ...) , with no real messaging on what is wrong:\r\n```swift\r\n        let managedObjectContext = Meteor.mainQueueManagedObjectContext        \r\n        let round = NSEntityDescription.insertNewObjectForEntityForName(\"Round\", inManagedObjectContext:managedObjectContext) as Round\r\n        round.courseId = \"1\"\r\n        \r\n        var error: NSError?\r\n        if !managedObjectContext.save(&error) {\r\n            println(\"Encountered error saving objects: \\(error)\")\r\n        }\r\n```\r\nIf I try instead to save via the following, it saves to the server, but not to core data:\r\n```swift\r\n        let managedObjectContext = Meteor.mainQueueManagedObjectContext\r\n        let fetchRequest = NSFetchRequest(entityName: \"Round\")\r\n        \r\n        var error: NSError?\r\n        let fetchedResults = managedObjectContext.executeFetchRequest(fetchRequest, error: &error) as [NSManagedObject]?\r\n       \r\n        if let results = fetchedResults {\r\n            results[0].setValue(\"Red\", forKeyPath: \"tees\")\r\n            \r\n            var error: NSError?\r\n            if !managedObjectContext.save(&error) {\r\n                println(\"Could not save \\(error), \\(error?.userInfo)\")\r\n            }\r\n            \r\n        } else {\r\n            println(\"Could not fetch \\(error), \\(error!.userInfo)\")\r\n        }\r\n``` "}}