Re: Exception on launch when clicking on an NSUserNotification

2015-02-27 Thread Alex Kac
*** -[NSKeyedUnarchiver decodeObjectForKey:]: data to unarchive contains class (NSArray) which has not been allowed However - the only array I’m setting is the additionalActions - a Yosemite property (this is on Yosemite of course). // An array of NSUserNotificationAction objects that describe

Re: Exception on launch when clicking on an NSUserNotification

2015-02-27 Thread Alex Kac
As I have written several times now - I have no user data. If the limit is 1k and it hits that with less than 100 characters for a title and informative string and an ID - then that’s a real bug. I really don’t think I’m hitting that. It would make NSUserNotifications pretty useless for everyo

Re: Exception on launch when clicking on an NSUserNotification

2015-02-27 Thread Kyle Sluder
On Thu, Feb 26, 2015, at 08:49 PM, Alex Kac wrote: > It would be a fantastic clue! Except … its not printed in the console, or > in the xcode console, or anywhere. So I have no idea. My guess is that > the OS is swallowing the exception for launch purposes, which does me no > good. You're trapped

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Jens Alfke
> On Feb 26, 2015, at 6:49 PM, Alex Kac wrote: > > It would be a fantastic clue! Except … its not printed in the console, or in > the xcode console, or anywhere. Yeah, it’s getting caught by something that doesn’t log it. You can usually find the exception object when you’re stopped at the br

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Graham Cox
The documentation doesn't actually say it's archived - it talks about the "serialized" size. That could imply that it's passed around as a plist rather than a keyed archive. But a plist has a fair bit of overhead as well, as it's an XML file. --Graham > On 27 Feb 2015, at 5:04 pm, Graham Co

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Graham Cox
> On 27 Feb 2015, at 4:27 pm, Alex Kac wrote: > > What’s not shown above is the identifier - which is a 64 character string, > and the sound name which is a 10 character string. I’m pretty sure that’s not > more than 1k Right, but it's the resulting archive that has to come in under 1K (a r

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Alex Kac
On OS X (this is OS X, not iOS - hence NSUserNotification and not UILocalNotification), when you start an app by tapping on a notification, because you haven’t had a chance yet to register the delegate of the NSUserNotificationCenter (this has nothing to do with NSNotificationCenter), the OS pa

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Graham Cox
OK, scratch that - it does seem as if there should be the user notification embedded in the did launch notification: > NSApplication > > If an application is launched because a user selected a notification in the > Notification Center, NSApplicationLaunchUserNotificationKey will be present > i

RE: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Lee Ann Rucker
ts.apple.com [cocoa-dev-bounces+lrucker=vmware@lists.apple.com] on behalf of Graham Cox [graham@bigpond.com] Sent: Thursday, February 26, 2015 8:12 PM To: Alex Kac Cc: Cocoa-Dev Cocoa-Dev Mail Subject: Re: Exception on launch when clicking on an NSUserNotification OK, I may be having a massiv

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Graham Cox
Also, this: "The userInfo content must be of reasonable serialized size (less than 1KB) or an exception is thrown." It woud be easy to exceed 1K with a few strings. --Graham > On 27 Feb 2015, at 3:12 pm, Graham Cox wrote: > > OK, I may be having a massive misunderstanding about how iOS wo

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Graham Cox
OK, I may be having a massive misunderstanding about how iOS works (as compared with Mac OS), but the NSUserNotification you post is, as far as I'm aware, completely unrelated to the NSNotification that is passed to -applicationWill/DidFinishLaunching. The latter is just a notification that the

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Alex Kac
It would be a fantastic clue! Except … its not printed in the console, or in the xcode console, or anywhere. So I have no idea. My guess is that the OS is swallowing the exception for launch purposes, which does me no good. I thought so too that it would have a problem decoding an archived objec

Re: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Jens Alfke
> On Feb 26, 2015, at 6:17 PM, Alex Kac wrote: > > 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/nmf6q

Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Alex Kac
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 test