@tedckh/create-react-native-boilerplate
v1.2.0
Published
A simple CLI to generate a React Native project from a boilerplate.
Readme
Create React Native Boilerplate
A simple CLI tool to generate a new project from the @tedckh/react-native-boilerplate.
Usage
To create a new project, run the following command in your terminal:
npx @tedckh/create-react-native-boilerplate <your-project-name>What it does
The script will create a new directory with your chosen project name and perform the following steps:
- Clones the latest version of the
react-native-boilerplate. - Updates the
package.json,app.json,index.js,Podfile, Xcode project files (.pbxproj,.xcscheme), Android build files (.gradle,AndroidManifest.xml), and Java/Kotlin source folder structure with your new project name and bundle identifier. - Updates the internal package scope names (e.g.,
@my-rn-boilerplateto@your-project-name). - Installs all JavaScript dependencies (
npm install). - Installs iOS native dependencies (
pod install). - Initializes a new git repository.
Once it's finished, your new project is ready to go with a complete Dockerized environment for both development and production.
License
ISC
Important Notes
iOS Development on macOS
The project creation script includes a step to run pod install for iOS native dependencies. This command is part of CocoaPods and only runs on macOS.
If you are creating a project on a non-macOS operating system (e.g., Windows or Linux), the script will automatically skip this step. You will need to run pod install manually on a macOS machine if you intend to build for iOS.
A Note on iOS Bundle Identifiers
When you build the iOS app for the first time, Xcode may report an error that the "Bundle Identifier is not available." This happens if the generated ID (e.g., com.demoapp) is too generic and has already been registered by another developer.
Solution:
- In Xcode, open the project settings and go to the Signing & Capabilities tab.
- In the "Bundle Identifier" field, change the value to something unique, usually in reverse domain name format.
- For example, change
com.demoapptocom.yourname.demoapporcom.yourcompany.demoapp.
This will resolve the registration error and allow you to build the app.
