On Oct 19, 2017, at 09:04 , Mark Allan <markjal...@gmail.com> wrote:
> 
> Terminating app due to uncaught exception 'NSInvalidArgumentException', 
> reason: '*** -[NSXPCEncoder _checkObject:]: This coder only encodes objects 
> that adopt NSSecureCoding (object is of class '__NSCFTimer').'

It’s very suspicious that the timer itself would be encoded, since that would 
suggest that the timer itself is being passed back across the interface to the 
main app. What does the backtrace look like? Ideally there would be something 
there that tells you what it’s trying to do at that time.

I don’t know, but I suspect that the block-based NSTimer methods might differ 
from the selector-based ones in that they use GCD rather than the run loop. If 
you look at the documentation, the old methods say "schedules it on the current 
run loop”. The new methods do not.

That suggests the possibility of using dispatch_source_create and 
dispatch_source_set_timer directly to create a GCD-based time. It’s not quite 
as convenient to code, but not hard to get right.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to