/acaia_sdk_ios

Primary LanguageObjective-COtherNOASSERTION

SDK updated

This Acaia SDK version supports the following scales: Pearl, Lunar, Pearl S, Cinco, Pyxis

Acaia SDK for iOS

This repository contains binary precompiled SDK for iOS, with support for the Acaia scales. Documentation is included in the form of Example apps, one for Object_C, and one for SWIFT, where you will find the functions demonstrated.

Functions

The following scale functions are supported by this SDK:

  • Scan for Acaia scale
  • Connect / Disconnect scale
  • Send TARE command
  • Send Timer Start/Stop command
  • Read current weight from scale ( stream updated 5 pr sec)

HOW-TO

1. Download and install:

​ -Download via git clone

git clone https://github.com/acaia/acaia_sdk_ios

-Or go to https://github.com/acaia/acaia_sdk_ios to download the zip file from the repository ​

2. Update cocoapod

​ -Go to the location of AcaiaExamples.xcodeproj, ( acaia_sdk_ios/AcaiaExamples.xcodeproj )

  • Install the package via cocoapod from the same folder as the POD file:
pod install

3. Build example APP:

from XCODE, open AcaiaExamples.xcworkspace ( generated by cocoapod ) -Select Example-objc or Example-swift and the target iOS device in the Scheme option in the Tool Bar -Execute Build and Run ​

Sample source code

​ -The example APP source can be found as Object-C and SWIFT. ( ./Example-objc and ./Example-swift )

=====================================

如何建置 acaia_sdk_ios 範例專案?

1. 下載與安裝

  • 透過 git clone 下載至本機
git clone https://github.com/acaia/acaia_sdk_ios

2. 更新 cocoapod

  • 前往 AcaiaExamples.xcodeproj 所在的位置, 如 acaia_sdk_ios/AcaiaExamples.xcodeproj
  • 確定 Podfile 檔案已存在該目錄下 -執行以下命令以安裝 cocoapod 的套件清單
pod install

3. 執行範例

  • 執行 cocoapod 產生的 AcaiaExamples.xcworkspace
  • 於 Tool Bar 中的 Scheme 選項中選擇 Example-objc 或是 Example-swift 以及目標 iOS device
  • 執行 Build and Run ​

關於範例原始碼

  • 關於 Objective-C 的示範, 請參考 Example-objc/ 下的檔案. Build Target 為 Example-objc
  • 關於 Swift 的示範, 請參考 Example-swift/ 下的檔案. Build Target 為 Example-swift