我使用PhoneGap
開發心率監測器的插件,它有自己的SDK下面的頭文件:如何創建此類的實例?
@class HRMonitor;
@interface HRMonitor : NSObject <NSStreamDelegate>{
}
-(id) init: (id) _delegate;
-(void)startup;
-(void)shutdown;
我只是列出我遇到問題的方法。
我也有一類HRMPlugin.m
,但這個類裏,每當我想創建一個實例:
HRMonitor *hrm = [[HRMonitor alloc] init:self]
它會報告錯誤:
ld: warning: ignoring file /Users/octref/Documents/HRM/HRMPlugin/iOS_APP_SDK_r5/libmyTrekSDK_armv7.a, missing required architecture i386 in file /Users/octref/Documents/HRM/HRMPlugin/iOS_APP_SDK_r5/libmyTrekSDK_armv7.a (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_HRMonitor", referenced from:
objc-class-ref in HRMPlugin-9E97FDE3BF57274E.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我是新來iOS
並不知道該做什麼。我創建新實例的方式是否正確?
如何調試我的代碼?
你有沒有'#import「HRMonitor.h」'? – Raptor
@ShivanRaptor在SDK中只有一個mytrekSDK.h,是的,我有#import「mytrekSDK.h」,我也有'#import「HRMPlugin.h」'這是我的「HRMPlugin.m 「 – octref
是你的iOS設備編譯時的編譯結果嗎? – Raptor