Bluetooth HID Device & iOS textFields

时间秒杀一切 提交于 2019-11-29 13:08:33

Erica Sadun found a way of bringing back the keyboard by sending a GraphicsServices event. Post: http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ see link to source code. Sending GSEvents might not be AppStore ready, but maybe worth a try.

Phil,

I'm not sure if you've discovered the External Accessory Framework but that is probably your best bet to get what you're after and have an app that will be accepted in the store. I'm currently working through some similar issues and I think this is how I'll be able to detect which of our supported devices the user is using.

https://developer.apple.com/library/ios/#documentation/ExternalAccessory/Reference/ExternalAccessoryFrameworkReference/_index.html

EAAccessoryManager looks like it may give you back a list of attached devices. That's exactly what I'm looking for. It should allow me to then take the correct path to connect to the devices.

This may give you back what you're interested in...

#import <ExternalAccessory/ExternalAccessory.h>

- (void)_getAttachedDevices;
{
    EAAccessoryManager* accessoryManager = [EAAccessoryManager sharedAccessoryManager];
    if (accessoryManager)
    {
        NSArray* connectedAccessories = [accessoryManager connectedAccessories];
        NSLog(@"ConnectedAccessories = %@", connectedAccessories);
    }
}

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!