running two ionic 3 apps on the same device


The issue can be replicated with the tutorial templates. I installed the blank and sidemenu templates using the CLI: ionic start First blank and ionic start Second sidemenu. If you build and put them on a device the following problem occurs.

The problem occurs only on iOS. If you start one of them, when you minimize it (by pushing the phone button), if you immediately start the 2nd app (in the first 5 seconds after you minimized the 1st app - i think it’s because of the iOS app lifecycle that sends the app to background after 5s) then the 2nd app starts the first app. But if you wait 5 seconds after minimizing the first app and then start the second app then it works, the second app actually starts.

I tested this on ionic 3.9.2
a) Ionic CLI 3.20.0, Cordova CLI 8.0.0, Node 8.11.1, npm 5.6.0, windows 10
b) Ionic CLI 3.20.0, Cordova CLI 8.1.1, Node 8.11.2, npm 6.4.1, macOS Sierra

Is there a solution for this? Can I have two Ionic 3 apps installed on the same iOS device and when I minimize the first one if I immediately start the second one it will actually start the second one and not the first? What can I do? What options do I have?

Thank you.

This may be a stupid question, but do these two apps have different widget ids in their config.xml?

Yes the ids are different. First has the default id: io.ionic.starter and Second has the id io.ionic.sidemenu. That is the only thing I’ve changed in the ionic template. I’ve created the apps using the CLI: 1) ionic start First blank 2) ionic start Second sidemenu and I’ve only changed the id in config.xml in Second.

The guys from Ionic responded. There was already an opened issue and they are working on it ->

Thanks anyway :slight_smile: