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
Post a Comment