[英]API for plug device on iPhone
ExternalAccessory.framework . 外部附件框架
。
Oops. 哎呀。 Square doesn't use ExternalAccessory, but some kind of custom interface through the headphone jack, as explained by @kubi .
Square不使用ExternalAccessory,而是通过耳机插孔使用某种自定义界面,如@kubi所述 。
The relevant interface looks like this: 相关界面如下所示:
__attribute__((visibility("hidden")))
@interface SKSquareInterface : NSObject {
@private
? delegate;
? queue;
? state;
}
@property(assign) ? XXEncryptedProperty_6b644;
@property(assign) ? XXEncryptedProperty_6a1bc;
@property(assign) ? XXEncryptedProperty_77a22;
@property(assign) ? XXEncryptedProperty_77a39;
@property(assign) ? XXEncryptedProperty_77a60;
@property(assign) ? XXEncryptedProperty_77800;
@property(assign) ? XXEncryptedProperty_7780c;
+(?)sharedInstance;
-(?)init;
-(?)dealloc;
-(?)parseState;
-(?)triggered;
-(?)dcOffset;
-(?)shouldStartWhenCapable;
-(?)setShouldStartWhenCapable:(?)startWhenCapable;
-(?)start;
-(?)stop;
-(?)isAttached;
-(?)_reset;
-(?)_stop;
-(?)_initializeQueues;
-(?)_isAudioQueueRunning;
-(?)_listenForSwipe:(?)swipe numSamps:(?)samps;
-(?)_tryToStartAudioInterface;
-(?)_tryToStopAudioInterface;
-(?)_notifyDelegateDidBeginSwipe;
-(?)_notifyDelegateSwipeFailed;
-(?)_notifyDelegateOfRawData:(?)rawData;
-(?)_notifyDelegateOfRawDataOnMainThread:(?)rawDataOnMainThread;
-(?)_notifyDelegateSwipedPaymentCard:(?)card;
-(?)_notifyDelegateSwipedPaymentCardOnMainThread:(?)thread;
-(?)state;
-(?)delegate;
-(?)setDelegate:(?)delegate;
@end
which suggest it directly parse the input from AudioQueue . 这建议它直接解析AudioQueue的输入。
Square works through the headphone jack, so it doesn't use the External Accessory framework. Square通过耳机插孔工作,因此不使用外部附件框架。 External accessories on the iPhone are notoriously difficult to do, which is why barely any manufacturers are creating products.
iPhone上的外部配件非常难做,这就是为什么几乎没有任何制造商在生产产品的原因。
http://www.wired.com/gadgetlab/2010/01/wither-the-dongleware http://www.wired.com/gadgetlab/2010/01/wither-the-dongleware
I can count on one finger the number of third party devices I've seen that communicate through the dock connector on the iPhone. 我可以指望通过iPhone上的扩展坞接口进行通信的第三方设备的数量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.