I managed to found a solution (only for android).
To not delete the "released App" download from Google Play, I add these lines in the file android/app/build.gradle
:
android {
buildTypes {
// ------ Start Changes -----
debug {
applicationIdSuffix ".debug"
}
// ----- End Changes -----
}
}
In that way the package will be com.example.app
for a release app and com.example.app.debug
for my debug app and there is no conflict anymore.
However I also wanted a different app name so I can differenciate both apps.
To do so I followed this comment:
In the file android/app/src/main/AndroidManifest.xml
I made this change:
<manifest ...>
<application
// before : android:label="App"
android:label="@string/app_name" // <- After my changes
>
</application>
</manifest>
Then to set up the name for the release app, create or modify the file android/app/src/main/res/values/string.xml
:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">App</string>
</resources>
And for the debug version, create or modify the file android/app/src/debug/res/values/string.xml
:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">App Debug</string>
</resources>