Westbay Websites

How to debug mobile apps in react native

Can we really have fast apps that auto update?

We’re building app projects in react native now.

React Native to build auto updated & beautiful native apps for iPhone and Android

And we don’t usually do that. (React Native we mean. Lots of our apps work on Cordova [formally phone Gap] which fits most needs just fine)

AND there are a tons of other ways to build an app.

And plenty of these methods are more established then React Native.

These methods have been around longer and have more support.

More predictable.

But we believe that react native is a smart investment.

(facebook wrote a great post on WHY react native has a reason to exist in this world)

And we’re sold.

The destruction of the ‘seductive’ write once run anywhere to the ‘realistic’ learn once, run anywhere approach just makes sense to us.

(android has a back button, iPhone does NOT have a back button. This is one OBVIOUS example why this is the case.)

So how is coding and debugging DONE in React Native?

Well….here’s how WE do it…

#1 The text editor we use write javascript code with is atom

why?

We can see our api project and our app project on one session.

(why doesn’t Visual Studio, xCode, and all the other’s do this?)

They only let you monopolize the view on ONE project at a time, switching windows and it’s such a needless headache.

#2 We use MongoDB

why?

Because MongoDB uses JSON at it’s core.

In case you’ve been living under a rock (that rock being SQL your whole career), you will have realized that we play a lot of tricks to ‘hack’ SQL to pull data and display it on web pages.

Why don’t we make the data more ‘web compatible’

(Isn’t that what web services and APIs for?)

Well, let’s look at traditional web services for a second….

They’re based on XML. And XML takes string manipulation to pull from.

It’s nice that we can easily tell how data is structured. But it’s not convenient to use directly with Javascript.

JSON is a format that looks like XML but let’s you access it directly with Javascript.

That kind of usefulness is why the format has taken off in recent web history.

It runs much faster and is much more convenient to work with in that format.

And the entire JSON system can be stored in mongoDB.

Now that IS handy!

#3 To debug, we use Xcode and genymotion.

To test an iPhone app, you need Xcode. There’s no 2 ways about it. (that we’ve found)

But to test an android app, we prefer Genymotion since we can test all kinds of android products in an emulator right away. Score!

#4 We can still update our app dynamically with codepush.

Codepush is a great product by Microsoft (yes, Microsoft) that let’s you automatically push improvements to your app without having the user install new versions of the app.

This will give your user experience a leg up. Since this let’s you install improved versions AUTOMATICALLY…..AND have a fast running, fully native app running on the customer’s phone.

Are you ready to answer your customer’s call?

WestBay WebSites is a Palm Harbor based media tech company. We are heavily invested in taking care of your communications in the fast changing, distracting and noisy world that we share.

Want to learn more? Contact us or call 727-776-9248

Vinnie Campagna ~ WestBay WebSites

facebooklinkedinyoutubetwitterg+