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 8201213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:43:54+00:00 2026-06-07T06:43:54+00:00

After I send a push notification I want the app to open on my

  • 0

After I send a push notification I want the app to open on my inbox page so the user can see the new messages on the inbox. I have the following code in my AppDelegate

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

    [self.tabController setSelectedIndex:2]; 
}

When I send a push message and the phone is active it goes straight there without warning. I know thats what it is supposed to do with my code but is there a way to change it like so

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

    if(app.isActive == FALSE)
          [self.tabController setSelectedIndex:2]; 
}

Any insight on this will help greatly. Thanks!

  • 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-07T06:43:56+00:00Added an answer on June 7, 2026 at 6:43 am

    From Stanislav Yaglo, Objective C: How to check if application is currently active (i.e. user is using it)? :

    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
    
        if (application.applicationState == UIApplicationStateActive) {
            // For example, update the tab bar
        }
        else {
            self.tabController.selectedIndex = 3;
        }
    }
    

    Hope it helps !

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

Sidebar

Related Questions

i want to send an email to user after he sign-up with code.for ex
I have been using https://github.com/Redth/APNS-Sharp to send push notification message to all devices where
I am new in Android and trying to develop an app with push notification.
Is there any Rubygem to send an email or push notification after a certain
I want to send the form after clicking on the label next to checkbox.
I need send certain attributes(say, human readable user name) from server to client after
Scenario: User A send application request to user B User B accepts request after
I have a question about the push notification service of the Windows Phone 7
I found some weird behavior in push notification. My iPod app receives push notifications
please forgive me for this idiot question. I understood that we can send push

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.