ios - Parse LocalDataStore does not work when using Parse-Server - 'Method requires Pinning enabled.' -


i have started using parse-server , have migrated parse app, when try use parse local datastore receive following error:

*** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'method requires pinning enabled.'

this code produces error:

pfquery *query = [pfquery querywithclassname:@"my_class_name"]; [query frompinwithname:@"pin_name"]; [query findobjectsinbackgroundwithblock:^(nsarray * _nullable objects, nserror * _nullable error) { 

if initialise parse old way calling:

[parse setapplicationid:@"app_id" clientkey:@"key"]; 

then local datastore works fine, if initialise parse new way error:

[parse initializewithconfiguration:[parseclientconfiguration configurationwithblock:^(id<parsemutableclientconfiguration> configuration) {   configuration.applicationid = @"app_id";  configuration.clientkey = @"key";  configuration.server = @"server";   }]]; 

i calling [parse enablelocaldatastore]; before parse being initialised, i've tried calling after sure.

thanks time, hope can help

i opened issue on github , there solved problem me:

"if using configuration initialization - need enable local datastore differently. add following line configuration block enable it:"

configuration.localdatastoreenabled = yes; 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -