mergAccessory
Type
library
Description
mergAccessory is an iOS external for connecting to and communication with accessory hardware using the External Accessory framework.
Each device in the MFi program has a name and one or more protocols it
supports. For your app to see the device it needs to state what
protocols it supports. To do this you need to edit the plist file which
is found at /Applications/LiveCode 5.5.app/Contents/Tools/Runtime/iOS/Device-5_1/Settings.plist
.
Add the protocols your application supports under the
UISupportedExternalAccessoryProtocols
key.
keyUISupportedExternalAccessoryProtocols/key
array
stringcom.bluebamboo.p25i/string
/array
Your application will also need to be registered with the manufacturer and Apple.
Associated Syntax
Function
Name | Summary | Syntax |
---|---|---|
mergAccessoryNames | Returns the names of any devices connected to the device with protocols your supports | mergAccessoryNames() |
mergAccessoryProtocols | Returns a list of protocols that both the accessory and your app support | mergAccessoryProtocols(<pName>) |
mergAccessoryOpenSessions | Get a list of currently open sessions | mergAccessoryOpenSessions() |
Command
Name | Summary | Syntax |
---|---|---|
mergAccessoryOpenSession | Sends a message back to the calling object when the session is open | mergAccessoryOpenSession <pNameAndProtocol>, <pCallbackHandler> |
mergAccessoryCloseSession | Closes an open session | mergAccessoryCloseSession <pNameAndProtocol> |
mergAccessoryRead | This handler requests a read of 'pLength' of data on an active session | mergAccessoryRead <pNameAndProtocol>, <pLength>, <pCallcackHandler> |
mergAccessoryWrite | This handler requests a write of 'data' on an active session | mergAccessoryWrite <pNameAndProtocol>, <pData>, <pCallcackHandler> |
mergAccessoryRegisterForNotifications | Registers the calling control to receive the mergAccessoryConnected and mergAccessoryDisconnected messages | mergAccessoryRegisterForNotifications |
Message
Name | Summary | Syntax |
---|---|---|
mergAccessoryConnected | Sent to the control that registered for notifications when an accessory with a supported protocol connects to the device | mergAccessoryConnected <pName> |
mergAccessoryDisonnected | Sent to the control that registered for notifications when an accessory with a supported protocol disconnects to the device | mergAccessoryDisonnected <pName> |