Couldn't find "showallaccessories" entitlement

Issue:

The message, "Couldn't find the com.apple.private.externalaccessory.showallaccessories entitlement" is displayed to the device console upon reaching the first instance of "EAAccessoryManager.SharedAccessoryManager" when run on an iOS 10 device. This issue is exclusively reproducible on iOS 10 devices.

This has been tested with the latest stable and beta channels of Xamarin studio, Xcode 7.3.1, Xcode 8 beta 6, and in combination with the iOS 9.3 and 10.0 SDK's. The action that I've taken to attempt to resolve this issue include adding "Wireless Accessory Configuration" to the entitlements file, in an attempt to include the needed entitlement.


Configuration:

iPad(MGL12LL/A) - iOS 10 beta 8


Reproduction:

1. Include reference to "ExternalAccessory" assembly

2. Create an instance of a "EAAccessoryManager.SharedAccessoryManager"

3. See device console output


Objective-C:

EAAccessoryManager *mgr = [EAAccessoryManager sharedAccessoryManager];

C#:

EAAccessoryManager mgr = EAAccessoryManager.SharedAccessoryManager;


I have created a sample application in Xamarin and Xcode that can be provided upon request for reproductibility purposes.

Replies

I also encountered this issue in iOS 10.0.1.


My APP could not get these two notifications "

EAAccessoryDidConnectNotification"
and "
EAAccessoryDidDisconnectNotification"
after connecting Lightning kBD or Smart KBD.

But it worked on iOS9.3 with my code as below,


[[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];

I'm still seeing this issue occasionally on the publicly available version of iOS 10.


Were either of you able to resolve this?


Thanks!

Hi guys,


Did you solve this issue? I met the same one.

I've getting this too. Has anyone filed a radar issue yet? If so, can you link the url/id?

Same Problem for me and my Koamtac SDK Barcode scanner. No fix I can find yet...

OK, this is what I found for me... Wasn't really crashing on the line I thought it was.


I added the new Purpose String for Camera access. The moment I did this, I got the alert, as well as had the camera and barcode scanner start working for me! If you are using one of these frameworks and fail to declare the usage your app will crash when it first makes the access.


http://useyourloaf.com/blog/privacy-settings-in-ios-10/

Tried a bunch of different things to fix this, but ended up doing this, which worked:

  1. Clean
  2. Clean Build Folder
  3. Delete and re-link ExternalAccessory.framework
  4. Delete app on iOS device
  5. Build and run

If this doesn't work, try deleting and generating a new provisioning profile for your app; I read that this helped someone somewhere.

Hadn't thought to delete and re-link the framework. Unfortunately that didn't help my situation. I think I've deleted and regenerated the provisioning profile at least 5 times up until this point and that didn't seem to help me.

Yep, me, too.


None of the proposed solutions helped.

Getting the same problem after upgrading to iOS 10. None of the above solutions work for me. Someone from apple, please respond.

I filed a radar yesterday.


I would suggest others do the same in order to try to get more visibility into the issue as well as give them more debugging information (although it sounds like the code paths and environment are probably very similar).

So, I think I have a solution for this. Still getting QA to verify. But...


In iOS 10 I think they are truly locking down down app/external accessory communication. The protocol strings that are specified with the accessory and in the app must match. If one or the other isn't specified, most likely no dice.


In my case, both the accessory and the app were specifying the protocol string but it seems like the the string comparison is case sensitive. My app protocol string was all lower case. I changed it to match the accessory (which had some capital letters in it) and it seems to work now.


Again, getting QA to verify but this may help you...

Thanks, that did the trick - for example: com.getpebble.public protocol string would produce the entitlement error, but changing it to com.GetPebble.com has cleared it up.

Yes, verified through QA that this seemed to be the problem for us.

I'm getting the "Couldn't find the "com.apple.private.externalaccessory.showallaccessories" entitlement" message and also am not receiving the EAAccessory notifications in iOS 10 only (10.0.1 and 10.1 developer beta). Have tried all the solutions posted here multiple times, to no avail. Filed a radar bug.