Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- DooC
- detent
- SF Symbols
- Hand Action Detect
- NSUserActivity
- Mac
- AppleEvent
- AVFoundation
- Xcode Cloud
- Xcode Organizer
- SWiFT
- actor
- MDM
- Physical Audio
- DriverKit
- METAL
- WWDC 2021
- concurrency
- Hand Pose Detect
- App Clip
- ProRAW
- swiftUI
- async
- SF Symbols 3.0
- profile
- CoreML
- User Enrollment
- Object Capture
- Reality Composer
- AR Quick Look
Archives
- Today
- Total
목록Short answer (1)
nyancoder
Actor-isolated instance method '' can only be referenced on 'self'
문제 상황 Swift의 Actor에서 다른 Actor의 함수를 접근할 때 발생하는 오류 중 하나로 아래와 같이 발생한다. 해결 방안 해당 함수를 async로 선언하면 발생하지 않는다. actor TestActor { func foo(testActor: TestActor) async { await testActor.bar() } func bar() { } } 또는 아래와 같이 async 블럭으로 감싸도 된다. actor TestActor { func foo(testActor: TestActor) { async { await testActor.bar() } } func bar() { } } 연관 자료: WWDC 2021 - Protect mutable state with Swift actors WWDC 20..
Short answer
2021. 7. 1. 23:47