• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Exception on launch when clicking on an NSUserNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exception on launch when clicking on an NSUserNotification


  • Subject: Exception on launch when clicking on an NSUserNotification
  • From: Alex Kac <email@hidden>
  • Date: Thu, 26 Feb 2015 19:17:12 -0700

On another NSUserNotification note, I create an NSUserNotification with a sound, title, informative text,  action items, and in some cases a userInfo dictionary. If my app is running and I tap on it - it works fine. I get the notification activation delegate call, and all is good. I’ve also tested this with no userInfo dictionary.

However I'm having a problem on launching the app by tapping on the notification. My app gets an applicationWillFinishLaunching, and then gets an exception before it hits applicationDidFinishLaunching.

https://www.dropbox.com/s/nmf6qr97su43plh/Screenshot 2015-02-25 21.38.37.png?dl=0

I can continue, and the app then runs…but no NSApplicationLaunchUserNotificationKey in the notification.
NSConcreteNotification 0x6100002555d0 {name = NSApplicationDidFinishLaunchingNotification; object = <PIApplication: 0x618000115570>; userInfo = {
    NSApplicationLaunchIsDefaultLaunchKey = 0;
}}

I am debugging the launch by using XCode's "Wait for executable to be launched" option in the scheme, then tapping on my notification to launch the app.

There is no info in the console.

The notification being scheduled is:
<NSUserNotification:0x10149d2c0> { title: "Test" informativeText: "9:55 PM" actionButtonTitle: "Snooze" next delivery date: 2015-02-26 04:54:47 +0000 }

I am using 10.10 action item (snooze options). I’ve Googled this with no luck. My only guess was that there was something in the notification that wasn’t decodeable…but I’ve checked every property of the notification just to be sure I didn’t do something stupid and its all good.

So…does anyone have ideas where to go from here?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Exception on launch when clicking on an NSUserNotification
      • From: Graham Cox <email@hidden>
    • Re: Exception on launch when clicking on an NSUserNotification
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Instantiate NSString from NSURL in Swift
  • Next by Date: Re: How to prevent app activation on NSUserNotification action
  • Previous by thread: Re: How to prevent app activation on NSUserNotification action
  • Next by thread: Re: Exception on launch when clicking on an NSUserNotification
  • Index(es):
    • Date
    • Thread