arcus-smart-home / arcusios

Apache License 2.0
25 stars 22 forks source link

Ability to switch Arcus platforms in app #1

Open AndrewX192 opened 5 years ago

AndrewX192 commented 5 years ago

Ideally the app should support the ability to switch base URLs for the API, so that multiple Arcus platforms can exist, rather than requiring each platform to build a separate app.

msilvermanks commented 5 years ago

This exists but is hidden - on the login screen, do a quick pinch three times from the outside in with two fingers and you'll get a selector to do this

AndrewX192 commented 5 years ago

Hm, I logged out of the Arcus app and tried to do a quick pinch three times on various parts of the login screen, but nothing showed up. It'd be really useful if this was possible on the Iris app that's in the app store, but unfortunately it tries to make networking requests before the login page shows up (I believe it's testing whatever credentials are stored), and crashes when it can't connect. The latest version in the appstore just shows a shut down message and I wasn't able to get the menu to show up their either.

Jamonek commented 5 years ago

Search for BuildConfigure.clientBundleVersion. That will help you solve the pinch issue

Jamonek commented 5 years ago

https://github.com/arcus-smart-home/arcusios/blob/5c08e720ba49c96eff022e37cec3bc4890ecbf7d/i2app/i2app/ApplicationRoutingService.swift#L497

Remove the check for if the bundle identifier matches the dev bundle identifier. Should fix the issue of not being able to bring up the DebugMenu

AndrewX192 commented 4 years ago

Ok, I finally got around to following the advice provided (thanks again @Jamonek!). The current debug menu doesn't appear to allow a custom URL to be input, but does allow toggling between dev/prod.

In order to get this in the app store, I think I'd need to add a prompt to select the Arcus Server (e.g. URL) on startup. This way the AppStore testing program can login to a pre-prod instance to verify functionality, and then end-users can pick the Arcus Platform they want to use.