local-datastore

how to use local datastore to save and query data with parse and swift

无人久伴 提交于 2020-01-17 05:32:06
问题 In my app. There will be user list and message list as my code below message list code (load the list from parse) @IBOutlet var messageTableView: UITableView! var messageArray:[String] = ["Lope"] override func viewDidLoad() { super.viewDidLoad() retrieveMessages() } func retrieveMessages() { var query = PFQuery(className:"Messages") var user = PFUser.currentUser() query.whereKey("user", equalTo:user.objectId) query.findObjectsInBackgroundWithBlock { [weak self] (objects:[AnyObject]?, error

Wrong remote data when enableLocalDatastore with Parse

风格不统一 提交于 2020-01-15 06:54:27
问题 I have enable Parse local-datastore on my swift application. I want to sync remote data with local but I am facing issues with Pointer Array. I have a PFSubclass like this : class ShotModel : PFObject, PFSubclassing { @NSManaged var status: String? @NSManaged var pics: [PicModel]? } And when I update status on Parse server, the data is sync with my local datastore but when update the pics Pointer Array, the local data are not changed. For example: I fetch shots list (Array of Shot) which

How do I Save an Image PFFile in localdatastore while Offline Parse.com?

本秂侑毒 提交于 2019-12-24 04:17:12
问题 I'm developing an App that use Parse.com Server to Store PFUsers Informations and Classes for each PFUser. I'm able to save everything to the server when i'm online but i would like use the app also when there's no Internet connect which means to save them also when i'm Offline. My App is simple, I have: LoginVC Tableview with all Cars "Cars for Each PFUSER" ViewController "Add a Car" + I Search in Parse.com Docs & i found SaveEventually when we are offline. - (IBAction)save:(id)sender {

Parse.com: Cache Policy vs LocalDatastore

北城余情 提交于 2019-12-22 19:02:15
问题 I am very new to Parse with IOS and I am very confused about Cache and LocalDatastore. What is the different between kPFCachePolicyCacheOnly and fromLocalDatastore. Should I use localDataStore intead of Cacheonly to support offline usability. Basically I want to make sure that when it's offline, the user can still get the information that he has achieved when he is online. Thanks 来源: https://stackoverflow.com/questions/29784313/parse-com-cache-policy-vs-localdatastore

Parse.com: Cache Policy vs LocalDatastore

丶灬走出姿态 提交于 2019-12-22 19:02:01
问题 I am very new to Parse with IOS and I am very confused about Cache and LocalDatastore. What is the different between kPFCachePolicyCacheOnly and fromLocalDatastore. Should I use localDataStore intead of Cacheonly to support offline usability. Basically I want to make sure that when it's offline, the user can still get the information that he has achieved when he is online. Thanks 来源: https://stackoverflow.com/questions/29784313/parse-com-cache-policy-vs-localdatastore

Parse Local Datastore + Network Sync

穿精又带淫゛_ 提交于 2019-12-21 06:07:18
问题 I am using Parse.com with my iOS application (written in Swift) since 6 month and I would like to use Parse local Datastore for many reasons : Make my application usable (retrievable) offline Reduce data usage (many queries returning « non updated data ») Reduce loading time (mainly when starting application and loading all data from network) In order to do so I would like to write a global function handeling these scenarios for all the query I do from my application. I already have a

Swift Parse - local datastore items not appearing in tableView

我是研究僧i 提交于 2019-12-12 03:18:48
问题 This is a followup of my question from yesterday yesterdays post I have successfully saved and object in the local datastore using parse, and and trying to add that object to an array to store them so i can display the contents in a table view. the query is running fine, but it appears to me that nothing is being appended into the array, so nothing shows in the table view. here's my code. localData.swift file import Foundation struct localData { var date: String! var latt: NSNumber! var

Objects still in localstore after unpinAllInBackground(List<…>, DeleteCallback)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 11:25:15
问题 I'm using Parse.com in my Android app. I'm making a collaborative shopping list which allows the user to mark items for deletion (they turn grey), but they only get actually deleted when I press the Sync button (and there's a network available). Currently, the objects are erased from parse database but not from the local datastore. I'm trying this: ParseQuery<ShoppingItem> queryDeletes = ShoppingItem.getQuery(); queryDeletes.fromPin(MyApplication.ALL_ITEMS); queryDeletes.whereEqualTo(

Pointers data not storing in local database parse ios

落花浮王杯 提交于 2019-12-09 14:50:59
问题 I have a query with many includeKeys which are pointers to another class. After receiving the data from parse cloud all the records are getting stored locally using pinAll method. When I fetch back the results stored, I can able to get the records but not pointers included. See sample code below [query includeKey:@"classOne.innerClass"]; [query includeKey:@"classTwo.innerClass"]; [query includeKey:@"classThree"]; [query includeKey:@"classFour"]; [query findObjectsInBackgroundWithBlock:^

Parse.com: Cache Policy vs LocalDatastore

痴心易碎 提交于 2019-12-06 09:00:10
I am very new to Parse with IOS and I am very confused about Cache and LocalDatastore. What is the different between kPFCachePolicyCacheOnly and fromLocalDatastore. Should I use localDataStore intead of Cacheonly to support offline usability. Basically I want to make sure that when it's offline, the user can still get the information that he has achieved when he is online. Thanks 来源: https://stackoverflow.com/questions/29784313/parse-com-cache-policy-vs-localdatastore