поскольку NSError
стало Error
в Swift 3.0, как вы справляетесь с кодами ошибок? Например:
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
if error.code == 3010 {
print("Push notifications are not supported in the iOS Simulator.")
} else {
print("application:didFailToRegisterForRemoteNotificationsWithError: %@", error)
}
}
Выдает сообщение Value of type Error has no member code
. Должен ли я передать его на NSError?