PoC of mPower on React Native framework
Homebrew :
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Watchman:
brew install watchman
Yarn:
brew install yarn
yarn
. Discard package-lock.json
if you've accidentally run npm install
!
Browse to project directory and run yarn
- Install XCode on Mac then open it for XCode Command Line Tools
- Install latest
cocoapods
gem [⚠️ Make sure to match the version of Podfile, otherwise it will generate a commit and ask for pod install every time]gem install cocoapods
- Install project pods
npx pod-install ios
- open XCode with .xcworkspace file then select you Team Account, check Bundle Identifier & Provisioning Profile (if not auto)
- [WIP]
mPowerRN
which targets production. Example: yarn run-ios:simulator --scheme Dev
You can either manually start the Metro Bundler with yarn start
or let it automatically run after the project is built. yarn start
command is bundled with the --reset-cache
command.
For ios:
- Run on iPhone simulator (6th Gen):
yarn run-ios:phone-sim
+ scheme param - Run on connected device:
yarn run-ios:device
+ scheme param
- if you are not using
use_frameworks!
in CocoaPods, then you can use Flipper to debug the app. Whenuse_frameworks!
needs to be enabled, follow the steps listed in the Podfile - if you want to check console logs from react native code, install through :
brew update && brew cask install react-native-debugger
- shake you device after you run the app and select both "Enable Live Reload" & "Start Remote JS Debugging"