Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No visible @interface for 'WKInterfaceController' declares the selector 'initWithContext:'

From the last Xcode beta i've got an error in all my project and in all my sample code , also as in Apple Sample code like Lister app !

No visible @interface for 'WKInterfaceController' declares the selector 'initWithContext:'

enter image description here

Where is the problem ? Thanks

like image 219
Ragazzetto Avatar asked Nov 20 '25 06:11

Ragazzetto


2 Answers

Instead of

self = [super initWithContext:context];

use

self = [super init];
like image 53
John Pollard Avatar answered Nov 22 '25 20:11

John Pollard


From Apple's Docs, this was changed between beta's:

The WKInterfaceController method initWithContext: has been deprecated. Please use awakeWithContext: instead. The designated initializer for WKInterfaceController is now init.

See: https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-8.2/index.html

like image 33
Dave Wood Avatar answered Nov 22 '25 20:11

Dave Wood