cocoa - Trivial "+[NSTimer scheduledTimerWithTimeInterval:repeats:block:]: unrecognized selector" error -


i banging head against odd error after move 10.12/sierra , xcode 8.1:

+[nstimer scheduledtimerwithtimeinterval:repeats:block:]:       unrecognized selector sent class 0x7fff78f1fa88 

the minimal code (default settings of create new project) reproduce is:

//  appdelegate.m //  #import "appdelegate.h"  @interface appdelegate ()  @property (weak) iboutlet nswindow *window; @property (strong, nonatomic) nstimer * timer; @end  @implementation appdelegate  - (void)applicationdidfinishlaunching:(nsnotification *)anotification {     self.timer = [nstimer scheduledtimerwithtimeinterval:10                             repeats:yes                               block:^(nstimer * _nonnull timer)     {         nslog(@"ping %@", timer);     }]; } 

the linking includes (core)foundation classes , 'all_load'. must totally trivial - fail is.

any , appreciated.

thanks,

dw.

+[nstimer scheduledtimerwithtimeinterval:repeats:block:] ios 10.0+ method. maybe trying run on ios 9.x?

https://developer.apple.com/reference/foundation/nstimer/2091889-scheduledtimerwithtimeinterval?language=objc


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -