EstimoteMirror 0.2.0

EstimoteMirror 0.2.0

测试已测试
Lang语言 SwiftSwift
许可 Apache-2.0
发布最后发布2018年8月
SPM支持 SPM

Fero HetesGrzegorz Krukiewicz Gacek 维护。



Estimote Mirror iOS SDK

CocoaPod Version Apache License 2.0

此 SDK 允许您通过 Estimote Mirror 使用您的 iOS 应用控制大屏幕.

主要功能

  • 基于移动 SDK 构建 Mirror 体验 - 您可以使用仅包含移动 Display SDK 的第一个 Mirror 应用开始原型设计。无需提前将任何代码或资源上传到 Mirror。

  • 预定义视图 - 无需设计您的第一个 Mirror 应用视图。iOS Mirror SDK 允许您基于预定义视图定义自定义屏幕;您只需声明基本样式和数据即可。

  • 从 Mirror 屏幕到移动应用的反馈 - 每当触发生成任何显示动作时,您的移动应用都会收到通知。您可以在移动应用内处理屏幕更改成功并执行进一步的操作。

请查看 README 的其余部分以获取更多详细信息。

我们非常感谢您对我们 SDK 的反馈,谢谢!

目录

安装

先决条件

  • 1 Estimote Mirror 带有 1.0.15+ 固件版本。
  • Estimote Cloud 中的帐户。
  • 支持低功耗蓝牙的 iOS 设备。我们建议使用 iOS 10.0+(iPhone 5s 或更高版本)。

Pod

通过 CocoaPods 安装

  • $ pod init 在项目根目录下
  • 编辑您的 Podfile,在项目目标下包含以下仓库
  pod 'EstimoteMirror'
  pod 'EstimoteBluetoothScanning'
  pod 'EstimoteProximitySDK'
  • $ pod install

从 Estimote Cloud 获取应用程序凭据

要获取您移动应用程序的 Estimote Cloud 凭据

  1. 登录到您的 Estimote Cloud 帐户。
  2. 转到 Apps 部分,并点击 添加新应用 选项。
  3. 选择 您的应用程序 选项。
  4. 保存您的 应用 ID/应用 Token 凭据。

快速入门

这里是一个简单示例,用于在用户出现在镜像附近范围内时在屏幕上显示海报视图。

// Declare mirrorClient and proximityObserver as class properties
let mirrorClient = MirrorClient(appID: "", appToken: "")
var proximityObserver: EPXProximityObserver!

// Inside you class implementation
// Prepare your customized Poster View
let sneakersBanner = Poster() { p in
            
    p.header = "Exceptional traction\nfrom your first to final mile"
    p.body = "Now 20% off!"
    p.image = .preloaded(path: "shoe_big.jpg")
    
    p.style = PosterStyle() { ps in
        
        ps.imagePosition = Position(horizontal: .center, vertical: .top(offset: 80))
        ps.textPosition = Position(horizontal: .center, vertical: .bottom(offset: 80))
        ps.textAlign = .center
        ps.headerFontSize = .percent(130)
    }
}
        
// Initialize your Estimote Cloud credentials
let credentials = CloudCredentials(appID: "", appToken: "")

// Build ProximityObserver with Cloud credentials
self.proximityObserver = ProximityObserver(credentials: credentials, onError: { error in
    
    print("\(error)")
})

// Define near proximity zone
let mirrorZone = ProximityZone(tag: "mirror", range: ProximityRange.near)
mirrorZone.onEnter = { zoneContext in
   
    print("Enter mirror")
    self.mirrorClient.display(sneakersBanner, onMirror: zoneContext.deviceIdentifier)
}
mirrorZone.onExit = { zoneContext in
    
    print("Exit mirror")
}

// Start proximity observation
self.proximityObserver.startObserving([mirrorZone])

区域监控基于最可靠的信号处理技术 Estimote Proximity SDK。

要获取更多详细信息,您可以查看 iOS-Proximity-SDK 的 README。

用户反馈和问题

在Estimote,我们相信开放反馈!以下是一些分享您意见的常见方式

更新日志

要查看我们的SDK最新版本的变更信息,请访问我们的发布页面

许可

Apache 2.0