Introduction
An extension to generate React Native (TYPESCRIPT) folder structure and every thing you need to setup your project. Without doing every task manully.
Creates redux files automatically and add them to reducer.
Creates Component and it's style file and add imports into your routers.
Features
- Create src folder
- Create root reducer and store
- Create redux set(initial state, reducer, action types, actions)
Steps before running app
First of all run command to create a new app with typescript
- npx react-native init MyApp --template react-native-template-typescript
- This will create a new project
Right Click your project & Select "Create src Folder"
- This will generate all the needed project directory.
Open iOS project in Xcode
- Right Clik on the project folder and add the "Config.xcconfig" file that is already present
Now clik on the schemes > edit scheme>
- Expand "Build" option and select "Pre Action"
- Add below command
"${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb" "${SRCROOT}/.." "${SRCROOT}/tmp.xcconfig"
NOTE: Add above command with quotes.
- "Provide build setting from" -- you have to select your project here
Select project, don't confuse with target you have to select project.
- Info tab > Configurations
- you will be shown two configuration "Debug" & "Release"
- In both of them Select Config.
Change your bundle id in ios with with you will be creating Firebse App and Facebook Apps
Add "Push Notification" and "Sign in with Apple" in Capabilites
Create one swift file in the ios project with whatever name you want, lets create Test.swift file.
- It will ask to generate Bridigin-Header.h file > Select Yes.
Add GoogleService-Info.plist to iOS project and google-services.json to android project.
In the project we have .env file set all the constants like Facbook ID, Gmail, Api url etc in this file.
If you face any issue like -
Your app is missing support for the following URL schemes:
- Click on project and go to info.plist
- Open URL Types:
- Click on URL Schemes text field and press enter.
- For some wiered reason it works after that
Run your project - you are ready to go :)
How to Use
Create Src Folder |
|
Create redux set |
|
Create Component |
|
Special Words Explanations ( Ex: Set, Auto Import)
Special Words |
Description |
Src |
A folder containing all sub folders like redux, screens, api,etc |
Auto Import |
When you create a set it will automatically imported to parents |
shiv@tribondinfosystems.com
| |