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

Build Mizuame with Swift 6 #196

Closed
3colorr opened this issue Mar 9, 2025 · 7 comments
Closed

Build Mizuame with Swift 6 #196

3colorr opened this issue Mar 9, 2025 · 7 comments
Assignees
Labels
improvement Something is improving

Comments

@3colorr
Copy link
Owner

3colorr commented Mar 9, 2025

No description provided.

@3colorr 3colorr self-assigned this Mar 9, 2025
@3colorr 3colorr added this to Mizuame Mar 9, 2025
@3colorr 3colorr added the improvement Something is improving label Mar 15, 2025
@3colorr 3colorr moved this to In Progress in Mizuame Mar 15, 2025
@3colorr
Copy link
Owner Author

3colorr commented Mar 20, 2025

I encountered an error "Reference to var 'kAXTrustedCheckOptionPrompt' is not concurrency-safe because it involves shared mutable state".

let options: [String: Bool] = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]

Image

@3colorr
Copy link
Owner Author

3colorr commented Mar 21, 2025

Fixed: 9b61749

@3colorr
Copy link
Owner Author

3colorr commented Mar 22, 2025

AXIsProcessTrustedWithOptions(_ options:)

We should request accessibility permission from the user using AXIsProcessTrustedWithOptions(_ options:) and kAXTrustedCheckOptionPrompt, but a reference error for kAXTrustedCheckOptionPrompt occurs in Swift 6.

However, I recall that in Swift 5, when the app sandbox was enabled, no alert requesting accessibility permission appeared even with AXIsProcessTrustedWithOptions(_ options:).

In that case, maybe we can forego using AXIsProcessTrustedWithOptions(_ options:) by creating our own alert for requesting accessibility permission (in fact, we already do), and still achieve the same result.

@3colorr
Copy link
Owner Author

3colorr commented Mar 22, 2025

9b61749: The mention of macOS 13 or later below turned out to be completely irrelevant.

However, on macOS 13.x or later, we no longer need to reference "kAXTrustedCheckOptionPrompt".

@3colorr
Copy link
Owner Author

3colorr commented Mar 23, 2025

955cbd9: Fixed the test

@3colorr 3colorr moved this from In Progress to Done in Mizuame Mar 23, 2025
@3colorr
Copy link
Owner Author

3colorr commented Mar 23, 2025

#199 : Pull request.

@3colorr 3colorr closed this as completed Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something is improving
Projects
Status: Done
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant