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

feat: add new iOS versions #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dilex42
Copy link

@dilex42 dilex42 commented Sep 9, 2024

- regex: 'CFNetwork/.{0,100} Darwin/23\.6\.\d+'
os_replacement: 'iOS'
os_v1_replacement: '17'
os_v2_replacement: '6'
Copy link
Contributor

Choose a reason for hiding this comment

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

All those regexes are duplicates. We need one that extracts the os_v2 from the input string.
This is too many regexes to be added imho - cc @migueldemoura

Copy link
Author

Choose a reason for hiding this comment

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

My concern is that we can't be certain that it will work always. It appears, according to the site I provided, Apple uses Darwin x.6 to denote every version that comes after iOS y.5. So now I even need to fix my PR for this.

I guess we can do something like CFNetwork/.{0,100} Darwin/23\.([1-5])\.\d+ for v17 and with 24 for v18 and then fall back to os_v1 only for other versions, but will it actually be more clean and readable?

Copy link
Contributor

Choose a reason for hiding this comment

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

My worry is more for performance than cleanliness and readability. Given the above, we could use the regex you sent and match [1-6], and it'd work. Happy for you to update it the way you prefer, my only say is: the fewer regexes, the better!

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

Successfully merging this pull request may close these issues.

3 participants