Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Install XCode

Visit https://developer.apple.com/download/ and download stable XCode.

Install Homebrew

Info
titleUpdate

If you are using Mobile code version 1.4 or newer, you no longer need to install Nodejs & Dependencies. This step can be bypassed.

Open Terminal and run the following commands:

Code Block
# Checking brew is already
which brew


# if not, run this command to install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Cocoapods

Open Terminal and run the following commands:

Code Block
# Checking Cocoapods is already
which pod

#if not installed, run below command to install 
sudo gem install cocoapods

Install Nodejs & dependencies

Info
titleUpdate

If you are using Mobile code version 1.4 or newer, you no longer need to install Nodejs & Dependencies. This step can be bypassed.

  • Download and install latest

...

Code Block
# support eslint 
npm install -g @babel/core@^7 @babel/cli@^7 eslint eslint-plugin-jest babel-eslint eslint-config-airbnb eslint-config-google eslint-plugin-flow-vars \
eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-node eslint-plugin-promise eslint-plugin-react \
eslint-plugin-standard eslint-plugin-mocha eslint-plugin-jasmine babel-plugin-react-intl babel-plugin-transform-remove-console \
yarn react-native-cli create-react-native-app

...

Code Block
#install dependencies
cd MobileProject/
yarn install


# install dependencies 
cd ios/
pod install

Configure your iOS app

Configure Push Notification with Firebase

  • Visit https://console.firebase.google.com/, create a project (You can use one Firebase project for both iOS and Android apps)
  • Download GoogleService-Info.plist  and overwrite the default file at MobileProject/ios/GoogleService-Info.plist

Configure configuration.json under MobileProject/ios folder

Default file configuration.json will be as below:

...

googlePlacesClientId
Follow the instruction at https://developers.google.com/places/ios-sdk/start to get key for ios.

googleAdMobAppId
Follow the instruction at https://developers.google.com/admob/android/quick-start to get key for ios.

...

grayBaseColor
This color code is used for generating appropriate text color.

Run

...

Nodejs

Info
titleUpdate

If you are using Mobile code version 1.4 or newer, you no longer need to install Nodejs & Dependencies. This step can be bypassed.

  • Open Terminal, go to MobileProject folder
  • Run the following command to start
Code Block
node ./server.js

Start your iOS app on a simulator with XCode

  • Open XCode, start the iOS project at ios/Mobile.xcworkspace
  • Start running iOS on Simulator