When closing the "Sign in with apple" modal view on a real device on iOS15.1, the modal view jumps to the center of the screen then animate to the bottom and disappears. But the dismissal animation is correct on the simulator. I tested other apps with "Sign in with apple", they have the same issue. How can I fix the animation?
import SwiftUI
import AuthenticationServices
struct ContentView: View {
var body: some View {
VStack {
SignInWithAppleButton(.signIn,
onRequest: signInWithAppleOnRequest,
onCompletion: signInWithAppleOnComplete
)
}
.ignoresSafeArea(.all)
}
// MARK: Sign in with Apple on request
func signInWithAppleOnRequest(request: ASAuthorizationAppleIDRequest) {
request.requestedScopes = [.fullName, .email]
}
// MARK: Sign in with Apple on complete
func signInWithAppleOnComplete(result: Result<ASAuthorization, Error>) {
}
}