parse platform - Sending Push to tvOS - Stack Overflow

I have a tvOS Obj-C app that I'm having issues with sending a silent notification. I use Parse on

I have a tvOS Obj-C app that I'm having issues with sending a silent notification. I use Parse on back4app and am using CloudCode so when I save a class, it sends a silent notification the Apple TV and makes some changes there.

In my AppDelegate.m I have:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
        configuration.applicationId = @"APPID";
        configuration.clientKey = @"CLIENTKEY";
        configuration.server = @";;
    }]];
    self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
      
      // Load the Main storyboard
      UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
      
      // Instantiate the initial view controller from the storyboard
      UITabBarController *tabBarController = [mainStoryboard instantiateInitialViewController];
      
      // Set the tab bar controller as the root view controller
      self.window.rootViewController = tabBarController;
      
      // Make the window key and visible
      [self.window makeKeyAndVisible];
    [application registerForRemoteNotifications];

         
    return YES;
}


- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
    if ([userInfo[@"action"] isEqualToString:@"update_songs_list"]) {
        NSLog(@"Received push notification: Updating song list.");

        // Post a notification so the relevant view controller can handle it
        [[NSNotificationCenter defaultCenter] postNotificationName:@"UpdateSongsListNotification" object:nil];
    }
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
    if ([userInfo[@"action"] isEqualToString:@"update_songs_list"]) {
        NSLog(@"

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745256311a4618977.html

相关推荐

  • parse platform - Sending Push to tvOS - Stack Overflow

    I have a tvOS Obj-C app that I'm having issues with sending a silent notification. I use Parse on

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信