Closed jeffsawatzky closed 3 years ago
Thank you for the Pull Request ! Selecting multiple devices at the sidebar shouldn't be too hard to implement for me.
The only problem I currently have is that I'm not sure about how this feature should work from the UI side. Currently when you switch the selected device inside LocationSimulator, the spoofed location will be forgotten for the previous device. I plan to change this, so that will work this way:
If I now allow selecting multiple devices, I'm not sure how I should handle the case where multiple devices are already spoofing. Assume that device 1 and device 2 are currently performing a navigation. I now select both of them simultaneously. What should be shown inside the MapView ? The route of device 1 or the route of device 2 or neither of them ? Should I reset the spoofed location when selecting multiple devices at once ?
Don't get me wrong. This is a feature which I really like and would love to implement, I just don't know how to add it to the UI, without making the process unintuitive.
What is the use case for switching between devices frequently? I was doing that before, but only because I couldn't spoof mulitple devices at the same time.
You could show a dialog to the user with something like:
┌─────────────────────────────────────────────────────────┐
│ │
│ The device you are connecting has a previous location │
│ saved. What would you like to do? │
│ │
│ Choose location: │
│ ┌┐ │
│ └┘ Keep current location │
│ │
│ ┌┐ │
│ └┘ Navigate to saved location │
│ │
│ ┌┐ │
│ └┘ Transport to saved location │
│ │
│ │
│ │
│ Choose devices: │
│ ┌┐ │
│ └┘ Keep all devices connected │
│ │
│ ┌┐ │
│ └┘ Disconnect devices currently connected │
│ │
│ │
│ │
│ ┌────────────────┐ ┌────────────────┐ │
│ │ │ │ │ │
│ │ OK │ │ Cancel │ │
│ ┌┐ │ │ │ │ │
│ └┘ Save choice └────────────────┘ └────────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Could also make multi-device support optional, and off by default
This is a first stab and supporting multiple devices. Refs #82 Also fixed some typos.
Note: I AM NOT AN IOS DEVELOPER. :) Please, provide feedback on how to make any of this better.
Also Note: Multiple select on the side bar isn't working...and I don't know how to fix that. But, if I hard code the
selectedDevices
to just return the list of allself.realDevices
the rest of it seems to work.