Chapter 14: Sign in With Apple -- checking .fullName

When checking the results of the SIWA authentication, comparing credential.fullName to nil is insufficient. Evidently .fullName is populated with something other than nil for all logins.

Only on the first authentication does .fullName contain the users full name. Subsequent authentications will contain a .fullName but the users name is not actually present. Hence,

credential.fullName == nil

will always be false.

Better to check .fullName against an ‘empty’ PersonNameComponents

credential.fullName == PersonNameComponents.init()

iOS 16.0