Comments (5)
Meteor iOS uses an in memory cache to store documents received from the server. The easiest way to work with it is through the Core Data integration (which uses a custom NSIncrementalStore subclass, so not the default SQLite storage), but you could certainly access the cache through lower-level APIs yourself (see here). You'd have to handle all synchronization with a SQLite database yourself though.
Hope that answers your question.
from meteor-ios.
@martijnwalraven Thank you it does! But One thing about using without core data doc that confuses me.
- (void)databaseDidChange:(NSNotification *)notification {
dispatch_async(dispatch_get_main_queue(), ^{
// If updating the UI, make sure this happens on the main thread
METDatabaseChanges *databaseChanges = notification.userInfo[METDatabaseChangesKey];
[databaseChanges enumerateDocumentChangeDetailsUsingBlock:^(METDocumentChangeDetails *documentChangeDetails, BOOL *stop) {
...
}];
});
}
Is this function supposed to automatically re-run anytime the database changes and new info is pushed to the iOS client?
Also can you please clarify what the databaseChanges enumerateDocumentChangeDetailsUsingBlock
inside the database change function does?
Basically everything is working so far, but the only confusing part is when data changes in the database, how to detect those changes and sync the changes with SQLite
from meteor-ios.
@martijnwalraven Because we added this function in the view controller and it doesn't seem to be called when we edit the info in the database using the web app
from meteor-ios.
Have you used NSNotificationCenter
to subscribe to METDatabaseDidChangeNotification
for the databaseDidChange
method?
from meteor-ios.
Ok that did it! Thank you so much!
from meteor-ios.
Related Issues (20)
- When using local IP of my macbook where meteor is running not able to connect to iPhone (ws://local IP:4000/websocket) HOT 1
- managedObjectContext nil - NSFetchedResultsController
- How to refactor METAccount so we can pass in our own service and access group to keychain?
- [IOS][1.3+] WKWebView terminated [White Screen of Death] - kills Geofence events HOT 5
- Not able to get the document ID from the collection. HOT 3
- hello @import Meteor;
- You this is written in Swift, please HOT 1
- preform complex fetches via METFetchRequest to METDatabase#executeFetchRequest:
- Mobile-config.js - App.info: Team HOT 1
- Application crash after assertionFailure in sendMessage Meteor/METDDPConnection.m:74 HOT 1
- How to listen subscription with METDDPClient HOT 1
- retry opening connection
- How to to get notified for specific collection changes?
- How to correctly use updateDocumentWithID? HOT 2
- Support meteor 1.5?
- How to log Out in Swift?
- Custom Mapping to Coredata
- Is this still being maintained? HOT 1
- How to listen to the subscriptions?
- Library not loaded: @rpath/InflectorKit.framework/InflectorKit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-ios.