Repository navigation
Support Swift 6 - #15
Open
kimkyuchul wants to merge 4 commits into
Open
kimkyuchul wants to merge 4 commits into
kimkyuchul wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@e-sung 안녕하세요 블로그의 접근성 글을 읽고 Swift 6 환경의 데모 프로젝트에서 AXSnapshot을 사용해보다가 발견한 문제에 대응합니다.
문제
Swift 6 환경에서
AccessibilityDescription의 전역 변수 접근 시 Swift 6 Concurrency 에러가 발생합니다.description 생성 클로저 6개가 격리되지 않은 전역 가변 변수라서, 호출부가
@MainActor여도 strict concurrency 에러가 발생합니다.수정
NSObject.accessibilityDescription을@MainActor로 격리했습니다. 모두 UIKit 접근성 API를 다루는 값이라 다른 동시성 도메인으로 이동할 일이 없어,Sendable대응보다@MainActor격리가 적합하다고 판단했습니다.['5.0', '6.0']으로 선언해 기존 CocoaPods 사용자를 유지합니다.swift package generate-xcodeproj명령을 사용 중이라 함께 현행화했습니다.검증