1.7.7 • Published 2 days ago

@wavemaker/wm-reactnative-cli v1.7.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 days ago

wm-reactnative-cli

A command line utility to build react native apps created using WaveMaker product.

The main goal of wm-reactnative-cli is to simplify generation of APK or IPA for WaveMaker developers. wm-reactnative-cli combines multiple react-native commands into a single command. First, one has to make sure all the required hardware and software are available and installed. Then execute the command with the appropriate values for arguments.

Command to Install

npm install -g @wavemaker/wm-reactnative-cli

Adding Environment Variable

For Windows

  • Go to System Setting and Select Environment Variables.

    Windows System settings

  • Select New Variable under the System section and add WM_REACTNATIVE_CLI and its respective path.

    CLI System Variable

For Linux/MAC

  • use nano ~/.bashrc then add the following at the end of the file (after updating the paths) and save it.
export WM_REACTNATIVE_CLI="$HOME/cli/"

NOTE: To avoid cmake errors caused due to long paths in Windows, we suggest making the cli path shorter using this variable

Android Build

Requirements

Adding Environment Variables

For Windows

  • Go to System Setting and Select Environment Variables.

    Windows System settings

  • Select New Variable under the System section and add variables and their respective paths. New System Variable

For Linux/MAC

  • use nano ~/.bashrc then add the following at the end of the file (after updating the paths) and save it.
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
export ANDROID_HOME="/usr/lib/android-sdk"
export ANDROID_SDK="/usr/lib/android-sdk"
export ANDROID_SDK_ROOT="/usr/lib/android-sdk"
export GRADLE_HOME="$HOME/gradle/gradle-7.5.1"

Command

wm-reactnative build android <src_dir> additional_arguments

                   Argument                   Description
src_dirDEFAULT: current working directory. Path to the reactnative expo zip (or) path to the reactnative expo project folder.
--destOPTIONAL: directory where the app has to be copied and built. If it is not specified then .wm-reactnative-cli folder inside the home directory, will contain the build folders
--auto-ejectOPTIONAL: On setting this flag to true, expo eject will be invoke automatically.
--aKeyStoreAbsolute path of the key store. If keystore is not given then android debug key is used.
--aStorePasswordPassword to key store
--aKeyAliasAlias name of the key
--aKeyPasswordKey Password
--buildTypeDEFAULT: developmentdevelopment or productionUse ‘production’ with keystore specified.

Example 1

wm-reactnative build android "/path/to/src"

Example 2

wm-reactnative build android "/path/to/src" \
--dest="/path/to/dest" \
--aKeyStore="/path/to/file.keystore" \
--aStorePassword="store_password" \
--aKeyAlias="key_alias_name" \
--aKeyPassword="key" \
--buildType="production"
--auto-eject=true

IOS build

Requirements

NOTE: Before building an app, please make sure that neither iPhone nor iPad is not connected to Mac.

Command

wm-reactnative build ios <src_dir> additional_arguments

                   Argument                     Description
src_dirDEFAULT: current working directory. Path to the reactnative expo zip (or) path to the reactnative expo project folder.
--destOPTIONAL: directory where the app has to be copied and built. If it is not specified then .wm-reactnative-cli folder inside the home directory, will contain the build folders
--auto-ejectOPTIONAL: On setting this flag to true, expo eject will be invoke automatically.
--iCertificateAbsolute path of P12 certificate location
--iCertificatePasswordPassword to unlock the certificate.
--iProvisioningFileAbsolute path of provisioning file
--iCodeSigningIdentitySigning certificate name in keychain access
--buildTypeDEFAULT: developmentdevelopment or production Use ‘production’ with an AppStore distribution certificate.

Example

wm-reactnative build ios "/path/to/src" \
--iCertificate="/path/to/distribution.p12" \
--iCertificatePassword="unlock_password" \
--iProvisioningFile="/path/to/profile.mobileprovision" \
--iCodeSigningIdentity="certificate name in keychain access" \
--buildType="production"

Run Expo

Requirements

Command

wm-reactnative run expo <preview_url> additional_arguments

                   Argument                     Description
preview_urlapp preview url
--cleanDEFAULT: false if true, existing project directory is removed

Run web-preview

Requirements

Command

wm-reactnative run web-preview <preview_url> additional_arguments

                   Argument                     Description
preview_urlapp preview url
--cleanDEFAULT: false if true, existing project directory is removed

Run Android

Command

wm-reactnative run android <preview_url> additional_arguments

                   Argument                     Description
preview_urlapp preview url
--cleanDEFAULT: false if true, existing project directory is removed

Run iOS

Requirements

Command

wm-reactnative run ios <preview_url> additional_arguments

                   Argument                     Description
preview_urlapp preview url
--cleanDEFAULT: false if true, existing project directory is removed

Additional Information

  1. Destination folder path is logged at the start of the build.
  2. Build log files are present at <destination_folder>/output/logs
  3. The artifact built is available at <destination_folder>/output/<platform_type>/. The complete path is printed in log also.
1.7.7

2 days ago

1.7.6

29 days ago

1.7.5

2 months ago

1.7.4

2 months ago

1.7.3

2 months ago

1.7.2

2 months ago

1.7.1

2 months ago

1.7.0

3 months ago

1.6.7

4 months ago

1.6.6

5 months ago

1.6.4

5 months ago

1.6.3

5 months ago

1.6.5

5 months ago

1.6.2

5 months ago

1.6.1

5 months ago

1.6.0

5 months ago

1.5.9

5 months ago

1.5.8

5 months ago

1.5.7

6 months ago

1.5.6

6 months ago

1.5.5

6 months ago

1.5.4

6 months ago

1.5.3

8 months ago

1.5.2

8 months ago

1.5.1

8 months ago

1.5.0

9 months ago

1.4.2

9 months ago

1.4.1

9 months ago

1.4.0

10 months ago

1.3.31

10 months ago

1.3.30

10 months ago

1.3.28

10 months ago

1.3.29

10 months ago

1.3.27

10 months ago

1.3.20

12 months ago

1.3.21

11 months ago

1.3.24

11 months ago

1.3.25

11 months ago

1.3.22

11 months ago

1.3.23

11 months ago

1.3.26

11 months ago

1.3.19

12 months ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.15

1 year ago

1.3.16

1 year ago

1.3.13

1 year ago

1.3.14

1 year ago

1.3.11

1 year ago

1.3.12

1 year ago

1.3.10

1 year ago

1.3.9

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.3.7

1 year ago

1.3.6

1 year ago

1.0.9

2 years ago

1.3.5

1 year ago

1.0.8

2 years ago

1.3.4

1 year ago

1.0.7

2 years ago

1.3.3

1 year ago

1.0.6

2 years ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.3.8

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago