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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:14:56+00:00 2026-05-23T02:14:56+00:00

I have a pretty simple question that search has not lead me to the

  • 0

I have a pretty simple question that search has not lead me to the answer. In my application:didFinishLaunchingWithOptions method I perform the following to recover notifications that have come in while the program is not running:

 //Init Airship launch options
 NSMutableDictionary *takeOffOptions = [[[NSMutableDictionary alloc] init] autorelease];
 [takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey];
 [UAirship takeOff:takeOffOptions];
 [UAPush shared].delegate = self;
 [[UAPush shared] resetBadge];

 // Register for notifications through UAPush for notification type tracking
 [[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
                                                      UIRemoteNotificationTypeSound |
                                                      UIRemoteNotificationTypeAlert)];

While the program is running (in foreground or background) I can recover my airship alert as such:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
 NSLog(@"\nReceived remote notification:\n%@\n\n", userInfo);

 [[UAPush shared] handleNotification:userInfo applicationState:application.applicationState];
 [[UAPush shared] resetBadge]; // zero badge after push received

 NSString *alertMessage = [[userInfo objectForKey:@"aps"] valueForKey:@"alert"];
}

My question is this: what command sequence can I execute to extract the same information obtained in alertMessage from userInfo while program is running in foreground or background, from launchOptions from messages sent while program was not running? Thanks in advance 🙂

  • 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-05-23T02:14:56+00:00Added an answer on May 23, 2026 at 2:14 am

    NSDictionary *userInfo = [launchOptions valueForKey:@”UIApplicationLaunchOptionsRemoteNotificationKey”];

    NSDictionary *apsInfo = [userInfo objectForKey:@”aps”];

    NSString *alertMsg = [apsInfo objectForKey:@”alert”];

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

Sidebar

Related Questions

Pretty simple question. I have a model that has a property which is a
I have a pretty simple question, but with an answer that I am unable
Pretty simple question. I'm quite certain I have the Class, method, codebehind, etc linked
hopefully a pretty simple question this time. I have a Select method in a
I have a probably pretty simple question but I am still not sure! Actually
Hopefully this is a pretty simple question for someone to answer. I have a
Pretty simple question, I have a webpage that is used exclusively on iPads. I've
I have a pretty simple Rails question regarding encoding that I can't find an
Pretty simple question - I have an attribute that I would like to have
pretty simple question, can't quite fig. it out. I have 2 js array's that

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.