runner->AppDelegate->didFinishLaunchingWithOptions
method.- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Get the message content.
NSDictionary *remoteNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
// Perform logical processing according to the message content.
}
We recommend that you call XgFlutterPlugin().addEventHandler()
to set callbacks right after you initialize your app in Flutter. This helps ensure that the callback API remains valid when you cold start your app. Also, make sure that you configure all the callbacks you need in one XgFlutterPlugin().addEventHandler()
call. Repeated calls will overwrite the callbacks set in previous calls. For details, see the calling methods in example/lib/main.dart
of the project directory.
Was this page helpful?