Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:22:01+00:00 2026-06-16T00:22:01+00:00

Hello, I’m using Apple APNS to send RemoteNotification. The problems that I found are:

  • 0

Hello, I’m using Apple APNS to send RemoteNotification. The problems that I found are:

First of all, I want to receive RemoteNotification and then jump other page, not the main page (first page)my code:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {

    NSLog(@"remote notification: %@",[userInfo description]);
    NSDictionary *apsInfo = [userInfo objectForKey:@"aps"];

    NSString *alert = [apsInfo objectForKey:@"alert"];
    NSLog(@"Received Push Alert: %@", alert);
    NSString *sound = [apsInfo objectForKey:@"sound"];
    NSLog(@"Received Push Sound: %@", sound);
    NSString *badge = [apsInfo objectForKey:@"badge"];
    NSLog(@"Received Push Badge: %@", badge);

    application.applicationIconBadgeNumber = [[apsInfo objectForKey:@"badge"] integerValue];


    if ([userInfo objectForKey:@"type"])
    {

        NSString *nsType = [userInfo objectForKey:@"type"];
        NSLog(@"Received Push nsType: %@", nsType);
        if([[userInfo objectForKey:@"type"] intValue]==1){//chat
             [self JumpChatHistoryView];


        }else{
            [self JumpMessageDetailView];
        }
    }
    application.applicationIconBadgeNumber = 0; 
}

My app enter background and is not killed by the system, when receive RemoteNotification and click it, my code is OK, it can Jump other view. But when killed my app, when i receive the RemoteNotification, I click it, it not skip other view, it only enter the main view, how to solve it.

Moreover, when I cancel the LocalNotification I can use [[UIApplication sharedApplication] cancelLocalNotification:notification]; but at RemoteNotification i can not find the same methods. How can I do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:22:01+00:00Added an answer on June 16, 2026 at 12:22 am

    i can answer my question 1:

      (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions  add 
    
    
     NSDictionary *userInfo =[launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
    if ([userInfo objectForKey:@"type"])
    {
    
        NSString *nsType = [userInfo objectForKey:@"type"];
        NSLog(@"Received Push nsType: %@", nsType);
        if([[userInfo objectForKey:@"type"] intValue]==1){//chat
            [self JumpChatHistoryView];
    
    
        }else{
            [self JumpMessageDetailView];
        }
    }
    

    for question 2,sometime it can cancel itself,sometime not

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello all I am working on javascript jquery and svg.I want to ask a
Hello I want to get Accurate location so that i have used following link
Hello guys i have been using JavaFx scene builder to build a gui that
Hello I am using jQuery UI Accodions By default, the first accordion is shown
hello i want to add param value to all the object in a page.
Let's say I'm outputting a post title and in our database, it's Hello Y’all
Hello, I want to put custom status bar in notification window of iphone. is
Hello all I am working on html and javascript.And I am going to ask
hello all i am working on a project in which i have a webpage
Hello i want to make animation of a frame change. But i don't find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.