ios - EAAccessoryManager connectedAccessories returns empty array after I change the system's language -


i use eaaccessorymanager mfi accessory, first use notification connected message, if there have mfi accessory connect iphone, notification:

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(_accessorydidconnect:) name:eaaccessorydidconnectnotification object:nil]; [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(_accessorydiddisconnect:) name:eaaccessorydiddisconnectnotification object:nil]; 

when use [[eaaccessorymanager sharedaccessorymanager] connectedaccessories], can connected mfi accessory directly:

_accessorylist = [[nsmutablearray alloc] initwitharray:[[eaaccessorymanager sharedaccessorymanager] connectedaccessories]]; 

but when go setting , change language chinese english, go app , use [[eaaccessorymanager sharedaccessorymanager] connectedaccessories]] mfi accessory, return nil. if there 1 know why , how fix it, thank lot.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -