在连接闪电kBD或智能KBD与我的APP之后,我无法获得这两个通知EAAccessoryDidConnectNotification和EAAccessoryDidDisconnectNotification.
但它的工作在iOS9.3与我的代码如下,
但它的工作在iOS9.3与我的代码如下,
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_accessoryDidConnect:) name:EAAccessoryDidConnectNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_accessoryDidDisconnect:) name:EAAccessoryDidDisconnectNotification object:nil]; [[EAAccessoryManager sharedAccessoryManager] registerForLocalNotifications];
原因是什么?
P.S .:我在日志中收到以下消息.
找不到“com.apple.private.externalaccessory.showallaccessories”权利