1 MCAdvertiserAssistant
2 MCAdvertiserAssistantDelegate
MCAdvertiserAssistant主要用户发出广播供附近的设备发现。
/// 初始化MCAdvertiserAssistant
public init(serviceType: String, discoveryInfo info: [String : String]?, session: MCSession)
/// MCAdvertiserAssistantDelegate代理
weak public var delegate: MCAdvertiserAssistantDelegate?
/// 会话
public var session: MCSession { get }
/// 信息字典
public var discoveryInfo: [String : String]? { get }
/// 标示名称
public var serviceType: String { get }
/// 开始广播
public func start()
/// 结束广播
public func stop()
/// 发出请求
@available(iOS 7.0, *)
optional public func advertiserAssistantWillPresentInvitation(advertiserAssistant: MCAdvertiserAssistant)
/// 结束请求
@available(iOS 7.0, *)
optional public func advertiserAssistantDidDismissInvitation(advertiserAssistant: MCAdvertiserAssistant)
Swift
Multipeer Connectivity Framework Reference
MCAdvertiserAssistant Class Reference
MCAdvertiserAssistantDelegate Class Reference
时间 | 描述 |
---|---|
2016-01-22 | 博文完成 |
CSDN:http://blog.csdn.net/y550918116j
GitHub:https://github.com/937447974/Blog