0
Я пытаюсь следовать Azure's guide, чтобы настроить уведомление iOS push. Но когда дело доходит до шага 6, что говоритAppDelegate уже определяет FinishedLaunching
В
AppDelegate.cs
, обновление FinishedLaunching(), чтобы соответствовать следующее:public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { if (UIDevice.CurrentDevice.CheckSystemVersion (8, 0)) { var pushSettings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes); } return true; }
Я получаю эту ошибку Type 'AppDelegate' already defines a member called 'FinishedLaunching' with the same parameter types.
Как я могу почини это?
Ну, у вас есть еще один метод 'FinishedLaunching' в вашем' AppDelegate' класса? Если это так, удалите его. –
Что сказал Никита. Вероятно, у вас есть два определения одного и того же метода. –
Да, да. Я не видел, что Xamarin использовал его. Теперь мне интересно, почему RegisteredForRemoteNotification не вызывается –