WechatManager
public class WechatManager: NSObjectWechatManager
- 
                  
                  A closure used to receive and process request from Third-party DeclarationSwift public typealias Handle = (Result<[String: Any], Int32>) -> Void
- 
                  
                  微信开放平台,注册的应用程序id DeclarationSwift public static var appid: String!
- 
                  
                  微信开放平台,注册的应用程序Secret DeclarationSwift public static var appSecret: String!
- 
                  
                  openid DeclarationSwift public var openid: String!
- 
                  
                  access token DeclarationSwift public var accessToken: String!
- 
                  
                  refresh token DeclarationSwift public var refreshToken: String!
- 
                  
                  csrf DeclarationSwift public static var csrfState = "73746172626f796368696e61"
- 
                  
                  分享Delegation DeclarationSwift public var shareDelegate: WechatManagerShareDelegate?
- 
                  
                  A shared instance DeclarationSwift public static let shared: WechatManager =
- 
                  
                  检查微信是否已被用户安装 DeclarationSwift public func isInstalled() -> BoolReturn Value微信已安装返回true,未安装返回false 
- 
                  
                  处理微信通过URL启动App时传递的数据 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。 DeclarationSwift public func handleOpenURL(_ url: URL) -> BoolParametersurl微信启动第三方应用时传递过来的URL Return Value成功返回true,失败返回false 
- 
                  
                  分享 DeclarationSwift public func share(_ scence: WXScene, image: UIImage?, title: String, description: String, url: String? = "https://open.weixin.qq.com/", extInfo: String? = nil)Parametersscence请求发送场景 image消息缩略图 title标题 description描述内容 url地址 extInfoapp分享信息 (点击分享内容返回程序时,会传给WechatManagerShareDelegate.showMessage(message: String) 
- 
                  
                  收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果 - 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。
- 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。 
 DeclarationSwift public func onReq(_ req: BaseReq)Parametersreq具体请求内容,是自动释放的 
- 
                  
                  发送一个sendReq后,收到微信的回应 - 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。
- 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等 
 DeclarationSwift public func onResp(_ resp: BaseResp)Parametersresp具体的回应内容,是自动释放的 
 View on GitHub
            View on GitHub
           Install in Dash
            Install in Dash
           WechatManager Class Reference
      WechatManager Class Reference