nickname: String) case anonymous(token: String) } } extension Notification.Player { static let key = "Player" } guard let player = notification .userInfo?[Notification.Player.key] as? Notification.Player else { return } switch player { case .normal(id: let id, nickname: let name): print(id) print(name) case .anonymous(token: let token): print(token) } ΩʔΛ֮͑Δඞཁ͕ͳ͍ ܕΛΩϟετμϯ͢Δඞཁ͕ͳ͍ switch case จʹΑΔཏੑͷอূ