ios如何从OneSignal通知中获取alertview-button操作?

时间:2017-01-30 10:46:21

标签: ios objective-c notifications onesignal

how to get notification Alert action event handler ?

  • 在AppDelegate.m中

    [OneSignal initWithLaunchOptions:launchOptions appId:@“将应用ID放在这里。” handleNotificationReceived:^(OSNotification * notification){         NSLog(@“收到通知 - %@”,notification.payload.notificationID);     } handleNotificationAction:^(OSNotificationOpenedResult * result){

    UIBezierPath *path = [UIBezierPath interpolateCGPointsWithHermite:arrayPoints closed:YES];
    
    • (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“http://www.google.com”]]; }

0 个答案:

没有答案