MCDRemoteSystemConnectionRequest

@interface MCDRemoteSystemConnectionRequest : NSObject

表示尝试与特定远程设备或应用程序通信的类。

构造函数

requestWithRemoteSystem

+ (instancetype)requestWithRemoteSystem:(nonnull MCDRemoteSystem*)remoteSystem;

使用 MCDRemoteSystem 实例初始化 MCDRemoteSystemConnectionRequest 。 不建议使用此构造函数,因为它未指定要面向的应用,因此可能会导致意外选择应用以服务请求发送到系统。

参数

  • remoteSystem

此连接请求中要面向的远程系统。

返回

如果成功,则返回初始化的 MCDRemoteSystemConnectionRequest ,否则返回 nil。

requestWithRemoteSystemApp

+ (instancetype)requestWithRemoteSystemApp:(nonnull MCDRemoteSystemApp*)remoteSystemApp;

创建并初始化此类的新实例。

参数

  • remoteSystemApp

要在此连接请求中面向的远程应用。

返回

如果成功,则返回初始化的 MCDRemoteSystemConnectionRequest ,否则返回 nil。

initWithRemoteSystem

- (nullable instancetype)initWithRemoteSystem:(nonnull MCDRemoteSystem*)remoteSystem;

使用 MCDRemoteSystem 实例初始化 MCDRemoteSystemConnectionRequest 。 不建议使用此构造函数,因为它未指定要面向的应用,因此可能会导致意外选择应用以服务请求发送到系统。

参数

  • remoteSystem 此连接请求中要面向的远程系统。

返回

如果成功,则返回初始化的 MCDRemoteSystemConnectionRequest ,否则返回 nil。

initWithRemoteSystemApp

- (nullable instancetype)initWithRemoteSystemApp:(nonnull MCDRemoteSystemApp*)remoteSystemApp;

创建并初始化此类的新实例。

参数

  • remoteSystemApp

要在此连接请求中面向的远程应用。

返回

如果成功,则返回初始化的 MCDRemoteSystemConnectionRequest ,否则返回 nil。