As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I have an issue pulling data from backend. I can signup, create user, create my Collection, login but pulling from collection (dataStore) doesn't return anything, although it falls through as successful operation. I've tried your starter app Bookshelf and upon adding some books, Sync operation fails. Any hints? You can check my code in snippet
let dataStore = DataStore<KinveyContact>.collection(.sync)
dataStore.find() { contacts, error in
if let fetchedContacts = contacts {
self.members.append(contentsOf: fetchedContacts)
print("Succesful fetched KinveyContact(s): \(fetchedContacts)")
self.tableView.reloadData()
} else {
print("Unsuccesful fetched KinveyContact(s) with error: \(String(describing: error))")
}
}
Thanks,
Marko
Best Answer
P
Pranav J
said
over 6 years ago
Marko,
I don't see your code for pulling a copy of your data to the device. When using a sync datastore, you should always pull a copy of data to the device first and then work on it offline. You are directly executing 'find()' function without pulling the data. So it will fail as nothing is present locally on your device.
Check following code snippet to pull data from the backend. I have implemented it in my sample app and it is working flawlessly:
// Pull data from your backend and save it locally on the device.
dataStore.pull() { (books, error) -> Void in
if let books = books {
//succeed
print("Books: \(books)")
} else {
//fail
}
}
I don't see your code for pulling a copy of your data to the device. When using a sync datastore, you should always pull a copy of data to the device first and then work on it offline. You are directly executing 'find()' function without pulling the data. So it will fail as nothing is present locally on your device.
Check following code snippet to pull data from the backend. I have implemented it in my sample app and it is working flawlessly:
// Pull data from your backend and save it locally on the device.
dataStore.pull() { (books, error) -> Void in
if let books = books {
//succeed
print("Books: \(books)")
} else {
//fail
}
}
Marko Randjelovic
Hi Guys,
I have an issue pulling data from backend. I can signup, create user, create my Collection, login but pulling from collection (dataStore) doesn't return anything, although it falls through as successful operation. I've tried your starter app Bookshelf and upon adding some books, Sync operation fails. Any hints? You can check my code in snippet
Thanks,
Marko
I don't see your code for pulling a copy of your data to the device. When using a sync datastore, you should always pull a copy of data to the device first and then work on it offline. You are directly executing 'find()' function without pulling the data. So it will fail as nothing is present locally on your device.
Check following code snippet to pull data from the backend. I have implemented it in my sample app and it is working flawlessly:
For better understanding of Kinvey datastore types, please check http://devcenter.kinvey.com/ios/guides/datastore#datastoreTypes.
Thanks,
Pranav
Kinvey
Pranav J
I don't see your code for pulling a copy of your data to the device. When using a sync datastore, you should always pull a copy of data to the device first and then work on it offline. You are directly executing 'find()' function without pulling the data. So it will fail as nothing is present locally on your device.
Check following code snippet to pull data from the backend. I have implemented it in my sample app and it is working flawlessly:
For better understanding of Kinvey datastore types, please check http://devcenter.kinvey.com/ios/guides/datastore#datastoreTypes.
Thanks,
Pranav
Kinvey
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics