Skip to content
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

Merged
merged 12 commits into from
Jan 9, 2023
Merged

fix: add ios 14 and above case #351

merged 12 commits into from
Jan 9, 2023

Conversation

KazuCocoa
Copy link
Member

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

Base automatically changed from fix-udid-permissions to master December 19, 2022 07:51
@@ -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
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@KazuCocoa KazuCocoa marked this pull request as ready for review January 9, 2023 06:42
try {
// iOS 14+
return await getAccessStatus(
[['0', STATUS.NO], ['2', STATUS.YES], ['3', STATUS.LIMITED]],
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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 {
Copy link
Contributor

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?

Copy link
Member Author

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

@KazuCocoa KazuCocoa merged commit de60d15 into master Jan 9, 2023
@KazuCocoa KazuCocoa deleted the fix-get-permission-io-14 branch January 9, 2023 18:01
github-actions bot pushed a commit that referenced this pull request Jan 9, 2023
## [5.0.5](v5.0.4...v5.0.5) (2023-01-09)

### Bug Fixes

* add ios 14 and above case ([#351](#351)) ([de60d15](de60d15))
@github-actions
Copy link

github-actions bot commented Jan 9, 2023

🎉 This PR is included in version 5.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants