Even with testing, it happens that some users have problems with an application. I’d like to add an option, to enable debug logs. The goal is to ask the user the logs to find out what is the issue.
I was thinking of dumping the logs into a file using the ngCordova File plugin. Is that the best practice?
I don’t know if that will fit in your case though. Generally what you can do is build a remote logging infrastructure. Any exception that has caused in your ionic app will call a restful api to send the logs and stored it on the server.
I think when you build an app for production, debugging will be disabled as per below in ionic doc
This will minify your app’s code as Ionic’s source and also remove any debugging capabilities from the APK.