I am currently using the latest version of Parse 1.14.2 and Bolts 1.8.4. Parse is correctly implemented and I have been using it for a long time. The problem that I am facing right now is when I try to use the local Parse data store. I have the following code in AppDelegate.swift:
Parse.enableLocalDatastore()
Parse.setApplicationId("ID",
clientKey: "Client_Key")
I have the following code to create and save a string with a name firstNamein a class named contact:
let contact = PFObject(className: "contact")
contact["firstName"] = "Jack"
contact.pinInBackground()
Here is the code for extracting objects from the created class:
let query = PFQuery(className: "contact")
query.fromLocalDatastore()
query.getFirstObjectInBackgroundWithBlock({ (object, error) -> Void in
if error == nil {
if let contact = object {
print(contact.objectForKey("firstName"))
}
}
})
I added libsqlite3.dylibto my project. My application does not crash when running this code, but when I try to restore objects it just gives me the following message:
2016-08-29 11:31:38.049 App_Demo[14436:3504319] [Bolts] Warning: `BFTask` caught an exception in the continuation block.
This behavior is discouraged and will be removed in a future release.
Caught Exception: Method requires Pinning enabled.
- ? , , Bolts Parse , . , .
: , Parse Cocoapod Xcode.