Replace App keeping data - Testflight release vs. App Store release

We want our testers to be able to:


1) replace an installed Tesflight version of our app (test-version) when installing the App Store released version of our app (app_store-version) without loosing their data (all inside the app bundle, Core Data and such, Keychain data, User Defaults).


2) vice versa

Replace an installed app_store-version with an test-version without loosing the above mentioned data.


The only information I found is in the Testflight documentation: "...If you already have the live version of the app installed on your device, the beta version of the app will replace the live version. When you’ve downloaded the beta app, you’ll see an orange dot next to its name that identifies it as a beta. ..."


I did not find any information regarding the opposite case (... if you already have a test-version installed, the app_store-version will replace it...) nor if the above mentioned data is kept when replacing the app.


Apple Developer Support told me that they do not have this knowledge and suggested to ask here :-/


My Questions are:


1) Is is possible to replace a Tesflight version of our app (test-version) with a App Store released version of our app (app_store-version) without loosing the above mentioned data?


2) Is is possible to replace a App Store released version of our app (app_store-version) with a Tesflight version of our app (test-version)without loosing the above mentioned data?


3) If 1+2 is possible, which parameters are taken into account to replace/ not replace an app? (BundleID & BundleVersion?)