Question

I am very new to iOS development. I want to test Apple's EADemo sample app for connecting External Accessories via Bluetooth.

As per my understanding, EADemo code will not work unless some proper accessory related protocol strings are defined instead of com.apple.p1 and com.apple.p2.

Can I test the EADemo app without providing any accessory protocol string? How to test EADemo app?

Was it helpful?

Solution

The EADemo app and your accessory need to agree on a protocol to use for communication. Normally, the accessory will provide the app the protocol strings it supports. These also need to be defined in the EADemo app's Info.plist file. Just add the string that is used by your accessory on an additional line above or below com.apple.p1. The app will not be able to communicate with your accessory if you do not do this.

When you run the app, you should then be able to choose the accessory and protocol string. After that, the app will let you send/receive data. So to fully "test" the EADemo app you really need to have the protocol string set up first.

OTHER TIPS

I tried the EADemo app on my test iPhone today and it seemed to work! Here are the steps I tried:

  • I paired the accessory upfront from Settings/Bluetooth.
  • Then I ran the EADemo app on my test iPhone.
  • I could find my accessory listed in the EADemo UI.
  • I selected it, and then the EADemo app prompted me to select the protocol advertised by the MFi device.
  • I selected it and the app seemed to establish a session with the MFi device.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top