I am having problems with exporting a working .ANE using the external accessory framework of Xcode/iOS. Let me briefly show what I did:
I took the Vibration example of the adobe website, I can successfully edit this example and create a .ANE which works on my iPad and force it to make a sound (vibration is not supported on iPad obviously). I then included elements of the framework that I developed, for a specific form of bluetooth communication with an external device.
This device can communicate to my iPad using the ExternalAccessory framework. It works great when I build an application in Xcode only. The problem is that people within my organisation are not used to work with objective-C so they asked me to make it compatible with AIR. Which I am extremely close to. Actually all my classes' logic seem to work and the different methods are called effectively. There is one problem though:
In order to make the External Accessory framework work I need to include the protocol of the external device in my plist. And the library example provided in the Vibration example does not seem to contain an info.plist so I do not know how to include the protocol in this library.
Can anybody help me? Maybe with specific experience in this direction, or by explaining to me how to create an info.plist file for my library. I think this is the only brick I need to complete my challenge.
FYI: I found out that the problem is in the protocol by debugging using the console of the Xcode Organiser, this is the error I get: ": ERROR - opening session failed as protocol [I deleted the protocol name for my organisation's sake] is not declared in Info.plist"
I managed to solve the problem, the trick is to edit the xml file that is generated along with your app. This should be entered into the code:
<iPhone> <InfoAdditions> <![CDATA[ <key>UISupportedExternalAccessoryProtocols</key> <array> <string> ... </string> </array> ]]> </InfoAdditions> <requestedDisplayResolution>standard</requestedDisplayResolution> </iPhone>
Then it will work correctly. (for ... enter your protocol)