Post

Replies

Boosts

Views

Activity

The console displays "Failed to parse font key token"
Failed to parse font key token is displayed at console. It doesn't particularly cause crashes, UI bugs, etc., but it is a concern. This is occurred when I zoom on SwiftUI Map. Part of code struct MapView: View { var body: some View {     Map(coordinateRegion: $viewModel.region,       showsUserLocation: true,       annotationItems: viewModel.pins,       annotationContent: { item in       MapAnnotation(coordinate: item.coordinate, anchorPoint: CGPoint(x: 0.5, y: 0.5), content: {         pinButton(pin: item)       })     })     .ignoresSafeArea()   } } My project is here.
1
2
1.3k
Mar ’22
when identityToken or authorizationCode is nil??
I wrote as follows. An error occurred on line 14 because of forced unwrapping. extension SignInViewController: ASAuthorizationControllerDelegate { @available(iOS 13.0, *) func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { var name: String? = nil if let appleIDCredential = authorization.credential as? ASAuthorizationAppleIDCredential { if let fname = appleIDCredential.fullName?.familyName { name = fname } if let gname = appleIDCredential.fullName?.givenName {name = name == nil ? gname : name!+gname} authenticateWithApple(token: appleIDCredential.identityToken?.toString, code: appleIDCredential.authorizationCode?.toString, name: name) } } func authenticateWithApple(token: String?, code: String?, name: String?) { authenticationScenario.signOut(from: .apple) let param = [LQAAccountAppleTokenKey:token!, LQAAccountAppleAuthorizationCode:code!] ... } } I fixed it by rewriting as below, but I would like to know why nil is included in identityToken or authorizationCode. guard let identityToken = appleIDCredential.identityToken, let idTokenString = String(data: identityToken, encoding: .utf8) else { return } guard let authorizationCode = appleIDCredential.authorizationCode, let authCodeString = String(data: authorizationCode, encoding: .utf8) else { return }
1
0
1.3k
Oct ’21
The console displays "Failed to parse font key token"
Failed to parse font key token is displayed at console. It doesn't particularly cause crashes, UI bugs, etc., but it is a concern. This is occurred when I zoom on SwiftUI Map. Part of code struct MapView: View { var body: some View {     Map(coordinateRegion: $viewModel.region,       showsUserLocation: true,       annotationItems: viewModel.pins,       annotationContent: { item in       MapAnnotation(coordinate: item.coordinate, anchorPoint: CGPoint(x: 0.5, y: 0.5), content: {         pinButton(pin: item)       })     })     .ignoresSafeArea()   } } My project is here.
Replies
1
Boosts
2
Views
1.3k
Activity
Mar ’22
when identityToken or authorizationCode is nil??
I wrote as follows. An error occurred on line 14 because of forced unwrapping. extension SignInViewController: ASAuthorizationControllerDelegate { @available(iOS 13.0, *) func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { var name: String? = nil if let appleIDCredential = authorization.credential as? ASAuthorizationAppleIDCredential { if let fname = appleIDCredential.fullName?.familyName { name = fname } if let gname = appleIDCredential.fullName?.givenName {name = name == nil ? gname : name!+gname} authenticateWithApple(token: appleIDCredential.identityToken?.toString, code: appleIDCredential.authorizationCode?.toString, name: name) } } func authenticateWithApple(token: String?, code: String?, name: String?) { authenticationScenario.signOut(from: .apple) let param = [LQAAccountAppleTokenKey:token!, LQAAccountAppleAuthorizationCode:code!] ... } } I fixed it by rewriting as below, but I would like to know why nil is included in identityToken or authorizationCode. guard let identityToken = appleIDCredential.identityToken, let idTokenString = String(data: identityToken, encoding: .utf8) else { return } guard let authorizationCode = appleIDCredential.authorizationCode, let authCodeString = String(data: authorizationCode, encoding: .utf8) else { return }
Replies
1
Boosts
0
Views
1.3k
Activity
Oct ’21