2013-01-22 4 views
3

IDTech CC 스 와이프 바인딩을 만들기 위해 노력하고 있습니다. 나는 잠시 동안 내 머리를 두드리는 소리가났다. 제 3 자 라이브러리에서 제기 한 이벤트를 구독하는 방법에 대해 고민하고 있습니다. 특히 카드 스 와이프가 언제 발생했는지 알아야합니다.타사 라이브러리의 MonoTouch 바인딩 알림

//Notification identifiers used with NSNotificationCenter 
//physical attachment related 
extern NSString * const uniMagAttachmentNotification; 
extern NSString * const uniMagDetachmentNotification; 
//connection related 
extern NSString * const uniMagInsufficientPowerNotification; 
extern NSString * const uniMagPoweringNotification; 
extern NSString * const uniMagTimeoutNotification; 
extern NSString * const uniMagDidConnectNotification; 
extern NSString * const uniMagDidDisconnectNotification; 
//swipe related 
extern NSString * const uniMagSwipeNotification; 
extern NSString * const uniMagTimeoutSwipeNotification; 
extern NSString * const uniMagDataProcessingNotification; 
extern NSString * const uniMagInvalidSwipeNotification; 
extern NSString * const uniMagDidReceiveDataNotification; 
//command related 
extern NSString * const uniMagCmdSendingNotification; 
extern NSString * const uniMagCommandTimeoutNotification; 
extern NSString * const uniMagDidReceiveCmdNotification; 
//misc 
extern NSString * const uniMagSystemMessageNotification; 

문서는이 작업을해야한다고 말했습니다 : 그것은 컴파일되지 않습니다

[Notification] 
    [Field ("uniMagAttachmentNotification")] 
    NSString uniMagAttachmentNotification { get; } 

.

obj/Debug/ios/magTechBinding/uniMag.g.cs(637,95): error CS0117: `MonoTouch.Constants' does not contain a definition for `magTechBindingLibrary' 
obj/Debug/ios/magTechBinding/uniMag.g.cs(637,77): error CS1502: The best overloaded method match for `MonoTouch.ObjCRuntime.Dlfcn.dlopen(string, int)' has some invalid arguments 
obj/Debug/ios/magTechBinding/uniMag.g.cs(637,77): error CS1503: Argument `#1' cannot convert `object' expression to type `string' 

모든 의견이나 도움을 주시면 감사하겠습니다.

+0

받으셨습니까? 근원을 열어 주시겠습니까? –

답변

5

시도 :

[Field ("uniMagAttachmentNotification", "__Internal")] 

두 번째 매개 변수가있는 라이브러리 내부의 현장을 찾아 알려줍니다. 하나도 없으면 발전기 으로 상상할 수 있습니다.

이제 제 3 자 정적 (.a) 라이브러리를 연결하므로 최종 실행 파일의 일부가됩니다. 그래서 __Internal을 라이브러리 이름으로 사용해야합니다 (이는 기본 실행 파일 내부를 나타냅니다).

관련 문제