-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set location permission not working as expected #111
Comments
Greetings @asafkorem, Could you please take a look at the issue and try to fix it if possible? Appium uses AppleSimulatorUtils to handle permissions, and this problem affects everyone who has upgraded their simulators to version 16 and above. It might be helpful: I've tested Thank you for your time and consideration. |
I just started seeing this after updating to the Xcode 15 GM and running on iOS 17. I was able to work around it by omitting "location" from the permissions I was setting entirely, since I don't need it. I am noticing that this was the same behavior as an issue with the "health" permission on iOS 16, which looks like it was fixed here: #106. Maybe this is the same kind of issue? |
same here, started reproducing it with Xcode 15, the issue is not only iOS17 for me, fails on 15.5 simulator as well. Command I'm running:
and the error message:
|
I will take a look at this issue next week. Thank you for the report and the information provided. |
I'm having the same problem setting location permissions after updating to iOS 17 / iPhone 15 / xcode Version 15.0 (15A240d) / - applesimutils version 0.9.10 / brew doctor / update
All other permissions are able to be set via applesimutils I.E
|
No, I don't have any error being displayed and my issue is only with location permissions, others work fine such as notifications, medialibrary and photos Setting location permission, or any permissions, with iOS 15.5 is working.
Downloading iOS 16 now to try that as well to cover bases.. To note - originally I also had the same error as artem888 thou that was fixed with updating AppleSimulatorUtils to 0.9.10 |
Hello, I am facing a similar issue. I updated to Xcode 15 (and iOS 17) and now location permissions do not seem to be correctly applied (app is requesting location permissions, which breaks my tests). I am using the latest |
@asafkorem I can confirm this issue is only related to iOS 17 iOS 15.5 and 16.4 work as you would expect in setting location permissions as well as the other available permissions @dylanrandle Same problem as you are experiencing, I'm running my tests against iOS 16 for now, to be able to keep moving. |
It's worth noting that the logs indicate that the permissions are set correctly, and it only seems to affect the location permissions in my case (notifications/contacts are correctly applied). |
Can confirm that using iOS 16.4 resolves my issue. |
I am not able to set location permission on XCode 15 iOS 17 simulator, notification and tracking permission are getting set perfectly on iOS 17. Location permission is getting set successfully on iOS 15 simulator on XCode 15 as well as on iOS 16 on previous XCode version so it seems there is a bug only for location permission and only on iOS 17. Applesimutils version latest 0.9.10 |
I still have this error on the simulator with ios 16.4 and applesimutils 0.9.10 version It appears as follows: if I apply |
Even when running on iOS 16.4, using location permissions set to The error output I get is
|
@asafkorem Has there been any progress on this issue, or any workaround for this? I tried to downgrade my XCode version, but versions <v15 are not compatible with the Sonoma OS so that is not possible for me without downgrading my whole OS, which is not feasible |
I am also hitting this issue with Location permissions not being set on iOS 17 when setting to 'Always', I am in desperate need of a solution or workaround |
I'm encountering this issue as well. None of the location permission options seem to take. It makes it impossible for use to run our tests. |
Since See |
Do you have an example of how we can use that to set location permissions for a specific detox test? Or are you just saying that you are working on integrating |
Same problem here. Works on Xcode 14.1 but fails on Xcode 15.1 FAILS - The failures give error:
I was using:
EDIT: My original post was incorrect. This exact issue is not on iOS 16. It is only iOS 17. iOS 16 appears to have this issue if using an old version of ASU. I was testing on 2 machines, one of which hadn't been updated. |
@micahdasMA This workaround might be of interest. EDIT: This is only relevant if you just test against iOS 17. It basically just running the following before the calling launchApp. I've quickly tested it and it seemed to work but it's not a great workaround. I think it would be a source of flaky tests and a better solution would be for detox to handle it. I'll be using it in the short term but will look for a better solution. Our company policy forced Somona 14 to install without warning which in turn forced be to move to Xcode 15 before I wanted too so I don't have any other options at this point in time.
|
Hey, in case you're experiencing AppleSimUtils issues with Detox, please upgrade to Detox v20.16. This version resolves this issue for Detox (we've migrated some commands from AppleSimUtils to Xcrun Simctl). |
For any other use-case (not-Detox), please migrate your location permission command to Simctl. |
|
Description
When setting the location permission for my app to
always
orinuse
via applesimutils, the app can no longer get the simulators locationIf you are describing an issue with
brew install
:brew doctor
and fixed all issuesSteps to Reproduce
applesimutils --byId EE55BEC3-22D4-47DE-90C9-2D3EAC26C843 --bundle com.yourbind.BindBenefits.mobile --setPermissions "location=always"
Expected Behavior
App should continue to get device location
Environment
Additional Context
A workaround after step 3 from above is to go to Features -> Location on the simulator menu and change to a different location and then back to the original location I had set. But, obviously, this would not work well with Detox automation testing
The text was updated successfully, but these errors were encountered: