Meteor and React Native - meteor

We're new to Meteor and would appreciate some advice. Currently we're building out an app for our client using React Native.
Does Meteor include / provide an 'offline first' capability via its API (in a React Native dev environment) ? So for example user can persist data on device (iOS/Droid) when offline and then when back online, it can be sync'd back to Meteor's cloud db (also handling sync update conflicts on server side correctly) ?

ok i got the best thing for you, i guess:
react-native-meteor

I've been directed to this issue, to get latest info on offline w/ Meteor via the react-native-meteor lib. Posting here if others are looking for same at the current time: https://github.com/inProgress-team/react-native-meteor/issues/154

Related

Integrating Crash Analytics in React Native from 'react-native-firebase'

I successfully went through RNfirebase docs and added the libraries in my project. Everything is working well and good and the app starts. It's now basically for android.
I have only integrated it the way docs said i.e natively in Gradle files and wherever the docs said.
The question is do I have to initialize any method somewhere in my JS codes to record the crash events or they would be automatically sent to firebase console without requiring any codes (Which I think its impossible because I have to take their instance somewhere and then render them so that they call the native modules).
Well there are some methods which I could see in the docs. How to use them to record events.
You would have included google-services.json by which the firebase will be initialized.
After doing Crashalytics setup you are good to go. You will be automatically getting crash notifications in the console.
Check this documentation . Even though this is for V6 it applies for all versions. We had used another such service called Bugsnag, which is not as elegant as Crashalytics, that used to send to its console as well without we calling their send APIs.
So basically you do not need to call their APIs when crash occurs, Crashalytics will automatically send the crash report.
Please look to this link also.

React Native Notification About New App Release (App Store and Play Store)

We are about to release our new React Native app to Apple App Store and Google Play Store.
We know we'll be updating our app version every few weeks. We'd like to add an ability to update our users that their current version is deprecated, and help them navigate to the app/play stores to download the new release.
What is the best practice for this task?
Notice we're using Firebase for push notification so we're able to leverage both Firebase Cloud Messaging and In-App Messaging
I would strongly recommend using Firebase remote config. Use that to configure the minimum required app version, and have your app check it on start-up. If the current version is less than the required version, ask the user to update on Play using a Play URL link/intent.
Please please please don't do what some developers do and scrape the play store for the current version.

how to manage/edit sqlite in hybrid apps

Actually i'm new to hybrid app and i'm trying to make simple app using ionic with sqlite and i use google chrome console to log the app.
The question how can i manage/edit sqlite database?
Thank you.
A lot of the functionality you would see in a native app can be invoked using cordova tools.
http://ngcordova.com/docs/plugins/sqlite/
Try this plugin for a sqlite DB.
For temporary storage, you can use the localStorage of the browser.
Edit: I'm afraid I misread the question. To manage the DB as you would in phpmyadmin, you can use command line or a GUI.
https://www.sqlite.org/cli.html
I have used this GUI before
http://sqliteadmin.orbmu2k.de/

What are the steps to bundle Meteor into a client-side-only IOS app

I have tested Cordova as a way to embed a HTML5/JavaScript application into an IOS application without a remote server.
I would like to embed Meteor instead: for my learning, for the reactivity, and so that later I can add a server-side for storing data.
What are the key steps to do this? I would need to use LocalStorage instead of in-memory storage of minimongo. Are there also steps to embed Meteor? Would I also need Cordova to provide a functional environment for Meteor? Are there steps to tell Meteor there is no server?
At the moment its not possible to persist storage with local meteor collections. You can create collections without specifying the collection name e.g
var MyCollection = new Meteor.Collection(); //(instead of Meteor.Collection("MyCollection");
The issue is as soon as you close the application the data will be cleared. So this makes it very difficult to make your app offline only.
There is also a package being worked on to help allow offline collections while a server is not available: https://github.com/awwx/meteor-offline-data#readme
You can still use meteor with cordova and phonegap though, but you will need a data connection. To bundle your cordova application there is a very helpful script: https://github.com/guaka/meteor-phonegap
I have created an application using cordova, meteor and packmeteor.
For me it works pretty nicely.
I wrote a block post on how you can get started with it here.
For the local persistence of data I used GroundDB.

Can meteor application be launched offline

Can meteor application be launched offline, when no server connection is active,
for example from html5 application cache in browser.
Or being saved to offline folder.
of course no data propagation to server, but maybe some local cache.
EDIT: how about saving events to local storage when offine?
Yeah, theoretically, this should be doable by creating a HTML5 cache manifest. I asked about this here:
How can I add a cache manifest to a Meteor app?
I had the same query. This is worth looking at for persisting your data offline:-
https://github.com/awwx/meteor-offline-data
Meteor has an appcache package (check the docs) and it currently being used in the docs itself.

Resources