[NativeMobile] How to generate config.json via command line?

0
Hello All! I'm trying to use a PowerShell script to generate my APK "from A to Z", that is, downloading (or cloning) the RN template from Github, transpiling the MX projects into bundles, copying the bundle files to RN Template, running "npm install" and "npm run configure", and finally running "npx react-native build-android --variant=appstoreDebug"So far, I've managed to get "npm install" run successfully, but I've failed on  "npm run configure" . Cause: the file config.json is missing [configure] Failed trying to retrieve configuration from ./config.json Question: Is there a way to generate config.json via command line? Thanks in advance!
asked
2 answers
0

Go to the directory of the config.json or add the path in the commands below:

echo ‘ line 1’ > config.json

echo ‘ line 2’ > > config.json

echo ‘ line 3’ > > config.json

 

Have fun

answered
0

Hello all, 

 

Unfortunatelly, after contacting MX Support, they confirmed that there’s no way to generate ‘config.json’ via command line. The feasible solution will be to get a ‘template’ config.json, previously generated by Build Native Mobile App, and manually proceed with the required changes related to your project (‘appIdentifier’, ‘appName’, etc). This solution is far from being the ideal, but at last is a solution.

Regarding the command line to generate the APK, you must type:

cd [template_project_folder]\android\
.\gradlew.bat assembleAppstoreDebug

and to generate the bundle AAB

cd [template_project_folder]\android\
.\gradlew.bat bundleAppstoreDebug

That’s it!

 

 

 

answered