Building Native Mobile App
React-Native Registration and Build Steps:
Pre-requisites:
- JDK 8
- Android SDK
- NPM
- Python
- React-Native CLI
- Pod Repo
- GIT
Steps to create react-native project:
Open the buildregister.properties file and change the SOURCE_PATH value to this SVN path.
Example:(19.1.0.0/Sources/CT/MobileSource/RNModelhouse/CTModelhouse) and ANT_LIB(To use antform and related tasks, point the ANT Jars from SVN in this property)Note: Access needed for 19.1.0.0 Branch because from that only copying the required files for the project
Run the buildregister.xml file(Run command: ant -f buildregister.xml) this registration build script
It will ask for Application Name give your application name,package name as com.intellect.canvas and choose the location for the project and click submit
After generating the project it will ask for keystore(If you are taking release build click yes and provide the keystore) otherwise click no.
If yes provide the keystore details in antform- Next it will ask for the firebase configuration files(Eg:google-services.json and Google-serviceinfo.plist) if you are going to use the pods on your project provide the files for that click yes otherwise click no will provide the default configuration files
- Next it will ask for the exportOptions.plist file for exporting the ipa from archieve provide the file for release mode as well as debug mode(exportOptions.plist is a file include provisioning profile and distribution certificates)Â
- Registration Success
Steps to do Manual Changes in Xcode Project before taking the IOS Build:
- Open the xcworkspace file in project root folder /ios/applicationname.xcworkspace it will open the project with linked libraries in Xcode
- Open File->workspace Settings->Build System->change to Legacy Build System
- Click on the ProjectName in Xcode->Go to the tab General->change the bundle identifier to com.intellect.canvas and
- under code signing(Debug) uncheck disable automatically signing select the Provisioning Profile in that (Eg:Canvas_Development_Profile)
- under code signing(Release) uncheck disable automatically signing select the Provisioning Profile in that (Eg:Canvas_Distribution_Profile)
- under this Deployment target as universal
- Click on the ProjectName in Xcode->under that click ProjectNameTests(Eg:CTModelhouseTests) disable the automatically signing for code signing(Debug) and code signing(Release) and select the Development team certificate(Eg: Intellect Design Arena Limited) or update the Development Team ID
- Click on the libraries in your project->click RNMail.xcodeproj->click RNMailtests disable the automatically signing for code signing(Debug) and code signing(Release) and select the Development team certificate(Eg: Intellect Design Arena Limited) or update the Development Team ID
- Click the Project Name(in top) in Xcode->General->EmbeddedBinaries->add RSKImageCropperFramework.IOS and QBImagePickerFramework.IOSÂ
- Click the Project Name(in top)>Targets>Build Phases->copy Bundle Resources->remove fusioncharts.html (from assets/fusion charts) because it is getting added from two placesÂ
- Add Google-Info.plist in the xcodeprojectÂ
- Click Product->cleanÂ
Click Product->archive to generate the archive after which you can select the profile and export the ipa. Â
Note: For IOS, after registering the project for the first time, you have to the build ipa in xcode. Subsequently you can start the build from the build script.
Steps for taking the build process
- Open the command line from the project root folder and enter the command ant.
- Enter the Platform and Build Type.
Select the platform and build type and click Build.
Note:
1. It will generate the apk for release mode in android/app/build/outputs/apk/release/app-release.apk
2. It will generate the apk for debug mode in android/app/build/outputs/apk/debug/app-debug.apk
3. It will generate the ipa in project root folder/ios/build/ApplicationName.ipa