08 Jan 2020 09:45 AM - last edited on 27 Apr 2021 11:37 AM by MaciejNeumann
The Dynatrace document shows that we need to use "cordova build android" or "cordova build ios" to build Cordova mobile app. However, customer's development environment used "cordova prepare" to bundle all of their scripts to build the codes. As a result, dynatrace.properties has not been generated by using "Cordova prepare" command. I can not see the dynatrace.properties under asset folder in APK. But I can see all of the Dynatrace Cordova plugin methods in APK. So I would like to ask what is the difference between "cordova build android/ios" and "cordova prepare" when it comes to dynatrace.config? Would it affect the creation of dynatrace.properties? Thank you.
Solved! Go to Solution.
08 Jan 2020 11:09 AM
Did you try using "cordova prepare android"?
Sebastian
08 Jan 2020 02:43 PM
I want to understand how your customer is using his application. So "cordova prepare" should trigger our plugin as well, but it will only download and copy the JSAgent into your platform. You are right that nothing more happens. So if your customer is afterwards using the project directly via XCode or Android Studio you are of course not able to use the ability of the Cordova Plugin.
Workaround: You need to include the Mobile Agent in your native projects manually (e.g. in Android insert the agent in the gradle files like you have a real Android application). This will change in the future as we want to include the 8.x Mobile Agent in the Cordova plugin as well, so your case should be then supported out of the box. But I can't give you a timeframe for this change.
09 Jan 2020 01:37 AM
Thanks for your quick response. Customer is going to build the Apps by using native method. Thank you.