diff --git a/ios/Classes/OneSignalPlugin.m b/ios/Classes/OneSignalPlugin.m index 14875e0..0c3d2cb 100644 --- a/ios/Classes/OneSignalPlugin.m +++ b/ios/Classes/OneSignalPlugin.m @@ -56,10 +56,10 @@ + (instancetype)sharedInstance { #pragma mark FlutterPlugin + (void)registerWithRegistrar:(NSObject*)registrar { - [OneSignal initialize:nil withLaunchOptions:nil]; OneSignalWrapper.sdkType = @"flutter"; OneSignalWrapper.sdkVersion = @"050202"; - + [OneSignal initialize:nil withLaunchOptions:nil]; + OneSignalPlugin.sharedInstance.channel = [FlutterMethodChannel methodChannelWithName:@"OneSignal" binaryMessenger:[registrar messenger]];