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.

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.

I'm facing exactly the same issue and I've tried all solutions to solve it too with no luck. I think I will fill in a another radar because this should be an iOS 10 release issue.

Anybody figure this out? This is a real show stopper at my company

Hi Guys,


I had fixed this issue putting in the pList file the name exactly how in the validation is in the code (with or without uppercase).


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.

Can you give us an example of this? I'm not sure what you're saying should be added to the plist. And what exactly is the code you are using when defining the accessory manager?

I believe the mentioned .plist section is titled "Supported external accessory protocols" and you're expected to put a case-sensitive protocol string in there provided (I'm assuming) by the hardware manufacturer. I'm trying to get a Koamtac Barcode scanner to work, so I've emailed their support and I'm waiting to hear back.

Cuold you please post your radar id, I would like to dupe this.

Did you guys ever resolve your issue? I've tried all of the suggestions in this thread but nothing is helping

Same here. I have tried everything unsuccessfully


I don't understand how the protocol string could come into play on this since the error happens as soon as I call


EAAccessoryManager.shared().registerForLocalNotifications()


How does the OS even know at this point that an accessory is even connected via Bluetooth?


Maybe I'm missing something here but I am curious if anyone has seen any fix for this


Thanks

Hi all,

I have the same problem.

I sarted with an old NIB-based Apple project (EADemo). It works fine with my accessory. Now I have completed the porting to a Storyboard-based project.

The EA Session crashes and I get the console error


2016-11-29 17:04:00.804421 K5Demo[430:69578] Couldn't find the "com.apple.private.externalaccessory.showallaccessories" entitlement

2016-11-29 17:04:04.736780 K5Demo[430:69578] ERROR - opening session failed as protocol (null) is not declared in Info.plist


In my case the Info.plist file is unchanged, with the "Supported external accessory protocols" string exactly matching the same one exposed by the accessory.

Has anyone solved ?


Thank you

It looks like you have two issues.


*Couldn't find the "com.apple.private.externalaccessory.showallaccessories" entitlement


The above is your first issue. I am experiencing the same issue in iOS 10 only. Has anyone figured out a solution to this problem? I cannot find anything on this elsewhere on the internet.

Couldn't find "showallaccessories" entitlement
 
 
Q