Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignInWithAppleButton not found in scope (SwiftUI 2)

I'm implementing Sign In With Apple in a SwiftUI application (iOS 14, SwiftUI 2). I'm importing the AuthenticationServices framework. The app build successfully, and can run on an iOS device or simulator. But I cannot preview the view in the Preview / Canvas (it would be easier to design the view).

Cannot find 'SignInWithAppleButton' in scope

Any idea why? Thanks Axel

PS: Xcode 12 beta 6, macOS Big Sur beta 5

like image 559
alpennec Avatar asked Sep 13 '20 17:09

alpennec


1 Answers

The namespace of SignInWithAppleButton has moved from SwiftUI to AuthenticationServices since beta 6. Just import AuthenticationServices.

like image 145
Kou Ariga Avatar answered Sep 27 '22 22:09

Kou Ariga