Creates a Multipeer Connectivity session.
- iOS 7.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 10.0+
A local identifier that represents the device on which your app is currently running.
The initialized session object, or
nil if an error occurs.
This method is equivalent to calling
init with a
nil identity and an encryption setting that varies based on which version of the SDK was used to link the application. On apps linked on or after iOS 9, the encryption is set to
MCEncryption. On apps linked prior to iOS 9, the encryption is set to
This method throws an exception if the provided peer ID object is invalid or
For more information, see Initiating a Session.