MCDConnectedDevicesPlatform

@interface MCDConnectedDevicesPlatform : NSObject

此类表示连接的设备平台并管理应用与其的连接。

属性

accountManager

@property (nonatomic, readonly, nonnull) MCDConnectedDevicesAccountManager* accountManager;

由平台持有的 MCDConnectedDevicesAccountManager 实例。

notificationRegistrationManager

@property (nonatomic, readonly, nonnull) MCDConnectedDevicesNotificationRegistrationManager* notificationRegistrationManager;

MCDConnectedDevicesNotificationRegistrationManager 实例由平台持有。

构造函数

platformWithSettings

+ (nullable instancetype)platformWithSettings:(MCDConnectedDevicesPlatformSettings* _Nonnull)settings;

具有指定平台设置的此类的新实例。

参数

  • settings

MCDConnectedDevicesPlatformSettings 对象,用于存储应用的平台设置。

返回

返回包含应用平台设置的 MCDConnectedDevicesPlatform 对象。

initWithSettings

- (nullable instancetype)initWithSettings:(MCDConnectedDevicesPlatformSettings* _Nonnull)settings;

具有平台设置的此类的新实例。

参数

  • settings

MCDConnectedDevicesPlatformSettings 对象,用于存储应用的平台设置。

返回

返回使用应用的平台设置初始化的 MCDConnectedDevicesPlatform 对象。

方法

processNotification

- (MCDConnectedDevicesProcessNotificationOperation* _Nonnull)processNotification:(NSDictionary* _Nonnull)notification;

处理传入 APNs 通知。

参数

  • notification

包含要处理的 APNs 通知。

返回

MCDConnectedDevicesProcessNotificationOperation 类的实例。

start

- (void) start;

启动平台。

shutdownAsync

- (void)shutdownAsync:(void (^_Nonnull)(NSError* _Nullable))completionBlock;

关闭连接的设备平台。

参数

  • completionBlock

完成后要调用的块。