2016-09-29 4 views
0

Azure's guideに従ってiOSプッシュ通知を設定しようとしています。しかし、6段階になると、AppDelegate.csAppDelegateはすでにFinishedLaunchingを定義しています

を言うこと、 に一致するように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.

このエラーが出ますこれを修正しますか?

+1

まあが作成され、それ自身のFinishedLaunching、作成したことが、表示されませんでしたか?その場合は、取り外します。 –

+0

ニキータが言ったこと。同じメソッドについて2つの定義がある可能性があります。 –

+0

はい、私はしました。私はXamarinがそれを使っているのを見たことがありません。今私は、なぜRegisteredForRemoteNotificationが呼び出されていないのだろうと思っています –

答えて

0

申し訳ありませんが、私はあなた `AppDelegate`クラス内の別の` FinishedLaunching`方法を持っているか、Xamarinは、プロジェクトが

関連する問題