watchkit - WKPickerItem in Objective C throwing errors -


i've got issue wkpickeritem in objective c that's driving me nuts. according examples i've seen following code should work...

interfacecontroller.h

#import <watchkit/watchkit.h> #import <foundation/foundation.h>  @interface interfacecontroller : wkinterfacecontroller  @end 

interfacecontroller.m

#import "interfacecontroller.h"  @interface interfacecontroller () @property (unsafe_unretained, nonatomic) iboutlet wkinterfacepicker *picker;  @end  @implementation interfacecontroller  - (void)awakewithcontext:(id)context {     [super awakewithcontext:context];      // configure interface objects here.     nsmutablearray *arritems = [[nsmutablearray alloc] init];      (int z = 0; z <= 100; z++) {         wkpickeritem *item = [wkpickeritem alloc]; // line 1         item.title = [nsstring stringwithformat:@"%d",z]; // line 2         [arritems addobject:item]; // line 3     }      [self.picker setitems:arritems]; // line 4 } 

...but i'm getting these build errors:

line 1:

use of undeclared identifier 'wkpickeritem' use of undeclared identifier 'item' 

line 2

use of undeclared identifier 'item' 

line 3

use of undeclared identifier 'item' 

line 4

receiver type 'wkinterfacepicker' instance message forward declaration clang: error: linker command failed exit code 1 (use -v see invocation) 

the log under receiver type error this:

ld /users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/products/debug-iphonesimulator/xxx.app/xxx normal x86_64     cd "/users/.../developer/xxx"     export iphoneos_deployment_target=9.2     export path="/applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/usr/bin:/applications/xcode.app/contents/developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"  /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator9.2.sdk -l/users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/products/debug-iphonesimulator -f/users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/products/debug-iphonesimulator -filelist /users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/intermediates/xxx.build/debug-iphonesimulator/xxxx.build/objects-normal/x86_64/xxx.linkfilelist -xlinker -rpath -xlinker @executable_path/frameworks -mios-simulator-version-min=9.2 -xlinker -objc_abi_version -xlinker 2 -fobjc-arc -fobjc-link-runtime -xlinker -dependency_info -xlinker /users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/intermediates/xxx.build/debug-iphonesimulator/xxx.build/objects-normal/x86_64/xxx_dependency_info.dat -o /users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/products/debug-iphonesimulator/xxx.app/xxx     ------------     ld: file not found: /users/.../library/developer/xcode/deriveddata/xxx-aumfsqbcfcaniycmksjvgdycgvtf/build/intermediates/xxx.build/debug-iphonesimulator/xxx.build/objects-normal/x86_64/discountinterfacecontroller.o     clang: error: linker command failed exit code 1 (use -v see invocation) 

help?

reads if not importing watchkit...

@import watchkit


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -