LoginSignup
0
1

More than 3 years have passed since last update.

Unsupported type: NSPersonNameComponents (found in field fullname) 型に注意

Posted at

【iOS】Sign In with Apple をドキュメント通りに使っていると

if let code = appleIdCredential.authorizationCode { 
   authorizationCode = String(bytes: code, encoding: .utf8)
}
let userIdentifier = appleIdCredential.user
let fullName = appleIdCredential.fullName
let email = appleIdCredential.email

こんなクラッシュが。
Unsupported type: NSPersonNameComponents (found in field fullname)

fullnameはString型ではなく、PersonNameComponents型でした。

まとめ

プログラミングを始めたてのころは型のことなんてそっちのけでした。
そんな過去の自分に向けた戒めかつ、誰かしらの救いになればいいと思っています。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1