Detailed explanation on how React Native softwares are updated - javascript

I am developing a React Native application. it's a framework to build mobile applications with JavaScript and deploy for Android & iOS with the same code base.
I read somewhere that RN applications are dynamically updated. It means, without releasing new versions to AppStore or GoogleStore, we can update it. It is awesome!
But my question is: how can we do so? I searched a bit and found out that it is possible with Codepush. If so, how? Is it a free tool or we should pay for it? If it's not free, Isn't there a free solution to this?
Also, by updating dynamically, are we limited to update only JS bundle or we are able to update external assets like new fonts, images, and etc?
I would be thankful if an expert guides me by details and workarounds.
Cheers.

Like it explains in CodePush website;
CodePush is a cloud service that enables Cordova and React Native
developers to deploy mobile app updates directly to their users’
devices. It works by acting as a central repository that developers
can publish certain updates to (e.g. JS, HTML, CSS and image changes),
and that apps can query for updates from (using our provided client
SDKs). This allows you to have a more deterministic and direct
engagement model with your end-users, while addressing bugs and/or
adding small features that don’t require you to re-build a binary
and/or re-distribute it through any public app stores.
This means you can update your Javascript code remotely without submitting your app through App Store or Google Play.
This service is currently completely free and you can use it in your app without paying any fees. There are also couple of more systems that are payed or free but I have never used them so I can't say anything about them.
This service does not let you change or update any of the native code so if you add any native code supported libraries or write one yourself or update any existing native libraries or codes, you need to publish the new version through the stores.
This types of services also help you to do A/B tests and alfa/beta tests.
You can find much more detailed information at CodePush website and Google.

Codepush is free and you can use react-native-code-push to use codepush service. You can use its document to have this service on your app.

Related

Is there a way to run universal apps on Firebase Hosting?

I have recently deployed my Angular 2 application to Firebase hosting successfully and am really enjoying this set up so far, particularly on how easy it is to deploy using CI as well.
At the moment, I am looking at adding a universal server rendering support to my app, but I'm not sure if this is handled by Firebase Hosting, as it says it is static file only.
However, what made me think that this could be a potential feature that I am missing is that Firebase offers support for single page applications, hence I decided to ask.
If there isn't support for such apps, can we expect it in the future?
At the moment this is not possible. However since Angular 2, Google and Firebase go hand in hand I would say this it is just a matter of time.
In the meantime you can create a Node.js-based server, where you install Angular Universal, and have it connect to Firebase with the Firebase Node SDK.
Next, you simply communicate with that Node-backend from your Angular 2 application.
If you're using angularfire2, that will break universal either way. There's something in the package that calls "window" which doesn't exist on the server. Unless something changes with universal or angularfire this is a ways off
At the end of that video David East mentions that one can use Google Cloud Functions with Angular Universal and such: https://www.youtube.com/watch?v=R3v8EcYzf_M
The video itself is quite useful for firebase users. But the topic starts at approximately 23:30.
A different approach is to skip universal altogether and do something like this.
Rendertron is a headless chrome that can be launched. Similar to phantomjs. But universal gives speed.

Web scraping in react-native ios?

I am building an iOS app with react-native and looking to do some web scraping. From my understanding traditional npm packages don't work because they rely on Node.js. I know there are Objective-C/Swift libraries for web scraping but I don't understand how I would integrate those into a react-native component.
Anyone have any ideas on how to get information from a website (web scraping) in react-native?
Interesting question. Architecturally, it might be a good idea to consider building a service which can provide the scraped data via an API. The more processing power the client requires (the heavier the client-side code), the more likely you are to run into lagging / stuttering issues in the app. Phones have come a long way, but still can't match a server's power.
If you want to press ahead, I would advise using the browserified version of Cheerio.js. Basically, browserify lets you take code written for node, and use it in a browser environment. You would need to test it in JS Core on IOS, but there's a good chance everything will work.
One other option is using jQuery's load function or the fetch api included in React Native to make the call to the site (you don't have to worry about CORS), and parse the result manually.

How do you wrap a web app as iOS app

I have this web app which works great on mobile browsers however I would like to allow this app being downloaded as "native app" through the apple app store.
My app basically consists out of three files which it serves to the client:
index.html
build.js
build.css
My research so far came to the conclusion that it is possible to do this by creating a web view with objective-c which executes the web app. Additionally you may use SDKs like phone gap to use native APIs (which is not required in this case).
Unfortunately I do not find a lot information on this by google, so I have following questions:
What is the "keyword" I am looking for (whats the term for "wrapping html app in object-c")?
Do I have to change the urls in my build.js (or can I overwrite current origin)?
Is there anything else I would need to change in build.js?
Are there any problems I should consider?
Is it possible? Yes. Will apple approve your app? Defiantly not.
From the App Store Review Guidelines:
2.12 Apps that are not very useful, are simply web sites bundled as apps,
or do not provide any lasting
entertainment value may be rejected
web shell, web app
Changing the urls for local path would work.
Depends on how build.js was written.
The above.
So what can you do?
Think how to improve your app with native code and add some functionality to it.
Focusing on the native code will help. If you'll submit an app that opens a UIWebView and that's it apple will 100% reject it.
I wrote an app for my company that wrapped a web app inside a UIWebView but had a lot of native code that would sniff the current UIWebView url and triggered functions accordingly. (Opened the cam, recorded audio, uploaded stuff to the server) so in the end it was very hybrid.
Apple rejected it with the claim that the user still sees only a webpage. I had to add a lot of other visible functionality in order for it to get approved.
Your idea seems like a very general and appealing idea for developers but as far as I know, these sort of applications are not taken very sportingly by apple app reviewer.
When I say these sort, I actually mean application which calls webpages as browser. For these type of calling browser is perfect.
Now lets talk about development. If you want to start with development then this is your takeoff place. As you have all your skills with HTML, JS and CSS, you'll rock with this development platform called Phonegap. and the beauty of this platform is you can import same build for other mobile platform as well.
Looking forward for some worthy applications. Good Luck!
Not sure, but the answers above may be out of date. The new app store guidelines do not include the quoted language about "websites bundled as apps." Perhaps Apple has eased up on this issue?
You can use a new tool called Natively It helps to wrap web apps to mobile native. They also have JS SDK to integrate with native features & pretty clear documentation.

Could someone explain how to use the UpdateManager in TideSDK 1.3.1 Beta?

I was wondering if there was anyone online who would be willing to talk me through deployment and application updates in TideSDK 1.3.1?
The background is that I would like to build a HTML5 application wrapped in a desktop client, for deployment on Windows and Mac. The resulting application needs to have a simple installer and a mechanism for receiving updates either through the internet, or using an update installer if internet isn't available.
Are these features currently supported in TideSDK 1.3.1? And if so is there any documentation regarding the update process? I've looked through the API docs and have found reference to an UpdateManager, but have been unable to find examples of usage.
Rich
TideSDK-1.3.1-beta currently contains legacy code for updates that is currently being refactored. As such, this is going through a transition presently. You will see us blog on our progress with this shortly. This piece of the SDK is critical and we understand its importance for app deployments.
We are currently working to provide better, more flexible installers that will be revealed to our users and the community as soon as we have this all together and tested. The refactoring and core improvements are modularizing the build and update code, giving us a much stronger foundation in the core to build upon. Application update and build services will use this new code. We will be making announcements on this important functionality. What we are doing will make everything easy and complete for everyone.

How to create iPad application that reuses my JS libraries that are build for web application

So I am a web (Rails) developer, and I would like to create an iPad application for my site. The web application heavily relys on javascript libraries that are built specifically to interact with users in a unique manner.
Now I would like to transform that same interaction to my iPad application. I need a way to reuse my js files since re-coding the libraries will take forever. There are three options that I might follow:
1- Using Rhodes: built on ruby and inspired from rails.
2- PhoneGap: which is basically a web browser inside an app, so I presume that including js files would be possible.
3- xCode: which will take lot of time for me to learn and implement.
My questions are:
1- Can I import my js files in the rhodes project?
2- Which is the best to implement this?
3- Is there any other options that I should be looking at?
Any hints and pointers will be greatly appreciated,
Thanks a lot everybody
As i am not aware of the app you are developing & its design, Two approaches i see here as it is Rails,
Mobile Web
The existing web app shall be customized to mobile web (iPad & most
of the tablet in fact).
Create controllers specific to mobile/tablet. this shall connect to views created specific to mobile/tablet.
Detect the device/platform when HTTP request is posted and re-direct to specific views you have created.
Good thing is your JS is always the same(will need minor modifications thou) and dev time reduced significantly without learning new stuffs.
PhoneGap
You can pull up all the JS you have written and build some html/css integrate everything and build the project inside a phonegap template for iOS and create a on-device app and distribute. but the JS will undergo some changes here too.
But this will no way be different than mobile web and this comes other overheads like CORS and build/release, updates management & app stores etc.
Native APP
As you said, you got to learn iOS development (objC). you can create RESTful services in your rails end and expose them to the iOS app.
Rhodes i am not very sure, its little tricky and it depends on your existing web app too. try it before deploying.

Categories

Resources