eduvpn / apple

app for iOS and macOS
Other
62 stars 18 forks source link

First element from "Secure Internet" cannot be chosen #375

Closed ghost closed 3 years ago

ghost commented 3 years ago

When trying to switch countries (Secure Internet), it seems the first element, in this case "Albania" can not be chosen. It will simply fail to switch to it and keep the old selection. It seems this may be a bug in the list implementation, off by one error?

iOS eduVPN 2.1.9 (1177).

roop commented 3 years ago

Indeed. I can confirm that this problem exists. This is most likely because the check here should've been index >= 0 instead of index > 0.

ghost commented 3 years ago

Do you know why this is an issue on iOS, but not macOS? Don't they share the same code? Or is this country selector special?

roop commented 3 years ago

On macOS, we use a pulldown menu, which is a standard UI component. On iOS, there's no equivalent UI component, so we show a separate view modally for allowing the user to make the selection. The bug is likely in that part of the code (you'll notice that the probably buggy line I mentioned earlier is within an #if os(iOS) block).

ghost commented 3 years ago

Ah, right, I missed that. Thanks for explaining!