PozzitoUI 1.4.3

PozzitoUI 1.4.3

许可证 自定义
发布最新发布2017年10月

Pozzito 维护。



PozzitoUI 1.4.3

  • Sedam IT

安装

这是一个作为 Pozzito 框架补充创建的框架,用于为 Pozzito 核心功能添加默认 UI。

手动安装

  1. 下载 PozzitoUI。

  2. 前往您的 Xcode 项目的 "通用" 设置。将 PozzitoUI.framework 拖到 "已嵌入的二进制" 部分。确保选中 "如果需要则复制项" 并点击完成。

  3. 在您的应用目标的 "构建阶段" 中创建一个新的 "运行脚本阶段",并将在脚本文本字段中粘贴以下片段:

     bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Pozzito.framework/strip-frameworks.sh"
    

此步骤是为了解决在存档通用二进制时 App Store 提交错误

##设置和配置

SupportUI

要使用 PozzitoUI,您必须安装 Pozzito,因为 PozzitoUI 使用 Pozzito 与我们的 API 通信。

安装 Pozzito 后,您需要将其导入您想使用的文件,并通过 apiKey 和 appId 实例化 PozzitoManager。

之后,您可以从 wish to display support screens 的控制器中实例化 SupportUI,并将该控制器作为参数。

PozzitoManager(apiKey: "", appId: "", completion: { (err) in
    if err == nil {
        SupportUI(initialViewController: self)
    }
})

在实例化 SupportUI 后,您将看到 Pozzito 登录屏幕或您可以根据配置从中联系代理的控制器。

######可用方法

/// Starts support sequence
/// If userParameters exist and username is not required in your config user is created with those parameters
/// If there are no parameters an anonymous user is created
/// If your config requires username, login screen will be shown, with option to enter data or use userParameters to login
/// After user creation/login contact agent screen is shown
/// 
///
/// - Parameters
///   - initialViewController - controller from which support ui is displayed(pushed)
///   - 
///   - userParameters: Optional dictionary with user parameters,
///                             current options - userName (email), firstName, lastName
@discardableResult public init(initialViewController: UIViewController? = nil,
                                window: UIWindow? = nil,
                                userParameters: RequestDictionary? = nil)