Recently converted my app from the previous version to swift 3. Predictably, this caused a lot of errors in my code. I do not know how to fix the following one:
(In the Appdelegate.swift
):
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
if error.code == 3010 {
print("Push notifications are not supported in the iOS Simulator.\n")
} else {
print("application:didFailToRegisterForRemoteNotificationsWithError: %@\n", error)
}
}
The error given is that the value of type error has no member "code". How do I get around this?