Incrementally Migrating To React-Native

If you have a "traditional" WebApp, and you want to make it available as a MobileApp, how do you do it?

Building/maintaining native apps for both iOS and Android as you change your WebApp is a very expensive way to do things.

React-Native is supposed to make things better.

But,

So I want to see how readily I can take one of my personal WebApps and do the least-possible React-Native with WebViews.

Probably the first step (after picking which WebApp to work with (update: going with FamilyFinancialFuture)) is upgrading the BootStrap to a more-recent ResponsiveWeb version.

  • nope, this is wrong thinking. Better to do Spike Solution of ReactNative shell with any WebView, then start iterating!

Getting Started - on Mac - for Android

docs

irrelevant notes where I'm forced to upgrade MacOsX

I have XCode but it's v3.2.6 and current is v8.3.3!

  • no obvious way to upgrade, so go for fresh install - ack have to have MacOsX 10.12 and I have 10.9.5.
    • I run updater, but that's just patches, so I'm still at 10.9.5.
    • I realize that this is for learning, and my phone is Android, and I think I only need XCode for building iOS apps, so decide to skip this part.
    • meta-rant: this kind of gratuitous dependency is a big barrier to normal humans Learning Programming

Install/launch Android Studio - no apparent version problems.

  • following the Oct'2016 link above because it doesn't talk about XCode
  • looks like some Components have changed names, but think I have the right bits
  • set up bash
  • ignoring JDK for the moment because I think I have key bits already, and don't want to muck with it
  • add Google Play Services
  • hmm can't run android sdk at all, time to abandon this path as being obsolete

Go back to core page https://facebook.github.io/react-native/releases/0.30/docs/getting-started.html

  • at brew install node get same error I get when trying to brew update my outdated OpenSSL code - see TwiitterBot page
brew install node
Error: /usr/local/Library/Homebrew/download_strategy.rb:84: invalid multibyte escape: /^\037\213/
invalid multibyte escape: /^\037\235/
Please report this bug at http://github.com/mxcl/homebrew/issues
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/Homebrew/formula.rb:1:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/Homebrew/formula_installer.rb:1:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/Homebrew/brew.h.rb:427:in `brew_install'
/usr/local/bin/brew:266:in `<main>'
BillSeitzMacBookPro2014% brew update ruby

error: The following untracked working tree files would be overwritten by checkout:
	.gitignore
	Library/Contributions/brew_bash_completion.sh
	Library/Contributions/brew_zsh_completion.zsh
	Library/Formula/a52dec.rb
	Library/Formula/aacgain.rb
	Library/Formula/aalib.rb
	Library/Formula/abook.rb
	Library/Formula/ack.rb
	Library/Formula/activemq.rb
	Library/Formula/adplug.rb
	Library/Formula/advancecomp.rb
	Library/Formula/aescrypt.rb
	Library/Formula/aircrack-ng.rb
	Library/Formula/algol68g.rb
	Library/Formula/allegro.rb
	Library/Formula/alpine.rb
	Library/Formula/android-ndk.rb
(lots more)
	Library/Formula/discount.rb
	Library/Formula/d

Aborting
Error: Failure while executing: git checkout -q master 
  • try this - no complaints
  • brew update - seems ok until
HEAD is now at 751334a Merge pull request #3076 from DomT4/high_sierra_b7
To restore the stashed changes to /usr/local run:
  'cd /usr/local && git stash pop'
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics.html

==> Tapping homebrew/core
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4556, done.
remote: Compressing objects: 100% (4345/4345), done.
remote: Total 4556 (delta 36), reused 457 (delta 11), pack-reused 0
Receiving objects: 100% (4556/4556), 3.63 MiB | 22.00 KiB/s, done.
Resolving deltas: 100% (36/36), done.
Checking connectivity... done.
Tapped 4341 formulae (4,600 files, 11.3MB)
Already up-to-date.
Error: Could not link:
/usr/local/share/man/man1/brew.1

Please delete these paths and run `brew update`.
==> Migrating HOMEBREW_REPOSITORY (please wait)...
Error: Could not link:
/usr/local/share/man/man1/brew.1

Please delete these paths and run `brew update`.
==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew!
Homebrew no longer needs to have ownership of /usr/local. If you wish you can
return /usr/local to its default ownership with:
  sudo chown root:wheel /usr/local
  • so do rm -rf /usr/local/share/man/man1/brew.1, then brew update again; it says Already up-to-date.
  • do sudo chown root:wheel /usr/local
  • back to brew install node - get various warnings/alerts, but going to ignore them and try to move on
clang: error: no such file or directory: '/usr/local/lib/libiconv.dylib'
make[2]: *** [pkg-config] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
...
Error: You are using macOS 10.9.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
  • do brew install watchman
watchman: macOS Yosemite or newer is required.
Error: An unsatisfied requirement failed this build.
  • so I guess I'm really blocked unless I move to MacOsX 10.10 at least. But I guess I'll whole-hog to the current version. (Update: done)
  • now doing brew makes me upgrade XCode. So I go ahead.

actually moving on with Facebook's main GettingStarted doc

Sept05: brew install..., npm-install... all good

react-native init AwesomeProject runs


Edited: |

blog comments powered by Disqus