How to build UNA Mobile Apps for release

The documentation on GitHub and on all the videos for the UNA mobile apps show how to build a development app and then test it in the emulator.  It does not show how to create production releases at all.

For Android, if you install the apk created in ./android/app/build/outputs/apk/debug/app-debug.apk on an actual phone it does not work.

You get "Unable to load script.  Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release."

How do you package the apps for release?  There is no documentation.   React-native gives some instructions, but, their project structure does not correspond to the project structure of the UNA mobile distribution.

Would someone who's figured out how to make production release please provide a step by step guide on the process.

We'd like to create apk's and ios apps that can be tested on physical phones not in an emulator

Thank you in advance.

  • 2412
  • More
Replies (10)
    • Please refer to this guide, it should work for Android app:
      https://reactnative.dev/docs/signed-apk-android

      • In Step 1 the instructions it says

        "Edit the file ~/.gradle/gradle.properties or android/gradle.properties"

        No such file exists in the UNA project.

        Will there be more inconsistencies as we try to follow the instructions?

        • Re-checked out project.   Found gradle.properties, but....

          None of the strings in the React Native guide exist in the una gradle.properties file

          All the keys in the guide start with MYAPP_UPLOAD_... but in the project the keys start with

          MYAPP_RELEASE_...

          • Yeah.    I used the names in the gradle.properties file.  And built a release apk with my keys and it worked.

            Notes:   If you build the stock system, then modify the name, and build again you will get duplicate

            resource errors.  So, always start out fresh, modify the name, then build.

            If you've tested the stock version in the emulator, then be sure to stop the emulator and restart it, or, delete the app from the emulator otherwise 'react-native run-android --variant=release' will fail.

            • Links and references to different modules do not stay in the mobile-app.   They launch the browser and take you to that page.

              How do I make links and modules stay in the app?

              • The ios XCode workspace does not work in XCode 11.4 that was installed with Catalina OS update.

                Could you provide a working workspace and what fields need to be customized?

                The tab you pressed and the strings you highlighted aren't there anymore.

                • So there is Zero Documentation on building the Android App? I can't find anything

                  • So this seems to be incompatible with Gradle 7.0 I get depreciated code is incomparable with Gradle 7.0

                    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

                    • Hello PRiZM !

                      Did you visit this page https://github.com/unaio/una-mobile-app ? As the first stage.

                      • Yes I am way past that. I have already built a production release on IOS for the App Store but am getting these errors when compiling the Android app.. 

                        Login or Join to comment.