├── .gitignore ├── AcaiaSDK.xcframework ├── ios-arm64_x86_64-simulator │ └── AcaiaSDK.framework │ │ ├── _CodeSignature │ │ ├── CodeSignature │ │ ├── CodeDirectory │ │ ├── CodeRequirements │ │ ├── CodeRequirements-1 │ │ └── CodeResources │ │ ├── AcaiaSDK │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ └── Headers │ │ ├── AcaiaSDK.h │ │ └── AcaiaManager.h ├── ios-arm64 │ └── AcaiaSDK.framework │ │ ├── AcaiaSDK │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ └── Headers │ │ ├── AcaiaSDK.h │ │ └── AcaiaManager.h └── Info.plist ├── Sources └── acaia_sdk_ios │ └── acaia_sdk_ios.swift ├── Example-objc ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── AcaiaScaleTableVC.h ├── ViewController.h ├── AppDelegate.h ├── main.m ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── AppDelegate.m ├── ViewController.m └── AcaiaScaleTableVC.m ├── Example-swift ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── Example-swift test source-Bridging-Header.h ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── AppDelegate.swift ├── AcaiaScaleTableVC.swift └── AcaiaViewController.swift ├── Tests ├── LinuxMain.swift └── acaia_sdk_iosTests │ ├── XCTestManifests.swift │ └── acaia_sdk_iosTests.swift ├── AcaiaExamples.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcshareddata │ └── xcschemes │ │ ├── Example-objc.xcscheme │ │ └── Example-swift.xcscheme └── project.pbxproj ├── Package.swift ├── AcaiaSDK.podspec ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | Podfile.lock 2 | Pods 3 | xcuserdata 4 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeSignature: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sources/acaia_sdk_ios/acaia_sdk_ios.swift: -------------------------------------------------------------------------------- 1 | struct acaia_sdk_ios { 2 | var text = "Hello, World!" 3 | } 4 | -------------------------------------------------------------------------------- /Example-objc/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example-swift/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/AcaiaSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/AcaiaSDK -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/Info.plist -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import acaia_sdk_iosTests 4 | 5 | var tests = [XCTestCaseEntry]() 6 | tests += acaia_sdk_iosTests.allTests() 7 | XCTMain(tests) 8 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module AcaiaSDK { 2 | umbrella header "AcaiaSDK.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/AcaiaSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/AcaiaSDK -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/Info.plist -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module AcaiaSDK { 2 | umbrella header "AcaiaSDK.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /AcaiaExamples.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeDirectory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeDirectory -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeRequirements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeRequirements -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeRequirements-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acaia/acaia_sdk_ios/HEAD/AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeRequirements-1 -------------------------------------------------------------------------------- /Tests/acaia_sdk_iosTests/XCTestManifests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | #if !canImport(ObjectiveC) 4 | public func allTests() -> [XCTestCaseEntry] { 5 | return [ 6 | testCase(acaia_sdk_iosTests.allTests), 7 | ] 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /Example-objc/AcaiaScaleTableVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaScaleTableVC.h 3 | // AcaiaExample 4 | // 5 | // Created by Michael Wu on 2018/7/2. 6 | // Copyright © 2018 mikewu1211. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AcaiaScaleTableVC : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example-objc/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AcaiaSample 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AcaiaExamples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example-objc/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AcaiaSample 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Example-objc/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AcaiaSample 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example-swift/Example-swift test source-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Example-swift test source-Bridging-Header.h.h 3 | // Example-swift test source 4 | // 5 | // Created by Inaba Mizuki on 2019/10/2. 6 | // Copyright © 2019 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #ifndef Example_swift_test_source_Bridging_Header_h_h 10 | #define Example_swift_test_source_Bridging_Header_h_h 11 | 12 | #import "AcaiaSDK.h" 13 | 14 | #endif /* Example_swift_test_source_Bridging_Header_h_h */ 15 | -------------------------------------------------------------------------------- /Tests/acaia_sdk_iosTests/acaia_sdk_iosTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import acaia_sdk_ios 3 | 4 | final class acaia_sdk_iosTests: XCTestCase { 5 | func testExample() { 6 | // This is an example of a functional test case. 7 | // Use XCTAssert and related functions to verify your tests produce the correct 8 | // results. 9 | XCTAssertEqual(acaia_sdk_ios().text, "Hello, World!") 10 | } 11 | 12 | static var allTests = [ 13 | ("testExample", testExample), 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/Headers/AcaiaSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaSDK.h 3 | // AcaiaSDK 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import 10 | // #import 11 | //! Project version number for AcaiaSDK. 12 | FOUNDATION_EXPORT double AcaiaSDKVersionNumber; 13 | 14 | //! Project version string for AcaiaSDK. 15 | FOUNDATION_EXPORT const unsigned char AcaiaSDKVersionString[]; 16 | 17 | #import "AcaiaManager.h" 18 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/Headers/AcaiaSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaSDK.h 3 | // AcaiaSDK 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import 10 | // #import 11 | //! Project version number for AcaiaSDK. 12 | FOUNDATION_EXPORT double AcaiaSDKVersionNumber; 13 | 14 | //! Project version string for AcaiaSDK. 15 | FOUNDATION_EXPORT const unsigned char AcaiaSDKVersionString[]; 16 | 17 | #import "AcaiaManager.h" 18 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | 7 | let package = Package( 8 | 9 | name: "acaia_sdk_ios", 10 | 11 | products: [ 12 | .library( 13 | name: "AcaiaSDK", 14 | targets: ["AcaiaSDK"] 15 | ), 16 | ], 17 | 18 | targets: [ 19 | .binaryTarget( 20 | name: "AcaiaSDK", 21 | path: "AcaiaSDK.xcframework" 22 | ), 23 | ] 24 | ) 25 | -------------------------------------------------------------------------------- /AcaiaSDK.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AcaiaSDK" 3 | s.version = "1.5.0" 4 | s.platform = :ios, '12.0' 5 | s.summary = "Acaia SDK to work with Acaia Pearl and Lunar." 6 | s.license = {"type"=>"MIT", "file"=>"LICENSE"} 7 | s.author = "Acaia Corp" 8 | s.homepage = "https://github.com/acaia/acaia_sdk_ios" 9 | s.description = "This is the SDK for iOS developer to connect with Acaia Perl and Lunar scales." 10 | s.source = { :git => 'https://github.com/acaia/acaia_sdk_ios.git', :tag => s.version.to_s } 11 | s.ios.deployment_target = '12.0' 12 | s.ios.vendored_framework = 'AcaiaSDK.xcframework' 13 | end 14 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AvailableLibraries 6 | 7 | 8 | LibraryIdentifier 9 | ios-arm64_x86_64-simulator 10 | LibraryPath 11 | AcaiaSDK.framework 12 | SupportedArchitectures 13 | 14 | arm64 15 | x86_64 16 | 17 | SupportedPlatform 18 | ios 19 | SupportedPlatformVariant 20 | simulator 21 | 22 | 23 | LibraryIdentifier 24 | ios-arm64 25 | LibraryPath 26 | AcaiaSDK.framework 27 | SupportedArchitectures 28 | 29 | arm64 30 | 31 | SupportedPlatform 32 | ios 33 | 34 | 35 | CFBundlePackageType 36 | XFWK 37 | XCFrameworkFormatVersion 38 | 1.0 39 | 40 | 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 Acaia 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to use 5 | the binary unmodified code for the Acaia SDK. Reverse-engineering or decode of 6 | binary files are not permitted under this Licensee. 7 | 8 | Example APPS included in this repository can freely be used as source to copy from, 9 | and re-use in your own applications. 10 | 11 | It is not permitted to sublicense or sell any 12 | of the files in this repository. 13 | 14 | If your app is a paid- and/or subscription app, 15 | you are required to include mention of Acaia your app descriptions and documentation, 16 | and also to notify support@acaia.co about your apps existence. 17 | 18 | The above copyright notice and this permission notice shall be included in 19 | all copies or substantial portions of the Software, and be included with any versions 20 | of software created based on this SDK and/or example files. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 | THE SOFTWARE. 29 | -------------------------------------------------------------------------------- /Example-objc/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Example-swift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64/AcaiaSDK.framework/Headers/AcaiaManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaManager.h 3 | // AcaiaSDK 4 | // 5 | // Created by Michael Wu on 2018/6/30. 6 | // Copyright © 2018 acaia Corp. All rights reserved. 7 | // 8 | #import 9 | 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | extern NSString * const AcaiaScaleDidConnected; 14 | extern NSString * const AcaiaScaleDidDisconnected; 15 | extern NSString * const AcaiaScaleWeight; 16 | extern NSString * const AcaiaScaleTimer; 17 | extern NSString * const AcaiaScaleDeviceListChanged; 18 | extern NSString * const AcaiaScaleDidFinishScan; 19 | extern NSString * const AcaiaScaleConnectFailed; 20 | extern NSString * const AcaiaScaleUserInfoKeyUnit; 21 | extern NSString * const AcaiaScaleUserInfoKeyWeight; 22 | extern NSString * const AcaiaScaleUserInfoKeyTimer; 23 | 24 | typedef NS_ENUM(NSInteger, AcaiaScaleWeightUnit) { 25 | AcaiaScaleWeightUnitGram, 26 | AcaiaScaleWeightUnitOunce 27 | }; 28 | 29 | 30 | @class AcaiaScale; 31 | 32 | @interface AcaiaManager : NSObject 33 | 34 | @property (readonly) BOOL isReady; 35 | @property (readonly) NSArray* scaleList; 36 | @property (nullable, readonly) AcaiaScale *connectedScale; 37 | 38 | @property (nonatomic, readwrite) BOOL enableBackgroundRecovery; 39 | 40 | + (instancetype)sharedManager; 41 | - (void)startScan:(NSTimeInterval)interval; 42 | - (void)stopScan; 43 | 44 | @end 45 | 46 | 47 | @interface AcaiaScale : NSObject 48 | 49 | @property (readonly) NSString *uuid; 50 | @property (readonly) NSString *name; 51 | @property (readonly) NSString *modelName; 52 | 53 | - (instancetype)initWithDevice:(id)device; 54 | 55 | - (void)startTimer; 56 | - (void)stopTimer; 57 | - (void)pauseTimer; 58 | - (void)tare; 59 | - (void)connect; 60 | - (void)disconnect; 61 | 62 | @end 63 | 64 | 65 | NS_ASSUME_NONNULL_END 66 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/Headers/AcaiaManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaManager.h 3 | // AcaiaSDK 4 | // 5 | // Created by Michael Wu on 2018/6/30. 6 | // Copyright © 2018 acaia Corp. All rights reserved. 7 | // 8 | #import 9 | 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | extern NSString * const AcaiaScaleDidConnected; 14 | extern NSString * const AcaiaScaleDidDisconnected; 15 | extern NSString * const AcaiaScaleWeight; 16 | extern NSString * const AcaiaScaleTimer; 17 | extern NSString * const AcaiaScaleDeviceListChanged; 18 | extern NSString * const AcaiaScaleDidFinishScan; 19 | extern NSString * const AcaiaScaleConnectFailed; 20 | extern NSString * const AcaiaScaleUserInfoKeyUnit; 21 | extern NSString * const AcaiaScaleUserInfoKeyWeight; 22 | extern NSString * const AcaiaScaleUserInfoKeyTimer; 23 | 24 | typedef NS_ENUM(NSInteger, AcaiaScaleWeightUnit) { 25 | AcaiaScaleWeightUnitGram, 26 | AcaiaScaleWeightUnitOunce 27 | }; 28 | 29 | 30 | @class AcaiaScale; 31 | 32 | @interface AcaiaManager : NSObject 33 | 34 | @property (readonly) BOOL isReady; 35 | @property (readonly) NSArray* scaleList; 36 | @property (nullable, readonly) AcaiaScale *connectedScale; 37 | 38 | @property (nonatomic, readwrite) BOOL enableBackgroundRecovery; 39 | 40 | + (instancetype)sharedManager; 41 | - (void)startScan:(NSTimeInterval)interval; 42 | - (void)stopScan; 43 | 44 | @end 45 | 46 | 47 | @interface AcaiaScale : NSObject 48 | 49 | @property (readonly) NSString *uuid; 50 | @property (readonly) NSString *name; 51 | @property (readonly) NSString *modelName; 52 | 53 | - (instancetype)initWithDevice:(id)device; 54 | 55 | - (void)startTimer; 56 | - (void)stopTimer; 57 | - (void)pauseTimer; 58 | - (void)tare; 59 | - (void)connect; 60 | - (void)disconnect; 61 | 62 | @end 63 | 64 | 65 | NS_ASSUME_NONNULL_END 66 | -------------------------------------------------------------------------------- /Example-objc/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | AcaiaEamples-objc 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSBluetoothAlwaysUsageDescription 26 | Need Bluetooth access to communicate with Acaia scales 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UIRequiresFullScreen 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIUserInterfaceStyle 51 | Light 52 | 53 | 54 | -------------------------------------------------------------------------------- /Example-objc/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example-swift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example-objc/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AcaiaSample 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Example-swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | AcaiaEamples-swift 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSBluetoothAlwaysUsageDescription 26 | Need Bluetooth access to communicate with Acaia scales 27 | UIBackgroundModes 28 | 29 | bluetooth-central 30 | bluetooth-peripheral 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | UIRequiredDeviceCapabilities 37 | 38 | armv7 39 | 40 | UIRequiresFullScreen 41 | 42 | UIStatusBarTintParameters 43 | 44 | UINavigationBar 45 | 46 | Style 47 | UIBarStyleDefault 48 | Translucent 49 | 50 | 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | UISupportedInterfaceOrientations~ipad 59 | 60 | UIInterfaceOrientationPortrait 61 | UIInterfaceOrientationPortraitUpsideDown 62 | UIInterfaceOrientationLandscapeLeft 63 | UIInterfaceOrientationLandscapeRight 64 | 65 | UIUserInterfaceStyle 66 | Light 67 | 68 | 69 | -------------------------------------------------------------------------------- /Example-swift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AcaiaSDKExampleSwift 4 | // 5 | // Created by Michael Wu on 2018/7/4. 6 | // Copyright © 2018 acaia Corp. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SDK updated 2 | This Acaia SDK version supports the following scales: 3 | Pearl, Lunar, Pearl S, Cinco, Pyxis 4 | 5 | # Acaia SDK for iOS 6 | 7 | This repository contains binary precompiled SDK for iOS, with support for the Acaia scales. 8 | Documentation is included in the form of Example apps, one for Object_C, and one for SWIFT, where you will find the functions demonstrated. 9 | 10 | ## Functions 11 | The following scale functions are supported by this SDK: 12 | - Scan for Acaia scale 13 | - Connect / Disconnect scale 14 | - Send TARE command 15 | - Send Timer Start/Stop command 16 | - Read current weight from scale ( stream updated 5 pr sec) 17 | 18 | # HOW-TO 19 | 20 | # 1. Download and install: 21 | ​ 22 | -Download via git clone 23 | 24 | ```bash 25 | git clone https://github.com/acaia/acaia_sdk_ios 26 | ``` 27 | 28 | -Or go to https://github.com/acaia/acaia_sdk_ios to download the zip file from the repository 29 | ​ 30 | 31 | 32 | # 2. Update cocoapod 33 | ​ 34 | -Go to the location of AcaiaExamples.xcodeproj, ( acaia_sdk_ios/AcaiaExamples.xcodeproj ) 35 | 36 | - Install the package via cocoapod from the same folder as the POD file: 37 | ```bash 38 | pod install 39 | ``` 40 | ​ 41 | # 3. Build example APP: 42 | 43 | from XCODE, open AcaiaExamples.xcworkspace ( generated by cocoapod ) 44 | -Select Example-objc or Example-swift and the target iOS device in the Scheme option in the Tool Bar 45 | -Execute Build and Run 46 | ​ 47 | 48 | # Sample source code 49 | ​ 50 | -The example APP source can be found as Object-C and SWIFT. 51 | ( ./Example-objc and ./Example-swift ) 52 | 53 | 54 | 55 | ===================================== 56 | 57 | 58 | 如何建置 acaia_sdk_ios 範例專案? 59 | 60 | ​ 61 | # 1. 下載與安裝 62 | ​ 63 | - 透過 git clone 下載至本機 64 | ```bash 65 | git clone https://github.com/acaia/acaia_sdk_ios 66 | ``` 67 | - 或是前往 https://github.com/acaia/acaia_sdk_ios 下載 repository 的 zip 檔 68 | ​ 69 | # 2. 更新 cocoapod 70 | ​ 71 | - 前往 AcaiaExamples.xcodeproj 所在的位置, 如 acaia_sdk_ios/AcaiaExamples.xcodeproj 72 | - 確定 Podfile 檔案已存在該目錄下 73 | -執行以下命令以安裝 cocoapod 的套件清單 74 | ```bash 75 | pod install 76 | ``` 77 | ​ 78 | # 3. 執行範例 79 | ​ 80 | - 執行 cocoapod 產生的 AcaiaExamples.xcworkspace 81 | - 於 Tool Bar 中的 Scheme 選項中選擇 Example-objc 或是 Example-swift 以及目標 iOS device 82 | - 執行 Build and Run 83 | ​ 84 | # 關於範例原始碼 85 | ​ 86 | - 關於 Objective-C 的示範, 請參考 Example-objc/ 下的檔案. Build Target 為 Example-objc 87 | - 關於 Swift 的示範, 請參考 Example-swift/ 下的檔案. Build Target 為 Example-swift 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /AcaiaExamples.xcodeproj/xcshareddata/xcschemes/Example-objc.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /AcaiaExamples.xcodeproj/xcshareddata/xcschemes/Example-swift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /AcaiaSDK.xcframework/ios-arm64_x86_64-simulator/AcaiaSDK.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Headers/AcaiaManager.h 8 | 9 | tPgWC+15Px4Zu7uzZuh5IkOhgf8= 10 | 11 | Headers/AcaiaSDK.h 12 | 13 | W1Ol5WYnIfKK0tvVTLRuVp+IY/Q= 14 | 15 | Info.plist 16 | 17 | xuRMmdBXdDFCtnzAGlTBwxtooBI= 18 | 19 | Modules/module.modulemap 20 | 21 | o0v9UMm0zSCURu46uo+7xEEbwfU= 22 | 23 | 24 | files2 25 | 26 | Headers/AcaiaManager.h 27 | 28 | hash 29 | 30 | tPgWC+15Px4Zu7uzZuh5IkOhgf8= 31 | 32 | hash2 33 | 34 | 66UIIZsBh9BBuIt6vprCRBIzI307qYup0K2G16oZMfI= 35 | 36 | 37 | Headers/AcaiaSDK.h 38 | 39 | hash 40 | 41 | W1Ol5WYnIfKK0tvVTLRuVp+IY/Q= 42 | 43 | hash2 44 | 45 | SKl0sNWvfOt9gdFeHDCWaDyG3gZjNbDNS+rFkZmNaFg= 46 | 47 | 48 | Modules/module.modulemap 49 | 50 | hash 51 | 52 | o0v9UMm0zSCURu46uo+7xEEbwfU= 53 | 54 | hash2 55 | 56 | M0wUGuSzZ6x4PeTYDYlSuEsXBDFhxTRXcfWSkb386ho= 57 | 58 | 59 | 60 | rules 61 | 62 | ^.* 63 | 64 | ^.*\.lproj/ 65 | 66 | optional 67 | 68 | weight 69 | 1000 70 | 71 | ^.*\.lproj/locversion.plist$ 72 | 73 | omit 74 | 75 | weight 76 | 1100 77 | 78 | ^Base\.lproj/ 79 | 80 | weight 81 | 1010 82 | 83 | ^version.plist$ 84 | 85 | 86 | rules2 87 | 88 | .*\.dSYM($|/) 89 | 90 | weight 91 | 11 92 | 93 | ^(.*/)?\.DS_Store$ 94 | 95 | omit 96 | 97 | weight 98 | 2000 99 | 100 | ^.* 101 | 102 | ^.*\.lproj/ 103 | 104 | optional 105 | 106 | weight 107 | 1000 108 | 109 | ^.*\.lproj/locversion.plist$ 110 | 111 | omit 112 | 113 | weight 114 | 1100 115 | 116 | ^Base\.lproj/ 117 | 118 | weight 119 | 1010 120 | 121 | ^Info\.plist$ 122 | 123 | omit 124 | 125 | weight 126 | 20 127 | 128 | ^PkgInfo$ 129 | 130 | omit 131 | 132 | weight 133 | 20 134 | 135 | ^embedded\.provisionprofile$ 136 | 137 | weight 138 | 20 139 | 140 | ^version\.plist$ 141 | 142 | weight 143 | 20 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /Example-swift/AcaiaScaleTableVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaScaleTableVC.swift 3 | // AcaiaSDKExampleSwift 4 | // 5 | // Created by Michael Wu on 2018/7/4. 6 | // Copyright © 2018 acaia Corp. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AcaiaSDK 11 | 12 | 13 | class AcaiaScaleTableVC: UITableViewController { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | _setRefreshControl() 19 | _addAcaiaEventsObserver() 20 | } 21 | 22 | override func viewDidAppear(_ animated: Bool) { 23 | super.viewDidAppear(animated) 24 | 25 | AcaiaManager.shared().startScan(0.5) 26 | } 27 | 28 | override func viewWillDisappear(_ animated: Bool) { 29 | super.viewWillDisappear(animated) 30 | 31 | _activityIndicatorView.stopAnimating() 32 | 33 | _timerForConnectTimeOut?.invalidate() 34 | _timerForConnectTimeOut = nil 35 | 36 | _removeScaleEventObservers() 37 | } 38 | 39 | override func numberOfSections(in tableView: UITableView) -> Int { 40 | return 1 41 | } 42 | 43 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 44 | return AcaiaManager.shared().scaleList.count 45 | } 46 | 47 | override func tableView(_ tableView: UITableView, 48 | cellForRowAt indexPath: IndexPath) -> UITableViewCell { 49 | let cell = tableView.dequeueReusableCell(withIdentifier: "ScaleCell", for: indexPath) 50 | 51 | let scale = AcaiaManager.shared().scaleList[indexPath.row] 52 | 53 | cell.textLabel?.text = scale.name 54 | cell.detailTextLabel?.text = scale.modelName 55 | 56 | return cell 57 | } 58 | 59 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 60 | _activityIndicatorView.isHidden = false 61 | _activityIndicatorView.startAnimating() 62 | 63 | let scale = AcaiaManager.shared().scaleList[indexPath.row] 64 | scale.connect() 65 | 66 | _timerForConnectTimeOut = Timer.scheduledTimer(timeInterval: 10.0, 67 | target: self, 68 | selector: #selector(_connectTimeOut(_:)), 69 | userInfo: nil, 70 | repeats: false) 71 | } 72 | 73 | 74 | // MARK: Private 75 | 76 | private var _timerForConnectTimeOut: Timer? = nil 77 | 78 | lazy private var _activityIndicatorView: UIActivityIndicatorView = { 79 | let indicator = UIActivityIndicatorView(style: .large) 80 | indicator.hidesWhenStopped = true 81 | indicator.isHidden = true 82 | 83 | view.addSubview(indicator) 84 | indicator.center = view.center 85 | 86 | return indicator 87 | }() 88 | 89 | private func _setRefreshControl() { 90 | tableView.refreshControl = .init() 91 | tableView.refreshControl?.attributedTitle = .init(string: "Scanning") 92 | tableView.refreshControl?.addAction( 93 | UIAction { _ in AcaiaManager.shared().startScan(0.5) }, 94 | for: .valueChanged 95 | ) 96 | } 97 | 98 | private func _addAcaiaEventsObserver() { 99 | NotificationCenter.default.addObserver(self, 100 | selector: #selector(_didConnected), 101 | name: .init(rawValue: AcaiaScaleDidConnected), 102 | object: nil) 103 | NotificationCenter.default.addObserver(self, 104 | selector: #selector(_didFinishScan), 105 | name: .init(rawValue: AcaiaScaleDidFinishScan), 106 | object: nil) 107 | } 108 | 109 | private func _removeScaleEventObservers() { 110 | NotificationCenter.default.removeObserver(self) 111 | } 112 | 113 | @objc private func _didConnected(notification: NSNotification) { 114 | _activityIndicatorView.stopAnimating() 115 | 116 | _timerForConnectTimeOut?.invalidate() 117 | _timerForConnectTimeOut = nil 118 | 119 | navigationController?.popViewController(animated: true) 120 | } 121 | 122 | @objc private func _didFinishScan(notification: NSNotification) { 123 | tableView.refreshControl?.endRefreshing() 124 | tableView.reloadData() 125 | } 126 | 127 | @objc private func _connectTimeOut(_ timer: Timer) { 128 | _activityIndicatorView.stopAnimating() 129 | 130 | _timerForConnectTimeOut?.invalidate() 131 | _timerForConnectTimeOut = nil 132 | 133 | AcaiaManager.shared().startScan(0.1) 134 | 135 | let alert = UIAlertController(title: nil, 136 | message: "Connect timeout", 137 | preferredStyle: .alert) 138 | alert.addAction(UIAlertAction(title: "Ok", style: .cancel)) 139 | 140 | present(alert, animated: true) 141 | } 142 | } 143 | 144 | -------------------------------------------------------------------------------- /Example-objc/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AcaiaSample 4 | // 5 | // Created by Michael Wu on 2018/10/30. 6 | // Copyright © 2018 Acaia Corp. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | @import AcaiaSDK; 11 | 12 | 13 | @interface ViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UIButton* _scanScaleButton; 16 | @property (weak, nonatomic) IBOutlet UIButton* _selectModeButton; 17 | 18 | @property (strong, nonatomic) IBOutlet UIButton *btnTimer; 19 | @property (strong, nonatomic) IBOutlet UIButton *btnDisconnect; 20 | @property (strong, nonatomic) IBOutlet UIButton *btnPauseTimer; 21 | @property (strong, nonatomic) IBOutlet UIButton *btnTare; 22 | @property (strong, nonatomic) IBOutlet UILabel *scaleNameL; 23 | @property (strong, nonatomic) IBOutlet UILabel *weightL; 24 | @property (strong, nonatomic) IBOutlet UILabel *timerL; 25 | @property BOOL isTimerStarted; 26 | @property BOOL isTimerPaused; 27 | @property (strong, nonatomic) IBOutlet UIView *toolView; 28 | 29 | @end 30 | 31 | @implementation ViewController 32 | 33 | - (void)viewDidLoad { 34 | [super viewDidLoad]; 35 | 36 | self._selectModeButton.hidden = true; 37 | 38 | // Do any additional setup after loading the view, typically from a nib. 39 | [[NSNotificationCenter defaultCenter] addObserver:self 40 | selector:@selector(onConnect:) 41 | name:AcaiaScaleDidConnected 42 | object:nil]; 43 | [[NSNotificationCenter defaultCenter] addObserver:self 44 | selector:@selector(onDisconnect:) 45 | name:AcaiaScaleDidDisconnected 46 | object:nil]; 47 | [[NSNotificationCenter defaultCenter] addObserver:self 48 | selector:@selector(onWeight:) 49 | name:AcaiaScaleWeight 50 | object:nil]; 51 | [[NSNotificationCenter defaultCenter] addObserver:self 52 | selector:@selector(onTimer:) 53 | name:AcaiaScaleTimer 54 | object:nil]; 55 | } 56 | - (void)viewWillAppear:(BOOL)animated { 57 | [super viewWillAppear:animated]; 58 | 59 | [self refreshUI]; 60 | } 61 | 62 | - (void)onConnect:(NSNotification *)noti { 63 | [self refreshUI]; 64 | } 65 | 66 | - (void)onFailed:(NSNotification *)noti { 67 | [self refreshUI]; 68 | } 69 | 70 | - (void)onDisconnect:(NSNotification *)noti { 71 | [self refreshUI]; 72 | } 73 | 74 | - (void)onWeight:(NSNotification *)noti { 75 | AcaiaScaleWeightUnit unit = [noti.userInfo[AcaiaScaleUserInfoKeyUnit] unsignedIntegerValue]; 76 | float weight = [noti.userInfo[AcaiaScaleUserInfoKeyWeight] floatValue]; 77 | 78 | if (unit == AcaiaScaleWeightUnitGram) { 79 | self.weightL.text = [NSString stringWithFormat:@"%.1f g", weight]; 80 | } else { 81 | self.weightL.text = [NSString stringWithFormat:@"%.4f oz", weight]; 82 | } 83 | 84 | } 85 | 86 | - (void)onTimer:(NSNotification *)noti { 87 | NSNumber *timer = [[noti userInfo] objectForKey:AcaiaScaleUserInfoKeyTimer]; 88 | NSInteger time = [timer integerValue]; 89 | 90 | self.timerL.text = [NSString stringWithFormat:@"%02lu:%02lu", time/60, time%60]; 91 | self.isTimerStarted = true; 92 | } 93 | 94 | - (void)refreshUI { 95 | if ([AcaiaManager sharedManager].connectedScale) { 96 | AcaiaScale *scale = [AcaiaManager sharedManager].connectedScale; 97 | self.scaleNameL.text = scale.name; 98 | self.toolView.hidden = false; 99 | } else { 100 | self.toolView.hidden = true; 101 | self.scaleNameL.text = @"-"; 102 | self.timerL.text = @"-"; 103 | self.weightL.text = @"-"; 104 | } 105 | } 106 | 107 | - (IBAction)onBtnTimer { 108 | AcaiaScale *scale = [AcaiaManager sharedManager].connectedScale; 109 | if (scale == nil) { return; } 110 | 111 | if (self.isTimerStarted) { 112 | self.isTimerStarted = false; 113 | self.isTimerPaused = false; 114 | [scale stopTimer]; 115 | self.btnPauseTimer.enabled = false; 116 | [self.btnTimer setTitle:@"Start Timer" forState:UIControlStateNormal]; 117 | [self.btnPauseTimer setTitle:@"Pause Timer" forState:UIControlStateNormal]; 118 | self.timerL.text = @"-"; 119 | } else { 120 | self.btnPauseTimer.enabled = true; 121 | [scale startTimer]; 122 | [self.btnTimer setTitle:@"Stop Timer" forState:UIControlStateNormal]; 123 | } 124 | } 125 | 126 | - (IBAction)onBtnPauseTimer { 127 | AcaiaScale *scale = [AcaiaManager sharedManager].connectedScale; 128 | if (scale) { 129 | if (self.isTimerPaused) { 130 | self.isTimerPaused = false; 131 | [scale startTimer]; 132 | [self.btnPauseTimer setTitle:@"Pause Timer" forState:UIControlStateNormal]; 133 | } else { 134 | [scale pauseTimer]; 135 | self.isTimerPaused = true; 136 | [self.btnPauseTimer setTitle:@"Resume Timer" forState:UIControlStateNormal]; 137 | } 138 | } 139 | } 140 | 141 | - (IBAction)onBtnTare { 142 | AcaiaScale *scale = [AcaiaManager sharedManager].connectedScale; 143 | if (scale) { 144 | [scale tare]; 145 | } 146 | } 147 | 148 | - (IBAction)onBtnDisconnect { 149 | AcaiaScale *scale = [AcaiaManager sharedManager].connectedScale; 150 | if (scale) { 151 | [scale disconnect]; 152 | } 153 | } 154 | 155 | @end 156 | -------------------------------------------------------------------------------- /Example-objc/AcaiaScaleTableVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaScaleTableVC.m 3 | // AcaiaExample 4 | // 5 | // Created by Michael Wu on 2018/7/2. 6 | // Copyright © 2018 mikewu1211. All rights reserved. 7 | // 8 | 9 | #import "AcaiaScaleTableVC.h" 10 | #import "AppDelegate.h" 11 | @import AcaiaSDK; 12 | 13 | @interface AcaiaScaleTableVC () 14 | @property BOOL isRefreshed; 15 | @property NSTimer *timer; 16 | @property UIActivityIndicatorView* activityIndicatorView; 17 | @end 18 | 19 | @implementation AcaiaScaleTableVC 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | self.isRefreshed = NO; 25 | 26 | self.refreshControl = [[UIRefreshControl alloc] init]; 27 | [self.refreshControl addTarget:self 28 | action:@selector(refresh:) 29 | forControlEvents:UIControlEventValueChanged]; 30 | self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@"Scanning"]; 31 | self.tableView.refreshControl = self.refreshControl; 32 | 33 | self.activityIndicatorView = [[UIActivityIndicatorView alloc] 34 | initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleLarge]; 35 | self.activityIndicatorView.hidesWhenStopped = true; 36 | self.activityIndicatorView.hidden = true; 37 | [self.view addSubview:self.activityIndicatorView]; 38 | 39 | [[NSNotificationCenter defaultCenter] addObserver:self 40 | selector:@selector(onConnect:) 41 | name:AcaiaScaleDidConnected 42 | object:nil]; 43 | [[NSNotificationCenter defaultCenter] addObserver:self 44 | selector:@selector(onFinishScan:) 45 | name:AcaiaScaleDidFinishScan 46 | object:nil]; 47 | [[NSNotificationCenter defaultCenter] addObserver:self 48 | selector:@selector(scanListChanged:) 49 | name:AcaiaScaleDeviceListChanged 50 | object:nil]; 51 | } 52 | 53 | - (void)viewWillAppear:(BOOL)animated { 54 | self.activityIndicatorView.center = self.view.center; 55 | } 56 | 57 | - (void)viewDidAppear:(BOOL)animated { 58 | [super viewDidAppear:animated]; 59 | 60 | [[AcaiaManager sharedManager] startScan:0.5]; 61 | } 62 | 63 | - (void)viewWillDisappear:(BOOL)animated { 64 | [super viewWillDisappear:animated]; 65 | 66 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 67 | } 68 | 69 | - (void)refresh:(UIRefreshControl *)refreshCtrl { 70 | [[AcaiaManager sharedManager] startScan:0.5]; 71 | } 72 | 73 | #pragma mark - Acaia SDK Notification 74 | 75 | - (void)onFinishScan:(NSNotification *)noti { 76 | [self.tableView.refreshControl endRefreshing]; 77 | 78 | if ([AcaiaManager sharedManager].scaleList.count > 0) { 79 | [self.tableView reloadData]; 80 | } 81 | } 82 | 83 | - (void) scanListChanged:(NSNotification *)noti { 84 | [self.tableView.refreshControl endRefreshing]; 85 | [self.tableView reloadData]; 86 | } 87 | 88 | - (void)onConnect:(NSNotification *)noti { 89 | [self.activityIndicatorView stopAnimating]; 90 | [self.navigationController popViewControllerAnimated:YES]; 91 | if (self.timer != nil) { 92 | [self.timer invalidate]; 93 | self.timer = nil; 94 | } 95 | } 96 | 97 | - (void)onTimer:(NSTimer *)timer { 98 | [self.activityIndicatorView stopAnimating]; 99 | [self.timer invalidate]; 100 | self.timer = nil; 101 | 102 | [AcaiaManager.sharedManager startScan:0.1]; 103 | 104 | UIAlertController* alert = 105 | [UIAlertController alertControllerWithTitle:nil 106 | message:@"Connect timeout" 107 | preferredStyle:UIAlertControllerStyleAlert]; 108 | 109 | [alert addAction:[UIAlertAction actionWithTitle:@"Ok" 110 | style:UIAlertActionStyleCancel 111 | handler:nil]]; 112 | 113 | [self presentViewController:alert animated:true completion:nil]; 114 | } 115 | 116 | #pragma mark - Table view data source 117 | 118 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 119 | return 1; 120 | } 121 | 122 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 123 | return [AcaiaManager sharedManager].scaleList.count; 124 | } 125 | 126 | 127 | - (UITableViewCell *)tableView:(UITableView *)tableView 128 | cellForRowAtIndexPath:(NSIndexPath *)indexPath { 129 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ScaleCell" 130 | forIndexPath:indexPath]; 131 | 132 | AcaiaScale* scale = [AcaiaManager sharedManager].scaleList[indexPath.row]; 133 | 134 | cell.textLabel.text = scale.name; 135 | cell.detailTextLabel.text = scale.modelName; 136 | 137 | return cell; 138 | } 139 | 140 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 141 | self.timer = [NSTimer scheduledTimerWithTimeInterval:10.0f 142 | target:self 143 | selector:@selector(onTimer:) 144 | userInfo:nil 145 | repeats:NO]; 146 | AcaiaScale* scale = [AcaiaManager sharedManager].scaleList[indexPath.row]; 147 | [scale connect]; 148 | 149 | [self.activityIndicatorView startAnimating]; 150 | } 151 | 152 | @end 153 | -------------------------------------------------------------------------------- /Example-swift/AcaiaViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AcaiaViewController.swift 3 | // AcaiaSDKExampleSwift 4 | // 5 | // Created by Michael Wu on 2018/7/4. 6 | // Copyright © 2018 acaia Corp. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AcaiaSDK 11 | 12 | 13 | class AcaiaViewController: UIViewController { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | _selectModeButton.isHidden = true 19 | AcaiaManager.shared().enableBackgroundRecovery = true 20 | } 21 | 22 | override func viewWillAppear(_ animated: Bool) { 23 | super.viewWillAppear(animated) 24 | 25 | _addAcaiaEventsObserver() 26 | _updateScaleStatusUI() 27 | } 28 | 29 | override func viewDidAppear(_ animated: Bool) { 30 | super.viewDidAppear(animated) 31 | 32 | _updateScaleStatusUI() 33 | } 34 | 35 | override func viewWillDisappear(_ animated: Bool) { 36 | super.viewWillDisappear(animated) 37 | 38 | _removeAcaiaEventsObserver() 39 | } 40 | 41 | 42 | // MARK: Private 43 | 44 | private var _isTimerStarted: Bool = false 45 | private var _isTimerPaused: Bool = false 46 | 47 | @IBOutlet private weak var _scanScaleButton: UIButton! 48 | @IBOutlet private weak var _selectModeButton: UIButton! 49 | 50 | @IBOutlet private weak var _scaleNameLabel: UILabel! 51 | @IBOutlet private weak var _weightLabel: UILabel! 52 | @IBOutlet private weak var _timerLabel: UILabel! 53 | 54 | @IBOutlet private weak var _toolView: UIView! 55 | @IBOutlet private weak var _timerButton: UIButton! 56 | @IBOutlet private weak var _pauseTimerButton: UIButton! 57 | @IBOutlet private weak var _disconnectButton: UIButton! 58 | @IBOutlet private weak var _tareButton: UIButton! 59 | 60 | private func _updateScaleStatusUI() { 61 | if let scale = AcaiaManager.shared().connectedScale { 62 | _scaleNameLabel.text = scale.name; 63 | _toolView.isHidden = false; 64 | } else { 65 | _toolView.isHidden = true; 66 | _scaleNameLabel.text = "-"; 67 | _timerLabel.text = "-"; 68 | _weightLabel.text = "-"; 69 | } 70 | } 71 | } 72 | 73 | 74 | // MARK: Observe acaia events 75 | extension AcaiaViewController { 76 | 77 | private func _addAcaiaEventsObserver() { 78 | NotificationCenter.default.addObserver(self, 79 | selector: #selector(_onConnect(noti:)), 80 | name: .init(rawValue: AcaiaScaleDidConnected), 81 | object: nil) 82 | NotificationCenter.default.addObserver(self, 83 | selector: #selector(_onDisconnect(noti:)), 84 | name: .init(rawValue: AcaiaScaleDidDisconnected), 85 | object: nil) 86 | 87 | NotificationCenter.default.addObserver(self, 88 | selector: #selector(_onWeight(noti:)), 89 | name: .init(rawValue: AcaiaScaleWeight), 90 | object: nil) 91 | NotificationCenter.default.addObserver(self, 92 | selector: #selector(_onTimer(noti:)), 93 | name: .init(rawValue: AcaiaScaleTimer), 94 | object: nil) 95 | } 96 | 97 | private func _removeAcaiaEventsObserver() { 98 | NotificationCenter.default.removeObserver(self) 99 | } 100 | } 101 | 102 | 103 | // MARK: Acaia events 104 | extension AcaiaViewController { 105 | 106 | @objc private func _onConnect(noti: NSNotification) { 107 | _updateScaleStatusUI() 108 | } 109 | @objc private func _onFailed(noti: NSNotification) { 110 | _updateScaleStatusUI() 111 | } 112 | 113 | @objc private func _onDisconnect(noti: NSNotification) { 114 | _updateScaleStatusUI() 115 | } 116 | 117 | @objc private func _onWeight(noti: NSNotification) { 118 | let unit = noti.userInfo![AcaiaScaleUserInfoKeyUnit]! as! NSNumber 119 | let weight = noti.userInfo![AcaiaScaleUserInfoKeyWeight]! as! Float 120 | 121 | if unit.intValue == AcaiaScaleWeightUnit.gram.rawValue { 122 | _weightLabel.text = String(format: "%.1f g", weight) 123 | } else { 124 | _weightLabel.text = String(format: "%.4f oz", weight) 125 | } 126 | } 127 | 128 | @objc private func _onTimer(noti: NSNotification) { 129 | guard let time = noti.userInfo?[AcaiaScaleUserInfoKeyTimer] as? Int else { return } 130 | _timerLabel.text = String(format: "%02d:%02d", time/60, time%60) 131 | _isTimerStarted = true; 132 | } 133 | } 134 | 135 | 136 | // MARK: IBActions 137 | extension AcaiaViewController { 138 | 139 | @IBAction private func _onBtnTimer() { 140 | if let scale = AcaiaManager.shared().connectedScale { 141 | if _isTimerStarted { 142 | _isTimerStarted = false; 143 | _isTimerPaused = false; 144 | scale.stopTimer() 145 | _pauseTimerButton.isEnabled = false; 146 | _timerButton.setTitle("Start Timer", for: UIControl.State.normal) 147 | _pauseTimerButton.setTitle("Pause Timer", for: UIControl.State.normal) 148 | _timerLabel.text = "-"; 149 | } else { 150 | _pauseTimerButton.isEnabled = true; 151 | scale.startTimer() 152 | _timerButton.setTitle("Stop Timer", for: UIControl.State.normal) 153 | } 154 | } 155 | } 156 | 157 | @IBAction private func _onBtnPauseTimer() { 158 | if let scale = AcaiaManager.shared().connectedScale { 159 | if _isTimerPaused { 160 | _isTimerPaused = false 161 | scale.startTimer() 162 | _pauseTimerButton.setTitle("Pause Timer", for: UIControl.State.normal) 163 | } else { 164 | _isTimerPaused = true 165 | scale.pauseTimer() 166 | _pauseTimerButton.setTitle("Resume Timer", for: UIControl.State.normal) 167 | } 168 | } 169 | } 170 | 171 | @IBAction private func _onBtnTare() { 172 | AcaiaManager.shared().connectedScale?.tare() 173 | } 174 | 175 | @IBAction private func _onBtnDisconnect() { 176 | AcaiaManager.shared().connectedScale?.disconnect() 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /AcaiaExamples.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8E6E18712339D041005633C5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6E18672339D041005633C5 /* AppDelegate.swift */; }; 11 | 8E6E18722339D041005633C5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E6E18692339D041005633C5 /* LaunchScreen.storyboard */; }; 12 | 8E6E18732339D041005633C5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E6E186B2339D041005633C5 /* Main.storyboard */; }; 13 | 8E6E18742339D041005633C5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E6E186D2339D041005633C5 /* Assets.xcassets */; }; 14 | 8E6E18762339D041005633C5 /* AcaiaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6E186F2339D041005633C5 /* AcaiaViewController.swift */; }; 15 | 8E6E18772339D041005633C5 /* AcaiaScaleTableVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6E18702339D041005633C5 /* AcaiaScaleTableVC.swift */; }; 16 | 8E92FF9B2339CA3900BC995C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E92FF8F2339CA3900BC995C /* Assets.xcassets */; }; 17 | 8E92FF9C2339CA3900BC995C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E92FF912339CA3900BC995C /* LaunchScreen.storyboard */; }; 18 | 8E92FF9D2339CA3900BC995C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E92FF932339CA3900BC995C /* Main.storyboard */; }; 19 | 8E92FF9E2339CA3900BC995C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E92FF962339CA3900BC995C /* main.m */; }; 20 | 8E92FF9F2339CA3900BC995C /* AcaiaScaleTableVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E92FF972339CA3900BC995C /* AcaiaScaleTableVC.m */; }; 21 | 8E92FFA02339CA3900BC995C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E92FF982339CA3900BC995C /* AppDelegate.m */; }; 22 | 8E92FFA12339CA3900BC995C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E92FF992339CA3900BC995C /* ViewController.m */; }; 23 | 997899862828E9C600352E8B /* AcaiaSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 997899852828E9C600352E8B /* AcaiaSDK.xcframework */; }; 24 | 997899872828E9C600352E8B /* AcaiaSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 997899852828E9C600352E8B /* AcaiaSDK.xcframework */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXCopyFilesBuildPhase section */ 28 | 8EB045C3233A07D800EE3946 /* Embed Frameworks */ = { 29 | isa = PBXCopyFilesBuildPhase; 30 | buildActionMask = 2147483647; 31 | dstPath = ""; 32 | dstSubfolderSpec = 10; 33 | files = ( 34 | ); 35 | name = "Embed Frameworks"; 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 8E6E18672339D041005633C5 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 42 | 8E6E186A2339D041005633C5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = LaunchScreen.storyboard; sourceTree = ""; }; 43 | 8E6E186C2339D041005633C5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Main.storyboard; sourceTree = ""; }; 44 | 8E6E186D2339D041005633C5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | 8E6E186E2339D041005633C5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 8E6E186F2339D041005633C5 /* AcaiaViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcaiaViewController.swift; sourceTree = ""; }; 47 | 8E6E18702339D041005633C5 /* AcaiaScaleTableVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcaiaScaleTableVC.swift; sourceTree = ""; }; 48 | 8E7925292344839A00578CBE /* Example-swift test source-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-swift test source-Bridging-Header.h"; sourceTree = ""; }; 49 | 8E92FF7A2339CA0400BC995C /* Example-swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 8E92FF8C2339CA3900BC995C /* AcaiaScaleTableVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AcaiaScaleTableVC.h; sourceTree = ""; }; 51 | 8E92FF8D2339CA3900BC995C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 8E92FF8E2339CA3900BC995C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 53 | 8E92FF8F2339CA3900BC995C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 8E92FF922339CA3900BC995C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = LaunchScreen.storyboard; sourceTree = ""; }; 55 | 8E92FF942339CA3900BC995C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Main.storyboard; sourceTree = ""; }; 56 | 8E92FF952339CA3900BC995C /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 57 | 8E92FF962339CA3900BC995C /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 58 | 8E92FF972339CA3900BC995C /* AcaiaScaleTableVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AcaiaScaleTableVC.m; sourceTree = ""; }; 59 | 8E92FF982339CA3900BC995C /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 60 | 8E92FF992339CA3900BC995C /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 61 | 8EDCD15E2339C9190029329D /* Example-objc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-objc.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 997899852828E9C600352E8B /* AcaiaSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = AcaiaSDK.xcframework; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 8E92FF772339CA0400BC995C /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 997899872828E9C600352E8B /* AcaiaSDK.xcframework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 8EDCD15B2339C9190029329D /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | 997899862828E9C600352E8B /* AcaiaSDK.xcframework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | 8E5FD34C2339F37900191991 /* Frameworks */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 997899852828E9C600352E8B /* AcaiaSDK.xcframework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 8E6E18682339D041005633C5 /* Base.lproj */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 8E6E18692339D041005633C5 /* LaunchScreen.storyboard */, 97 | 8E6E186B2339D041005633C5 /* Main.storyboard */, 98 | ); 99 | path = Base.lproj; 100 | sourceTree = ""; 101 | }; 102 | 8E92FF552339C9EA00BC995C /* Example-objc */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 8E92FF8D2339CA3900BC995C /* Info.plist */, 106 | 8E92FF962339CA3900BC995C /* main.m */, 107 | 8E92FF8C2339CA3900BC995C /* AcaiaScaleTableVC.h */, 108 | 8E92FF972339CA3900BC995C /* AcaiaScaleTableVC.m */, 109 | 8E92FF8E2339CA3900BC995C /* AppDelegate.h */, 110 | 8E92FF982339CA3900BC995C /* AppDelegate.m */, 111 | 8E92FF952339CA3900BC995C /* ViewController.h */, 112 | 8E92FF992339CA3900BC995C /* ViewController.m */, 113 | 8E92FF8F2339CA3900BC995C /* Assets.xcassets */, 114 | 8E92FF902339CA3900BC995C /* Base.lproj */, 115 | ); 116 | path = "Example-objc"; 117 | sourceTree = ""; 118 | }; 119 | 8E92FF7B2339CA0400BC995C /* Example-swift */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 8E6E186E2339D041005633C5 /* Info.plist */, 123 | 8E7925292344839A00578CBE /* Example-swift test source-Bridging-Header.h */, 124 | 8E6E18702339D041005633C5 /* AcaiaScaleTableVC.swift */, 125 | 8E6E186F2339D041005633C5 /* AcaiaViewController.swift */, 126 | 8E6E18672339D041005633C5 /* AppDelegate.swift */, 127 | 8E6E186D2339D041005633C5 /* Assets.xcassets */, 128 | 8E6E18682339D041005633C5 /* Base.lproj */, 129 | ); 130 | path = "Example-swift"; 131 | sourceTree = ""; 132 | }; 133 | 8E92FF902339CA3900BC995C /* Base.lproj */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 8E92FF912339CA3900BC995C /* LaunchScreen.storyboard */, 137 | 8E92FF932339CA3900BC995C /* Main.storyboard */, 138 | ); 139 | path = Base.lproj; 140 | sourceTree = ""; 141 | }; 142 | 8EDCD1552339C9190029329D = { 143 | isa = PBXGroup; 144 | children = ( 145 | 8E92FF552339C9EA00BC995C /* Example-objc */, 146 | 8E92FF7B2339CA0400BC995C /* Example-swift */, 147 | 8E5FD34C2339F37900191991 /* Frameworks */, 148 | 8EDCD15F2339C9190029329D /* Products */, 149 | ); 150 | sourceTree = ""; 151 | }; 152 | 8EDCD15F2339C9190029329D /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 8EDCD15E2339C9190029329D /* Example-objc.app */, 156 | 8E92FF7A2339CA0400BC995C /* Example-swift.app */, 157 | ); 158 | name = Products; 159 | sourceTree = ""; 160 | }; 161 | /* End PBXGroup section */ 162 | 163 | /* Begin PBXNativeTarget section */ 164 | 8E92FF792339CA0400BC995C /* Example-swift */ = { 165 | isa = PBXNativeTarget; 166 | buildConfigurationList = 8E92FF892339CA0500BC995C /* Build configuration list for PBXNativeTarget "Example-swift" */; 167 | buildPhases = ( 168 | 8E92FF762339CA0400BC995C /* Sources */, 169 | 8E92FF772339CA0400BC995C /* Frameworks */, 170 | 8E92FF782339CA0400BC995C /* Resources */, 171 | 8EB045C3233A07D800EE3946 /* Embed Frameworks */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | ); 177 | name = "Example-swift"; 178 | packageProductDependencies = ( 179 | ); 180 | productName = "Example-swift"; 181 | productReference = 8E92FF7A2339CA0400BC995C /* Example-swift.app */; 182 | productType = "com.apple.product-type.application"; 183 | }; 184 | 8EDCD15D2339C9190029329D /* Example-objc */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 8EDCD1702339C91B0029329D /* Build configuration list for PBXNativeTarget "Example-objc" */; 187 | buildPhases = ( 188 | 8EDCD15A2339C9190029329D /* Sources */, 189 | 8EDCD15B2339C9190029329D /* Frameworks */, 190 | 8EDCD15C2339C9190029329D /* Resources */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | ); 196 | name = "Example-objc"; 197 | packageProductDependencies = ( 198 | ); 199 | productName = AcaiaSample; 200 | productReference = 8EDCD15E2339C9190029329D /* Example-objc.app */; 201 | productType = "com.apple.product-type.application"; 202 | }; 203 | /* End PBXNativeTarget section */ 204 | 205 | /* Begin PBXProject section */ 206 | 8EDCD1562339C9190029329D /* Project object */ = { 207 | isa = PBXProject; 208 | attributes = { 209 | LastSwiftUpdateCheck = 1030; 210 | LastUpgradeCheck = 1310; 211 | ORGANIZATIONNAME = "Acaia Corp"; 212 | TargetAttributes = { 213 | 8E92FF792339CA0400BC995C = { 214 | CreatedOnToolsVersion = 10.3; 215 | LastSwiftMigration = 1030; 216 | }; 217 | 8EDCD15D2339C9190029329D = { 218 | CreatedOnToolsVersion = 10.3; 219 | }; 220 | }; 221 | }; 222 | buildConfigurationList = 8EDCD1592339C9190029329D /* Build configuration list for PBXProject "AcaiaExamples" */; 223 | compatibilityVersion = "Xcode 9.3"; 224 | developmentRegion = en; 225 | hasScannedForEncodings = 0; 226 | knownRegions = ( 227 | en, 228 | Base, 229 | ); 230 | mainGroup = 8EDCD1552339C9190029329D; 231 | packageReferences = ( 232 | ); 233 | productRefGroup = 8EDCD15F2339C9190029329D /* Products */; 234 | projectDirPath = ""; 235 | projectRoot = ""; 236 | targets = ( 237 | 8EDCD15D2339C9190029329D /* Example-objc */, 238 | 8E92FF792339CA0400BC995C /* Example-swift */, 239 | ); 240 | }; 241 | /* End PBXProject section */ 242 | 243 | /* Begin PBXResourcesBuildPhase section */ 244 | 8E92FF782339CA0400BC995C /* Resources */ = { 245 | isa = PBXResourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | 8E6E18722339D041005633C5 /* LaunchScreen.storyboard in Resources */, 249 | 8E6E18742339D041005633C5 /* Assets.xcassets in Resources */, 250 | 8E6E18732339D041005633C5 /* Main.storyboard in Resources */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | 8EDCD15C2339C9190029329D /* Resources */ = { 255 | isa = PBXResourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | 8E92FF9C2339CA3900BC995C /* LaunchScreen.storyboard in Resources */, 259 | 8E92FF9B2339CA3900BC995C /* Assets.xcassets in Resources */, 260 | 8E92FF9D2339CA3900BC995C /* Main.storyboard in Resources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXResourcesBuildPhase section */ 265 | 266 | /* Begin PBXSourcesBuildPhase section */ 267 | 8E92FF762339CA0400BC995C /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 8E6E18772339D041005633C5 /* AcaiaScaleTableVC.swift in Sources */, 272 | 8E6E18762339D041005633C5 /* AcaiaViewController.swift in Sources */, 273 | 8E6E18712339D041005633C5 /* AppDelegate.swift in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | 8EDCD15A2339C9190029329D /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 8E92FF9F2339CA3900BC995C /* AcaiaScaleTableVC.m in Sources */, 282 | 8E92FF9E2339CA3900BC995C /* main.m in Sources */, 283 | 8E92FFA12339CA3900BC995C /* ViewController.m in Sources */, 284 | 8E92FFA02339CA3900BC995C /* AppDelegate.m in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXSourcesBuildPhase section */ 289 | 290 | /* Begin PBXVariantGroup section */ 291 | 8E6E18692339D041005633C5 /* LaunchScreen.storyboard */ = { 292 | isa = PBXVariantGroup; 293 | children = ( 294 | 8E6E186A2339D041005633C5 /* Base */, 295 | ); 296 | name = LaunchScreen.storyboard; 297 | sourceTree = ""; 298 | }; 299 | 8E6E186B2339D041005633C5 /* Main.storyboard */ = { 300 | isa = PBXVariantGroup; 301 | children = ( 302 | 8E6E186C2339D041005633C5 /* Base */, 303 | ); 304 | name = Main.storyboard; 305 | sourceTree = ""; 306 | }; 307 | 8E92FF912339CA3900BC995C /* LaunchScreen.storyboard */ = { 308 | isa = PBXVariantGroup; 309 | children = ( 310 | 8E92FF922339CA3900BC995C /* Base */, 311 | ); 312 | name = LaunchScreen.storyboard; 313 | sourceTree = ""; 314 | }; 315 | 8E92FF932339CA3900BC995C /* Main.storyboard */ = { 316 | isa = PBXVariantGroup; 317 | children = ( 318 | 8E92FF942339CA3900BC995C /* Base */, 319 | ); 320 | name = Main.storyboard; 321 | sourceTree = ""; 322 | }; 323 | /* End PBXVariantGroup section */ 324 | 325 | /* Begin XCBuildConfiguration section */ 326 | 8E92FF8A2339CA0500BC995C /* Debug */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 330 | CLANG_ENABLE_MODULES = YES; 331 | CODE_SIGN_STYLE = Automatic; 332 | DEVELOPMENT_TEAM = QZF5XM7L73; 333 | FRAMEWORK_SEARCH_PATHS = ( 334 | "$(inherited)", 335 | "$(PROJECT_DIR)", 336 | ); 337 | INFOPLIST_FILE = "${PROJECT_DIR}/Example-swift/Info.plist"; 338 | LD_RUNPATH_SEARCH_PATHS = ( 339 | "$(inherited)", 340 | "@executable_path/Frameworks", 341 | ); 342 | PRODUCT_BUNDLE_IDENTIFIER = "co.acaia.AcaiaSamples-swift"; 343 | PRODUCT_NAME = "$(TARGET_NAME)"; 344 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 345 | SWIFT_VERSION = 5.0; 346 | TARGETED_DEVICE_FAMILY = "1,2"; 347 | }; 348 | name = Debug; 349 | }; 350 | 8E92FF8B2339CA0500BC995C /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 354 | CLANG_ENABLE_MODULES = YES; 355 | CODE_SIGN_STYLE = Automatic; 356 | DEVELOPMENT_TEAM = QZF5XM7L73; 357 | FRAMEWORK_SEARCH_PATHS = ( 358 | "$(inherited)", 359 | "$(PROJECT_DIR)", 360 | ); 361 | INFOPLIST_FILE = "${PROJECT_DIR}/Example-swift/Info.plist"; 362 | LD_RUNPATH_SEARCH_PATHS = ( 363 | "$(inherited)", 364 | "@executable_path/Frameworks", 365 | ); 366 | PRODUCT_BUNDLE_IDENTIFIER = "co.acaia.AcaiaSamples-swift"; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | SWIFT_VERSION = 5.0; 369 | TARGETED_DEVICE_FAMILY = "1,2"; 370 | }; 371 | name = Release; 372 | }; 373 | 8EDCD16E2339C91B0029329D /* Debug */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ALWAYS_SEARCH_USER_PATHS = NO; 377 | CLANG_ANALYZER_NONNULL = YES; 378 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 379 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 380 | CLANG_CXX_LIBRARY = "libc++"; 381 | CLANG_ENABLE_MODULES = YES; 382 | CLANG_ENABLE_OBJC_ARC = YES; 383 | CLANG_ENABLE_OBJC_WEAK = YES; 384 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 385 | CLANG_WARN_BOOL_CONVERSION = YES; 386 | CLANG_WARN_COMMA = YES; 387 | CLANG_WARN_CONSTANT_CONVERSION = YES; 388 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 389 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 390 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 400 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 401 | CLANG_WARN_STRICT_PROTOTYPES = YES; 402 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 403 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 404 | CLANG_WARN_UNREACHABLE_CODE = YES; 405 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 406 | CODE_SIGN_IDENTITY = "iPhone Developer"; 407 | COPY_PHASE_STRIP = NO; 408 | DEBUG_INFORMATION_FORMAT = dwarf; 409 | ENABLE_STRICT_OBJC_MSGSEND = YES; 410 | ENABLE_TESTABILITY = YES; 411 | FRAMEWORK_SEARCH_PATHS = "\"$(PROJECT_DIR)/\""; 412 | GCC_C_LANGUAGE_STANDARD = gnu11; 413 | GCC_DYNAMIC_NO_PIC = NO; 414 | GCC_NO_COMMON_BLOCKS = YES; 415 | GCC_OPTIMIZATION_LEVEL = 0; 416 | GCC_PREPROCESSOR_DEFINITIONS = ( 417 | "DEBUG=1", 418 | "$(inherited)", 419 | ); 420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 422 | GCC_WARN_UNDECLARED_SELECTOR = YES; 423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 424 | GCC_WARN_UNUSED_FUNCTION = YES; 425 | GCC_WARN_UNUSED_VARIABLE = YES; 426 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 427 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 428 | MTL_FAST_MATH = YES; 429 | ONLY_ACTIVE_ARCH = YES; 430 | SDKROOT = iphoneos; 431 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 432 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 433 | }; 434 | name = Debug; 435 | }; 436 | 8EDCD16F2339C91B0029329D /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | ALWAYS_SEARCH_USER_PATHS = NO; 440 | CLANG_ANALYZER_NONNULL = YES; 441 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 443 | CLANG_CXX_LIBRARY = "libc++"; 444 | CLANG_ENABLE_MODULES = YES; 445 | CLANG_ENABLE_OBJC_ARC = YES; 446 | CLANG_ENABLE_OBJC_WEAK = YES; 447 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 448 | CLANG_WARN_BOOL_CONVERSION = YES; 449 | CLANG_WARN_COMMA = YES; 450 | CLANG_WARN_CONSTANT_CONVERSION = YES; 451 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 452 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 453 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 454 | CLANG_WARN_EMPTY_BODY = YES; 455 | CLANG_WARN_ENUM_CONVERSION = YES; 456 | CLANG_WARN_INFINITE_RECURSION = YES; 457 | CLANG_WARN_INT_CONVERSION = YES; 458 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 459 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 460 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 461 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 462 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 463 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 464 | CLANG_WARN_STRICT_PROTOTYPES = YES; 465 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 466 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 467 | CLANG_WARN_UNREACHABLE_CODE = YES; 468 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 469 | CODE_SIGN_IDENTITY = "iPhone Developer"; 470 | COPY_PHASE_STRIP = NO; 471 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 472 | ENABLE_NS_ASSERTIONS = NO; 473 | ENABLE_STRICT_OBJC_MSGSEND = YES; 474 | FRAMEWORK_SEARCH_PATHS = "\"$(PROJECT_DIR)/\""; 475 | GCC_C_LANGUAGE_STANDARD = gnu11; 476 | GCC_NO_COMMON_BLOCKS = YES; 477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 479 | GCC_WARN_UNDECLARED_SELECTOR = YES; 480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 481 | GCC_WARN_UNUSED_FUNCTION = YES; 482 | GCC_WARN_UNUSED_VARIABLE = YES; 483 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 484 | MTL_ENABLE_DEBUG_INFO = NO; 485 | MTL_FAST_MATH = YES; 486 | SDKROOT = iphoneos; 487 | SWIFT_COMPILATION_MODE = wholemodule; 488 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 489 | VALIDATE_PRODUCT = YES; 490 | }; 491 | name = Release; 492 | }; 493 | 8EDCD1712339C91B0029329D /* Debug */ = { 494 | isa = XCBuildConfiguration; 495 | buildSettings = { 496 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 497 | CODE_SIGN_STYLE = Automatic; 498 | DEVELOPMENT_TEAM = QZF5XM7L73; 499 | FRAMEWORK_SEARCH_PATHS = ( 500 | "$(inherited)", 501 | "$(PROJECT_DIR)", 502 | ); 503 | INFOPLIST_FILE = "${PROJECT_DIR}/Example-objc/info.plist"; 504 | LD_RUNPATH_SEARCH_PATHS = ( 505 | "$(inherited)", 506 | "@executable_path/Frameworks", 507 | ); 508 | PRODUCT_BUNDLE_IDENTIFIER = "co.acaia.AcaiaSamples-objc"; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | SWIFT_VERSION = 5.0; 511 | TARGETED_DEVICE_FAMILY = "1,2"; 512 | }; 513 | name = Debug; 514 | }; 515 | 8EDCD1722339C91B0029329D /* Release */ = { 516 | isa = XCBuildConfiguration; 517 | buildSettings = { 518 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 519 | CODE_SIGN_STYLE = Automatic; 520 | DEVELOPMENT_TEAM = QZF5XM7L73; 521 | FRAMEWORK_SEARCH_PATHS = ( 522 | "$(inherited)", 523 | "$(PROJECT_DIR)", 524 | ); 525 | INFOPLIST_FILE = "${PROJECT_DIR}/Example-objc/info.plist"; 526 | LD_RUNPATH_SEARCH_PATHS = ( 527 | "$(inherited)", 528 | "@executable_path/Frameworks", 529 | ); 530 | PRODUCT_BUNDLE_IDENTIFIER = "co.acaia.AcaiaSamples-objc"; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | SWIFT_VERSION = 5.0; 533 | TARGETED_DEVICE_FAMILY = "1,2"; 534 | }; 535 | name = Release; 536 | }; 537 | /* End XCBuildConfiguration section */ 538 | 539 | /* Begin XCConfigurationList section */ 540 | 8E92FF892339CA0500BC995C /* Build configuration list for PBXNativeTarget "Example-swift" */ = { 541 | isa = XCConfigurationList; 542 | buildConfigurations = ( 543 | 8E92FF8A2339CA0500BC995C /* Debug */, 544 | 8E92FF8B2339CA0500BC995C /* Release */, 545 | ); 546 | defaultConfigurationIsVisible = 0; 547 | defaultConfigurationName = Release; 548 | }; 549 | 8EDCD1592339C9190029329D /* Build configuration list for PBXProject "AcaiaExamples" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | 8EDCD16E2339C91B0029329D /* Debug */, 553 | 8EDCD16F2339C91B0029329D /* Release */, 554 | ); 555 | defaultConfigurationIsVisible = 0; 556 | defaultConfigurationName = Release; 557 | }; 558 | 8EDCD1702339C91B0029329D /* Build configuration list for PBXNativeTarget "Example-objc" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | 8EDCD1712339C91B0029329D /* Debug */, 562 | 8EDCD1722339C91B0029329D /* Release */, 563 | ); 564 | defaultConfigurationIsVisible = 0; 565 | defaultConfigurationName = Release; 566 | }; 567 | /* End XCConfigurationList section */ 568 | }; 569 | rootObject = 8EDCD1562339C9190029329D /* Project object */; 570 | } 571 | -------------------------------------------------------------------------------- /Example-swift/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 32 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 51 | 57 | 63 | 69 | 75 | 81 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 224 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | -------------------------------------------------------------------------------- /Example-objc/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 32 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 60 | 66 | 72 | 78 | 84 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 227 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | --------------------------------------------------------------------------------