Can I get the iOS Startup Notification after the application has started?

Michael

I'm looking for a way to retrieve the UIApplicationLaunchOptionsLocalNotificationKey on iOS that doesn't involve using the application delegate, i.e. I don't want to have to implement the following:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    UILocalNotification *localNotification = [launchOptions objectForKey: UIApplicationLaunchOptionsLocalNotificationKey];
    if (localNotification != nil)
    {
        // Process notification
    }
}

I'm trying to create a helper library that needs information about the startup notification. Is there anyway of doing this? Can I retrieve the launch options via another method at a later point in the application process?

Wain

You can add yourself as an observer of the UIApplicationDidFinishLaunchingNotification notification which will be posed by the application and contains the information you are looking for.


As @Stavash suggests, there are limitations. For the first launch you won't be able to pick this notification up because the instance of your library won't be created (your class would need to be in the root XIB). But, this notification will also be sent when the app is re-opened for local / remote notifications.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I get the application name after it has been renamed?

From Dev

How can I add a module to my application after it has started up without using require.js?

From Dev

How can I add a module to my application after it has started up without using require.js?

From Dev

How can I wait until an application has started?

From Dev

Run code after flask application has started

From Dev

Can I get sms from pebble sms notification in iOS?

From Dev

How to get LightDM automatically started at startup after disabling it (in Ubuntu MATE)?

From Dev

How to get Application states in iOS 10 notification?

From Dev

How can I start a systemd service only after mysql has started?

From Dev

How can I start a Procfile process, after the rails server has completely started up with foreman?

From Dev

How can I check which startup arguments was R started with

From Dev

Can I Use Application Web Services Which is Already Made for Android in iOS especially in push notification

From Dev

How can I get actual height of application after rendering?

From Dev

How can I get a startup application to run in another workspace other than #1?

From Dev

How can I redirect after toastr notification

From Dev

how can I get mail app's notification in iOS from my own app?

From Dev

How do I trigger an event X seconds after a button has been clicked in a Xamarian iOS application?

From Dev

how i can get started with MEAN stack?

From Dev

I can not get the parameters from notification intent

From Dev

What can I do to automatically run a windows form application at windows startup? And remove its icon from taskbar after minimizing to tray?

From Dev

How can I fix iOS image orientation issues when uploading an image with php and after is has been uploaded

From Dev

How can I know if user has opened Notification List?

From Dev

How can I make Ubuntu to run only one application on startup

From Dev

How can I view stdout/stderr of a startup application?

From Dev

How can I know if a Application pool is started remotely?

From Dev

iOS(Swift) How can I call my application when I get push notice?

From Dev

Redirection after a process has started

From Dev

How can I know the application state of an Android App to display or not a notification?

From Dev

How can I make a terminal with 3 tabs appear after startup?

Related Related

  1. 1

    How can I get the application name after it has been renamed?

  2. 2

    How can I add a module to my application after it has started up without using require.js?

  3. 3

    How can I add a module to my application after it has started up without using require.js?

  4. 4

    How can I wait until an application has started?

  5. 5

    Run code after flask application has started

  6. 6

    Can I get sms from pebble sms notification in iOS?

  7. 7

    How to get LightDM automatically started at startup after disabling it (in Ubuntu MATE)?

  8. 8

    How to get Application states in iOS 10 notification?

  9. 9

    How can I start a systemd service only after mysql has started?

  10. 10

    How can I start a Procfile process, after the rails server has completely started up with foreman?

  11. 11

    How can I check which startup arguments was R started with

  12. 12

    Can I Use Application Web Services Which is Already Made for Android in iOS especially in push notification

  13. 13

    How can I get actual height of application after rendering?

  14. 14

    How can I get a startup application to run in another workspace other than #1?

  15. 15

    How can I redirect after toastr notification

  16. 16

    how can I get mail app's notification in iOS from my own app?

  17. 17

    How do I trigger an event X seconds after a button has been clicked in a Xamarian iOS application?

  18. 18

    how i can get started with MEAN stack?

  19. 19

    I can not get the parameters from notification intent

  20. 20

    What can I do to automatically run a windows form application at windows startup? And remove its icon from taskbar after minimizing to tray?

  21. 21

    How can I fix iOS image orientation issues when uploading an image with php and after is has been uploaded

  22. 22

    How can I know if user has opened Notification List?

  23. 23

    How can I make Ubuntu to run only one application on startup

  24. 24

    How can I view stdout/stderr of a startup application?

  25. 25

    How can I know if a Application pool is started remotely?

  26. 26

    iOS(Swift) How can I call my application when I get push notice?

  27. 27

    Redirection after a process has started

  28. 28

    How can I know the application state of an Android App to display or not a notification?

  29. 29

    How can I make a terminal with 3 tabs appear after startup?

HotTag

Archive