AnalyticsSwift 0.2.0

AnalyticsSwift 0.2.0

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2015年9月
SPM支持SPM

Prateek SrivastavaLadan Azita NasserianSegmentBrennan Gamwell 维护。



  • Segment

analytics-swift

analytics-swift 是一个用于 Segment 的 Swift 客户端

安装库

手动

  1. 下载库的最新 二进制文件
  2. AnalyticsSwift.framework 文件 拖入 您的项目中。
  3. 在“构建阶段”下,点击 '新建拷贝文件阶段’ 按钮。
  4. 在 '拷贝文件’ 目标中,选择 'Frameworks’ 作为目标,并将 Analytics.framework 文件从我们在步骤 2 中添加到项目的二进制中拖入。

用法

  • AnalyticsSwift 库添加到您的项目中。

  • 添加正确的导入 import AnalyticsSwift

  • 使用您的项目写入密钥创建一个分析客户端实例

var analytics = Analytics.create(YOUR_SEGMENT_WRITE_KEY_HERE)

var message = TrackMessageBuilder(event: "Button A").userId("prateek")

  • 排队消息。

analytics.enqueue(message)

  • 等待消息上传或手动触发刷新。

analytics.flush()

示例

您可以在这里看到库的基本使用示例。

许可证

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|


(The MIT License)

Copyright (c) 2013 Segment Inc. <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.