I'm using OneSignal service in my Xamarin iOS app, accord the documentation: https://documentation.onesignal.com/docs/xamarin-sdk-setup
I've made all steps, BUT if i override the AppDelegate methods
OnResignActivation
DidEnterBackground
WillEnterForeground
WillTerminate
OnActivated
I'm getting the next error:
ObjCRuntime.RuntimeException: Cannot get the method descriptor for the selector 'oneSignalApplicationDidBecomeActive:' on the type 'AppDelegate', because the selector does not correspond to a method
I need to override those methods, what is my error?
Thanks!
try this in your Application's AppDelegate
[Export ("oneSignalApplicationDidBecomeActive:")]
public void OneSignalApplicationDidBecomeActive(UIApplication application) {
Console.WriteLine ("oneSignalApplicationDidBecomeActive:");
}
I was having a similar issue with oneSignalDidFailRegisterForRemoteNotification:error:
Fixed with this code inside AppDelegate. Hope it helps
[Export("oneSignalDidFailRegisterForRemoteNotification:error:")]
public void OneSignalDidFailRegisterForRemoteNotification(UIApplication app, NSError error)
{
Console.WriteLine("oneSignalDidFailRegisterForRemoteNotification:error:");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With