iosiphoneexternal-accessorysmartdevicelink

Multiple App Support on external accessory using iOS external accessory protocol


We are developing an MFi external accessory on which we can launch iOS apps from iPhone using External Accessory Protocol.We are using Ford Smartdevicelink protocol to register the apps. We are using USB as the medium of communication between accessory and iPhone. Currently, we are able to launch one app on accessory. We would like to launch multiple apps simultaneously. But we are struck here. Please provide some inputs as to how we can accomplish this. A

The problem we are facing is, if one app is already launched in accessory and iPhone, if we launch another app in iPhone while previous app is in background, accessory receives "StopExternalAccessoryProtocolSession" for background app. Hence the background app becomes non functional and hence only one app is functional at a time. For the new app launched we receive "StartExternalAccessoryProtocolSession" and it becomes functional.

Also we are using one protocol identifier for all the apps. Should we use different protocols for all the apps for multiple app support? or If we can achieve this using single protocol identifier, Please provide inputs on how can we achieve this.?


Solution

  • I'm a maintainer on SDL-iOS.

    For SDL, the way we've gotten around it is by enabling up to 30 protocol strings to be used. The app will look for the com.smartdevicelink.prot0 stream and connect. It will receive a single byte of data 0x01 - 0x1E from the accessory of which data protocol to connect to.

    This is a list of the SDL Protocol Strings.

    EDITED to fix a mistaken statement.