-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
fix: add ios 14 and above case #351
Conversation
@@ -102,21 +104,37 @@ async function setAccess (bundleId, permissionsMapping) { | |||
* @param {string} serviceName - the name of the service. Should be one of | |||
* `SERVICES` keys. | |||
* @param {string} simDataRoot - the path to Simulator `data` root | |||
* @returns {string} - The current status: yes/no/unset | |||
* @returns {string} - The current status: yes/no/unset/limited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the documentation in xcuitest-driver should be updated after this change is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
try { | ||
// iOS 14+ | ||
return await getAccessStatus( | ||
[['0', STATUS.NO], ['2', STATUS.YES], ['3', STATUS.LIMITED]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does value of '1' mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to find, but I was not able to figure 1
out yet. At least it is not in YES|NO|limited|unset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
location=always|inuse|never|unset
did not match as well
[['0', STATUS.NO], ['2', STATUS.YES], ['3', STATUS.LIMITED]], | ||
'auth_value' | ||
); | ||
} catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we catch some particular error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I was only aware of no auth_value
for the allowed
query. When both are wrong, I expect the allowed
one query will raise an error, then users may know something to report it
## [5.0.5](v5.0.4...v5.0.5) (2023-01-09) ### Bug Fixes * add ios 14 and above case ([#351](#351)) ([de60d15](de60d15))
🎉 This PR is included in version 5.0.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR is to fix getAcccess for iOS 14+ after #350
https://github.com/wix/AppleSimulatorUtils/blob/5467857407da4653305af119b2486051664a4f97/applesimutils/applesimutils/SetServicePermission.m
Should handle iOS version, or probably try iOs 14's first then fallback to existing one if an exception occurs only