This Acaia SDK version supports the following scales: Pearl, Lunar, Pearl S, Cinco, Pyxis
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.
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)
-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
-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
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
-The example APP source can be found as Object-C and SWIFT. ( ./Example-objc and ./Example-swift )
=====================================
如何建置 acaia_sdk_ios 範例專案?
- 透過 git clone 下載至本機
git clone https://github.com/acaia/acaia_sdk_ios
- 或是前往 https://github.com/acaia/acaia_sdk_ios 下載 repository 的 zip 檔
- 前往 AcaiaExamples.xcodeproj 所在的位置, 如 acaia_sdk_ios/AcaiaExamples.xcodeproj
- 確定 Podfile 檔案已存在該目錄下 -執行以下命令以安裝 cocoapod 的套件清單
pod install
- 執行 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