The object you use to manage communications between your app and a connected hardware accessory.
- iOS 3.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 9.0+
EASession object creates a communications channel between your application and a connected hardware accessory. When creating a session, specify the protocol to use to communicate with the accessory. After initializing an
EASession object, use the provided output and input streams to transfer data to and from the accessory according to that protocol.
After creating a session object, immediately retrieve and configure the stream objects provided by the session. Streams send events to their associated delegate to notify it of changes in the stream status. For example, streams notify the delegate when data is waiting to be read or when more space is available for writing data. For more information about how to use stream objects, see Stream Programming Guide.
When sending and receiving data using the provided streams, it is your responsibility to ensure the data is formatted according to the specified protocol. The
EASession class has no knowledge of specific accessory protocols and doesn't attempt to format the data in any way before or after transferring it.