├── .github └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .swiftformat ├── .swiftlint.yml ├── .travis.yml ├── AmazonFreeRTOS.podspec ├── AmazonFreeRTOS.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── AmazonFreeRTOS.xcscheme ├── AmazonFreeRTOS.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── AmazonFreeRTOS ├── AmazonFreeRTOS.h ├── AmazonFreeRTOSConstants.swift ├── AmazonFreeRTOSDevice.swift ├── AmazonFreeRTOSEnums.swift ├── AmazonFreeRTOSManager.swift ├── Extensions │ ├── CBPeripheral+AmazonFreeRTOS.swift │ ├── CBService+AmazonFreeRTOS.swift │ └── NSNotification.Name+AmazonFreeRTOS.swift ├── Info.plist └── Services │ ├── MqttProxy │ ├── Connack.swift │ ├── Connect.swift │ ├── Disconnect.swift │ ├── MqttMessage.swift │ ├── Pingreq.swift │ ├── Pingresp.swift │ ├── Puback.swift │ ├── Publish.swift │ ├── Suback.swift │ ├── Subscribe.swift │ ├── Unsuback.swift │ └── Unsubscribe.swift │ └── NetworkConfig │ ├── DeleteNetworkReq.swift │ ├── DeleteNetworkResp.swift │ ├── EditNetworkReq.swift │ ├── EditNetworkResp.swift │ ├── ListNetworkReq.swift │ ├── ListNetworkResp.swift │ ├── NetworkMessage.swift │ ├── SaveNetworkReq.swift │ └── SaveNetworkResp.swift ├── AmazonFreeRTOSTests ├── AmazonFreeRTOSTests.swift └── Info.plist ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DEPRECATED.txt ├── Example └── AmazonFreeRTOSDemo │ ├── .swift-version │ ├── .swiftformat │ ├── .swiftlint.yml │ ├── AmazonFreeRTOSDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ ├── AmazonFreeRTOSDemo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── xcschemes │ │ └── AmazonFreeRTOSDemo.xcscheme │ ├── AmazonFreeRTOSDemo │ ├── Amazon │ │ ├── AmazonConstants.swift │ │ ├── AmazonContext.swift │ │ └── AmazonTextField.swift │ ├── AppDelegate.swift │ ├── Cells │ │ ├── DeviceCell.swift │ │ ├── NetworkCell.swift │ │ └── SectionHeaderCell.swift │ ├── DebugViewController.swift │ ├── DevicesViewController.swift │ ├── Examples │ │ ├── CustomGattMqttViewController.swift │ │ ├── MqttProxyViewController.swift │ │ ├── NetworkConfigAddViewController.swift │ │ └── NetworkConfigViewController.swift │ ├── Extensions │ │ ├── UITableView+Amazon.swift │ │ ├── UITextView+Amazon.swift │ │ └── UIViewController+Amazon.swift │ ├── Support │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon-1024.png │ │ │ │ ├── AppIcon-120.png │ │ │ │ ├── AppIcon-152.png │ │ │ │ ├── AppIcon-167.png │ │ │ │ ├── AppIcon-180.png │ │ │ │ ├── AppIcon-20.png │ │ │ │ ├── AppIcon-29.png │ │ │ │ ├── AppIcon-40.png │ │ │ │ ├── AppIcon-58.png │ │ │ │ ├── AppIcon-60.png │ │ │ │ ├── AppIcon-76.png │ │ │ │ ├── AppIcon-80.png │ │ │ │ ├── AppIcon-87.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── common_logo.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── common_logo.pdf │ │ │ ├── nav_back.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── nav_back.pdf │ │ │ └── nav_close.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── nav_close.pdf │ │ ├── Colors.xcassets │ │ │ ├── Contents.json │ │ │ ├── alabaster_color.colorset │ │ │ │ └── Contents.json │ │ │ ├── dark_teal_color.colorset │ │ │ │ └── Contents.json │ │ │ ├── orange_color.colorset │ │ │ │ └── Contents.json │ │ │ ├── seafoam_green_color.colorset │ │ │ │ └── Contents.json │ │ │ ├── teal_color.colorset │ │ │ │ └── Contents.json │ │ │ └── teal_dark_color.colorset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── Settings.bundle │ │ │ ├── Root.plist │ │ │ ├── com.amazonaws.AmazonFreeRTOSDemo.latest_result.txt │ │ │ ├── com.amazonaws.AmazonFreeRTOSDemo.plist │ │ │ ├── com.amazonaws.AmazonFreeRTOSDemo │ │ │ │ ├── AWSAuthCore.plist │ │ │ │ ├── AWSAuthUI.plist │ │ │ │ ├── AWSCognitoIdentityProvider.plist │ │ │ │ ├── AWSCognitoIdentityProviderASF.plist │ │ │ │ ├── AWSCore.plist │ │ │ │ ├── AWSIoT.plist │ │ │ │ ├── AWSMobileClient.plist │ │ │ │ ├── AWSUserPoolsSignIn.plist │ │ │ │ ├── Alertift.plist │ │ │ │ ├── AmazonFreeRTOS.plist │ │ │ │ ├── LicensePlist.plist │ │ │ │ ├── SwiftFormat.plist │ │ │ │ └── SwiftLint.plist │ │ │ └── en.lproj │ │ │ │ └── Root.strings │ │ └── awsconfiguration.json │ └── UI │ │ └── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Podfile │ ├── README.md │ └── Scripts │ ├── license-plist.sh │ ├── swift-format.sh │ ├── swift-lint-analyze.sh │ ├── swift-lint.sh │ └── xunique.sh ├── LICENSE ├── NOTICE ├── Podfile ├── README.md └── docs ├── Classes.html ├── Classes ├── AmazonFreeRTOSDevice.html └── AmazonFreeRTOSManager.html ├── Enums.html ├── Enums ├── CborKey.html ├── MqttMessageType.html ├── NetworkMessageType.html ├── NetworkOpStatus.html └── NetworkSecurityType.html ├── Extensions.html ├── Extensions ├── CBPeripheral.html ├── CBService.html ├── NSNotification.html └── NSNotification │ └── Name.html ├── Structs.html ├── Structs ├── Connack.html ├── Connect.html ├── DeleteNetworkReq.html ├── DeleteNetworkResp.html ├── EditNetworkReq.html ├── EditNetworkResp.html ├── ListNetworkReq.html ├── ListNetworkResp.html ├── MqttMessage.html ├── NetworkMessage.html ├── Puback.html ├── Publish.html ├── SaveNetworkReq.html ├── SaveNetworkResp.html ├── Suback.html ├── Subscribe.html ├── Unsuback.html └── Unsubscribe.html ├── badge.svg ├── css ├── highlight.css └── jazzy.css ├── docsets ├── AmazonFreeRTOS.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AmazonFreeRTOSDevice.html │ │ │ └── AmazonFreeRTOSManager.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── CborKey.html │ │ │ ├── MqttMessageType.html │ │ │ ├── NetworkMessageType.html │ │ │ ├── NetworkOpStatus.html │ │ │ └── NetworkSecurityType.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ ├── CBPeripheral.html │ │ │ ├── CBService.html │ │ │ ├── NSNotification.html │ │ │ └── NSNotification │ │ │ │ └── Name.html │ │ ├── Structs.html │ │ ├── Structs │ │ │ ├── Connack.html │ │ │ ├── Connect.html │ │ │ ├── DeleteNetworkReq.html │ │ │ ├── DeleteNetworkResp.html │ │ │ ├── EditNetworkReq.html │ │ │ ├── EditNetworkResp.html │ │ │ ├── ListNetworkReq.html │ │ │ ├── ListNetworkResp.html │ │ │ ├── MqttMessage.html │ │ │ ├── NetworkMessage.html │ │ │ ├── Puback.html │ │ │ ├── Publish.html │ │ │ ├── SaveNetworkReq.html │ │ │ ├── SaveNetworkResp.html │ │ │ ├── Suback.html │ │ │ ├── Subscribe.html │ │ │ ├── Unsuback.html │ │ │ └── Unsubscribe.html │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ └── search.json │ │ └── docSet.dsidx └── AmazonFreeRTOS.tgz ├── img ├── carat.png ├── dash.png └── gh.png ├── index.html ├── js ├── jazzy.js └── jquery.min.js ├── search.json └── undocumented.json /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *Issue #, if available:* 2 | 3 | *Description of changes:* 4 | 5 | 6 | By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Config 2 | xcuserdata 3 | .DS_Store 4 | build 5 | *.ipa 6 | Pods 7 | Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/awsconfiguration.json 8 | Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Amazon/AmazonConstants.swift 9 | xcodebuild.log 10 | InternalTest 11 | -------------------------------------------------------------------------------- /.swiftformat: -------------------------------------------------------------------------------- 1 | --exclude Pods 2 | --decimalgrouping ignore 3 | --disable blankLinesAtStartOfScope 4 | --enable isEmpty 5 | --extensionacl on-declarations 6 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - closure_body_length 3 | - convenience_type 4 | - custom_rules 5 | - cyclomatic_complexity 6 | - discouraged_object_literal 7 | - discouraged_optional_boolean 8 | - discouraged_optional_collection 9 | - explicit_acl 10 | - explicit_top_level_acl 11 | - explicit_type_interface 12 | - extension_access_modifier 13 | - file_length 14 | - file_name 15 | - function_body_length 16 | - function_parameter_count 17 | - implicit_return 18 | - line_length 19 | - lower_acl_than_parent 20 | - modifier_order 21 | - multiline_arguments 22 | - multiline_arguments_brackets 23 | - multiline_function_chains 24 | - no_grouping_extension 25 | - prohibited_interface_builder 26 | - required_deinit 27 | - trailing_closure 28 | - type_body_length 29 | - vertical_whitespace_opening_braces 30 | opt_in_rules: 31 | - anyobject_protocol 32 | - array_init 33 | - attributes 34 | - closure_end_indentation 35 | - closure_spacing 36 | - collection_alignment 37 | - conditional_returns_on_newline 38 | - contains_over_first_not_nil 39 | - empty_count 40 | - empty_string 41 | - empty_xctest_method 42 | - explicit_enum_raw_value 43 | - explicit_init 44 | - fallthrough 45 | - fatal_error_message 46 | - file_header 47 | - first_where 48 | - force_unwrapping 49 | - function_default_parameter_at_end 50 | - identical_operands 51 | - implicitly_unwrapped_optional 52 | - inert_defer 53 | - joined_default_parameter 54 | - last_where 55 | - legacy_random 56 | - let_var_whitespace 57 | - literal_expression_end_indentation 58 | - missing_docs 59 | - multiline_literal_brackets 60 | - multiline_parameters 61 | - multiline_parameters_brackets 62 | - nimble_operator 63 | - number_separator 64 | - no_extension_access_modifier 65 | - nslocalizedstring_key 66 | - object_literal 67 | - operator_usage_whitespace 68 | - overridden_super_call 69 | - override_in_extension 70 | - pattern_matching_keywords 71 | - prefixed_toplevel_constant 72 | - private_action 73 | - private_outlet 74 | - prohibited_super_call 75 | - quick_discouraged_call 76 | - quick_discouraged_focused_test 77 | - quick_discouraged_pending_test 78 | - redundant_nil_coalescing 79 | - redundant_type_annotation 80 | - required_enum_case 81 | - single_test_class 82 | - sorted_first_last 83 | - sorted_imports 84 | - static_operator 85 | - strict_fileprivate 86 | - strong_iboutlet 87 | - switch_case_on_newline 88 | - toggle_bool 89 | - unavailable_function 90 | - unneeded_parentheses_in_closure_argument 91 | - untyped_error_in_catch 92 | - unused_control_flow_label 93 | - vertical_parameter_alignment_on_call 94 | - vertical_whitespace_between_cases 95 | - vertical_whitespace_closing_braces 96 | - xct_specific_matcher 97 | - yoda_condition 98 | excluded: 99 | - Example 100 | - InternalTest 101 | - Pods 102 | - AmazonFreeRTOS/SwiftCBOR 103 | analyzer_rules: 104 | - unused_import 105 | - unused_private_declaration -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_workspace: Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo.xcworkspace # path to your xcodeproj folder 3 | xcode_scheme: AmazonFreeRTOSDemo 4 | podfile: Example/AmazonFreeRTOSDemo/Podfile 5 | osx_image: xcode11.3 6 | 7 | script: 8 | - set -o pipefail 9 | - cd Example/AmazonFreeRTOSDemo 10 | # Remove compiler errors 11 | - sed -i '' 's/error/warning/' AmazonFreeRTOSDemo/Amazon/AmazonConstants.swift 12 | - pod install 13 | - xcodebuild -workspace AmazonFreeRTOSDemo.xcworkspace -sdk iphonesimulator -scheme AmazonFreeRTOSDemo -platform='iOS Simulator,OS=10.1,name=iPad Pro (9.7-inch)' build | xcpretty 14 | -------------------------------------------------------------------------------- /AmazonFreeRTOS.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AmazonFreeRTOS" 3 | s.version = "1.4.0" 4 | s.summary = "FreeRTOS SDK for iOS." 5 | s.description = "The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS." 6 | s.homepage = "https://aws.amazon.com/freertos/" 7 | s.license = "Apache License, Version 2.0" 8 | s.author = { 'Amazon Web Services' => 'amazonwebservices' } 9 | s.platform = :ios, '10.0' 10 | s.swift_version = "5.5" 11 | s.source = { :git => "https://github.com/aws/amazon-freertos-ble-ios-sdk.git", :tag => "1.4.0" } 12 | s.source_files = "AmazonFreeRTOS/**/*.{swift,m,h}" 13 | s.requires_arc = true 14 | s.frameworks = "CoreBluetooth" 15 | s.dependency "AWSIoT" 16 | s.dependency "CBORCoding" 17 | end 18 | -------------------------------------------------------------------------------- /AmazonFreeRTOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AmazonFreeRTOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AmazonFreeRTOS.xcodeproj/xcshareddata/xcschemes/AmazonFreeRTOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 11 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 33 | 39 | 40 | 41 | 42 | 43 | 48 | 49 | 51 | 57 | 58 | 59 | 60 | 61 | 67 | 68 | 69 | 70 | 71 | 72 | 82 | 83 | 89 | 90 | 91 | 92 | 93 | 94 | 100 | 101 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /AmazonFreeRTOS.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AmazonFreeRTOS.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/AmazonFreeRTOS.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for FreeRTOS. 4 | FOUNDATION_EXPORT double AmazonFreeRTOSVersionNumber; 5 | 6 | //! Project version string for FreeRTOS. 7 | FOUNDATION_EXPORT const unsigned char AmazonFreeRTOSVersionString[]; 8 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/AmazonFreeRTOSConstants.swift: -------------------------------------------------------------------------------- 1 | import CoreBluetooth 2 | 3 | /// FreeRTOS Constants 4 | public enum AmazonFreeRTOS { 5 | /// FreeRTOS SDK Version. 6 | static let SDKVersion = "1.1.0" 7 | } 8 | 9 | /// BLE services used by the SDK. 10 | public enum AmazonFreeRTOSGattService { 11 | /// Device Info Service. This is a required service for FreeRTOS. 12 | static let DeviceInfo = CBUUID(string: "8a7f1168-48af-4efb-83b5-e679f932ff00") 13 | /// Mqtt Proxy Service. 14 | static let MqttProxy = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30000") 15 | /// Network Config Service. 16 | static let NetworkConfig = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30100") 17 | } 18 | 19 | /// BLE characteristics used by the SDK. 20 | public enum AmazonFreeRTOSGattCharacteristic { 21 | /// The version of the FreeRTOS. 22 | static let AfrVersion = CBUUID(string: "8a7f1168-48af-4efb-83b5-e679f932ff01") 23 | /// The broker endpoint of the mqtt. 24 | static let BrokerEndpoint = CBUUID(string: "8a7f1168-48af-4efb-83b5-e679f932ff02") 25 | /// The mtu of the device. 26 | static let Mtu = CBUUID(string: "8a7f1168-48af-4efb-83b5-e679f932ff03") 27 | /// The platform of the FreeRTOS. 28 | static let AfrPlatform = CBUUID(string: "8a7f1168-48af-4efb-83b5-e679f932ff04") 29 | /// The device id of the FreeRTOS. 30 | static let AfrDevId = CBUUID(string: "8a7f1168-48af-4efb-83b5-e679f932ff05") 31 | 32 | /// Used for mqtt control state. 33 | static let MqttProxyControl = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30001") 34 | /// Used for transfer mqtt messages. 35 | static let TXMqttMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30002") 36 | /// Used for transfer mqtt messages. 37 | static let RXMqttMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30003") 38 | /// Used for mqtt large object transfer. 39 | static let TXLargeMqttMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30004") 40 | /// Used for mqtt large object transfer. 41 | static let RXLargeMqttMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30005") 42 | 43 | /// Used for network control state. 44 | static let NetworkConfigControl = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30101") 45 | /// Used for transfer network messages. 46 | static let TXNetworkMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30102") 47 | /// Used for transfer network messages. 48 | static let RXNetworkMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30103") 49 | /// Used for network large object transfer. 50 | static let TXLargeNetworkMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30104") 51 | /// Used for network large object transfer. 52 | static let RXLargeNetworkMessage = CBUUID(string: "a9d7166a-d72e-40a9-a002-48044cc30105") 53 | } 54 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/AmazonFreeRTOSEnums.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt message types. Reference: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718021 2 | public enum MqttMessageType: Int, Codable { 3 | /// Connect. 4 | case connect = 1 5 | /// Connack. 6 | case connack = 2 7 | /// Publish. 8 | case publish = 3 9 | /// Puback. 10 | case puback = 4 11 | /// Not supported by AWS IoT. 12 | case pubrec = 5 13 | /// Not supported by AWS IoT. 14 | case pubrel = 6 15 | /// Not supported by AWS IoT. 16 | case pubcomp = 7 17 | /// Subscribe. 18 | case subscribe = 8 19 | /// Suback. 20 | case suback = 9 21 | /// Unsubscribe. 22 | case unsubscribe = 10 23 | /// Unsuback. 24 | case unsuback = 11 25 | /// Pingreq. 26 | case pingreq = 12 27 | /// Pingresp. 28 | case pingresp = 13 29 | /// Disconnnect. 30 | case disconnnect = 14 31 | } 32 | 33 | /// Network message type. 34 | public enum NetworkMessageType: Int, Codable { 35 | /// ListNetworkReq. 36 | case listNetworkReq = 1 37 | /// ListNetworkResp. 38 | case listNetworkResp = 2 39 | /// SaveNetworkReq. 40 | case saveNetworkReq = 3 41 | /// SaveNetworkResp. 42 | case saveNetworkResp = 4 43 | /// EditNetworkReq. 44 | case editNetworkReq = 5 45 | /// EditNetworkResp. 46 | case editNetworkResp = 6 47 | /// DeleteNetworkReq. 48 | case deleteNetworkReq = 7 49 | /// DeleteNetworkResp. 50 | case deleteNetworkResp = 8 51 | } 52 | 53 | /// Network security types. 54 | public enum NetworkSecurityType: Int, Codable { 55 | /// Open. 56 | case open = 0 57 | /// Wep. 58 | case wep = 1 59 | /// Wpa. 60 | case wpa = 2 61 | /// Wpa 2. 62 | case wpa2 = 3 63 | /// Wpa 2 Enterprise. 64 | case wpa2Ent = 4 65 | /// Not Supported. 66 | case notSupported = 5 67 | } 68 | 69 | /// Network statuses. 70 | public enum NetworkOpStatus: Int, Codable { 71 | /// Success. 72 | case success = 0 73 | /// Failure. 74 | case failure = 1 75 | /// Timeout. 76 | case timeout = 2 77 | /// Not Supported. 78 | case notSupported = 3 79 | } 80 | 81 | /// Keys for cbor. 82 | public enum CborKey: String { 83 | /// brokerEndpoint. 84 | case brokerEndpoint = "a" 85 | /// bssid. 86 | case bssid = "b" 87 | /// cleanSession. 88 | case cleanSession = "c" 89 | /// clientID. 90 | case clientID = "d" 91 | /// connected. 92 | case connected = "e" 93 | /// hidden. 94 | case hidden = "f" 95 | /// index. 96 | case index = "g" 97 | /// maxNetworks. 98 | case maxNetworks = "h" 99 | /// msgID. 100 | case msgID = "i" 101 | /// newIndex. 102 | case newIndex = "j" 103 | /// payload. 104 | case payload = "k" 105 | /// proxyState. 106 | case proxyState = "l" 107 | /// psk. 108 | case psk = "m" 109 | /// qoS. 110 | case qoS = "n" 111 | /// qoSs. 112 | case qoSs = "o" 113 | /// rssi. 114 | case rssi = "p" 115 | /// security. 116 | case security = "q" 117 | /// ssid. 118 | case ssid = "r" 119 | /// status. 120 | case status = "s" 121 | /// timeout. 122 | case timeout = "t" 123 | /// topic. 124 | case topic = "u" 125 | /// topics. 126 | case topics = "v" 127 | /// type. 128 | case type = "w" 129 | /// connect. 130 | case connect = "y" 131 | } 132 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Extensions/CBPeripheral+AmazonFreeRTOS.swift: -------------------------------------------------------------------------------- 1 | import CoreBluetooth 2 | 3 | extension CBPeripheral { 4 | 5 | /// Helper - get the service for a particular UUID 6 | public func serviceOf(uuid: CBUUID) -> CBService? { 7 | return services?.first(where: { service -> Bool in 8 | service.uuid == uuid 9 | }) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Extensions/CBService+AmazonFreeRTOS.swift: -------------------------------------------------------------------------------- 1 | import CoreBluetooth 2 | 3 | extension CBService { 4 | 5 | /// Helper - get the characteristic for a particular UUID 6 | public func characteristicOf(uuid: CBUUID) -> CBCharacteristic? { 7 | return characteristics?.first(where: { characteristic -> Bool in 8 | characteristic.uuid == uuid 9 | }) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Extensions/NSNotification.Name+AmazonFreeRTOS.swift: -------------------------------------------------------------------------------- 1 | /// Notifications for operations 2 | extension NSNotification.Name { 3 | 4 | // BLE Central 5 | 6 | /// FreeRTOS BLE Central Manager didUpdateState. 7 | public static let afrCentralManagerDidUpdateState = NSNotification.Name("afrCentralManagerDidUpdateState") 8 | /// FreeRTOS BLE Central Manager didDiscoverDevice. 9 | public static let afrCentralManagerDidDiscoverDevice = NSNotification.Name("afrCentralManagerDidDiscoverDevice") 10 | /// FreeRTOS BLE Central Manager didConnectDevice. 11 | public static let afrCentralManagerDidConnectDevice = NSNotification.Name("afrCentralManagerDidConnectDevice") 12 | /// FreeRTOS BLE Central Manager didDisconnectDevice. 13 | public static let afrCentralManagerDidDisconnectDevice = NSNotification.Name("afrCentralManagerDidDisconnectDevice") 14 | /// FreeRTOS BLE Central Manager didFailToConnectDevice. 15 | public static let afrCentralManagerDidFailToConnectDevice = NSNotification.Name("afrCentralManagerDidFailToConnectDevice") 16 | 17 | // BLE Peripheral 18 | 19 | /// FreeRTOS BLE Peripheral didDiscoverServices. 20 | public static let afrPeripheralDidDiscoverServices = NSNotification.Name("afrPeripheralDidDiscoverServices") 21 | /// FreeRTOS BLE Peripheral didDiscoverCharacteristics. 22 | public static let afrPeripheralDidDiscoverCharacteristics = NSNotification.Name("afrPeripheralDidDiscoverCharacteristics") 23 | 24 | // DeviceInfo 25 | 26 | /// FreeRTOS return device info afr version. 27 | public static let afrDeviceInfoAfrVersion = NSNotification.Name("afrDeviceInfoAfrVersion") 28 | /// FreeRTOS return device info broker endpoint. 29 | public static let afrDeviceInfoBrokerEndpoint = NSNotification.Name("afrDeviceInfoBrokerEndpoint") 30 | /// FreeRTOS return device info mtu. 31 | public static let afrDeviceInfoMtu = NSNotification.Name("afrDeviceInfoMtu") 32 | /// FreeRTOS return device info afr platform. 33 | public static let afrDeviceInfoAfrPlatform = NSNotification.Name("afrDeviceInfoAfrPlatform") 34 | /// FreeRTOS return device info afr dev id. 35 | public static let afrDeviceInfoAfrDevId = NSNotification.Name("afrDeviceInfoAfrDevId") 36 | 37 | // NetworkConfig 38 | 39 | /// FreeRTOS list network returned a saved or scaned network. 40 | public static let afrDidListNetwork = NSNotification.Name("afrDidListNetwork") 41 | /// FreeRTOS save network did save a network. 42 | public static let afrDidSaveNetwork = NSNotification.Name("afrDidSaveNetwork") 43 | /// FreeRTOS edit network did edit a saved network. 44 | public static let afrDidEditNetwork = NSNotification.Name("afrDidEditNetwork") 45 | /// FreeRTOS delete network did delete a saved network. 46 | public static let afrDidDeleteNetwork = NSNotification.Name("afrDidDeleteNetwork") 47 | } 48 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Connack.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Connack. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Connack: Encodable { 5 | 6 | /// Mqtt connection status. Reference: https://github.com/aws/aws-sdk-ios/blob/master/AWSIoT/AWSIoTMQTTTypes.h#L20 7 | private var messageType: Int 8 | public var status: Int 9 | 10 | public init(status: Int) { 11 | messageType = MqttMessageType.connack.rawValue 12 | self.status = status 13 | } 14 | 15 | private enum CodingKeys: String, CodingKey { 16 | case messageType = "w" 17 | case status = "s" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Connect.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Connect. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Connect: Decodable { 5 | /// Mqtt client id. 6 | public var clientID: String 7 | /// Mqtt broker endpoint. 8 | public var brokerEndpoint: String 9 | /// Mqtt clean session. 10 | public var cleanSession: Bool 11 | 12 | private enum CodingKeys: String, CodingKey { 13 | case clientID = "d" 14 | case brokerEndpoint = "a" 15 | case cleanSession = "c" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Disconnect.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Disconnect. 2 | public struct Disconnect: Decodable {} 3 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/MqttMessage.swift: -------------------------------------------------------------------------------- 1 | /// Generic mqtt proxy message. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct MqttMessage: Decodable { 5 | /// Mqtt message type. 6 | public var type: MqttMessageType 7 | 8 | private enum CodingKeys: String, CodingKey { 9 | case type = "w" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Pingreq.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Pingreq. 2 | public struct Pingreq: Decodable {} 3 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Pingresp.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Pingresp. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Pingresp: Encodable { 5 | 6 | /// Mqtt message type 7 | private var messageType: Int 8 | 9 | public init() { 10 | messageType = MqttMessageType.pingresp.rawValue 11 | } 12 | 13 | private enum CodingKeys: String, CodingKey { 14 | case messageType = "w" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Puback.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Puback. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Puback: Encodable { 5 | 6 | /// Mqtt message type 7 | private var messageType: Int 8 | /// Mqtt message id. 9 | public var msgID: Int 10 | 11 | public init(msgID: Int) { 12 | messageType = MqttMessageType.puback.rawValue 13 | self.msgID = msgID 14 | } 15 | 16 | private enum CodingKeys: String, CodingKey { 17 | case messageType = "w" 18 | case msgID = "i" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Publish.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Publish. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Publish: Codable { 5 | /// Mqtt message type 6 | private var messageType: Int 7 | /// Mqtt topic. 8 | public var topic: String 9 | /// Mqtt message id. 10 | public var msgID: Int 11 | /// Mqtt QoS. 12 | public var qoS: Int 13 | /// Mqtt payload. 14 | public var payload: Data 15 | 16 | /// Publish msg init (internal). 17 | /// 18 | /// - Parameters: 19 | /// - topic: Mqtt topic. 20 | /// - msgID: Mqtt message id. 21 | /// - qoS: Mqtt QoS. 22 | /// - payload: Mqtt payload. 23 | /// - Returns: A new SaveNetworkReq. 24 | public init(topic: String, msgID: Int, qoS: Int, payload: Data) { 25 | messageType = MqttMessageType.publish.rawValue 26 | self.topic = topic 27 | self.msgID = msgID 28 | self.qoS = qoS 29 | self.payload = payload 30 | } 31 | 32 | private enum CodingKeys: String, CodingKey { 33 | case messageType = "w" 34 | case topic = "u" 35 | case msgID = "i" 36 | case qoS = "n" 37 | case payload = "k" 38 | } 39 | 40 | public init(from decoder: Decoder) throws { 41 | let values = try decoder.container(keyedBy: CodingKeys.self) 42 | messageType = try values.decode(Int.self, forKey: .messageType) 43 | topic = try values.decode(String.self, forKey: .topic) 44 | 45 | if values.contains(.msgID) { 46 | msgID = try values.decode(Int.self, forKey: .msgID) 47 | } else { 48 | msgID = 0 49 | } 50 | 51 | qoS = try values.decode(Int.self, forKey: .qoS) 52 | payload = try values.decode(Data.self, forKey: .payload) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Suback.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Suback. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Suback: Encodable { 5 | 6 | /// Mqtt message type 7 | private var messageType: Int 8 | /// Mqtt message id. 9 | public var msgID: Int 10 | /// Suback status. Use subscribe Qos on iOS. 11 | public var status: Int 12 | 13 | public init(msgID: Int, status: Int) { 14 | messageType = MqttMessageType.suback.rawValue 15 | self.msgID = msgID 16 | self.status = status 17 | } 18 | 19 | private enum CodingKeys: String, CodingKey { 20 | case messageType = "w" 21 | case msgID = "i" 22 | case status = "s" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Subscribe.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Subscribe. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Subscribe: Decodable { 5 | /// Mqtt topics. 6 | public var topics: [String] 7 | /// Mqtt message id. 8 | public var msgID: Int 9 | /// Mqtt QoSs. 10 | public var qoSs: [Int] 11 | 12 | private enum CodingKeys: String, CodingKey { 13 | case topics = "v" 14 | case msgID = "i" 15 | case qoSs = "o" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Unsuback.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Unsuback. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Unsuback: Encodable { 5 | 6 | /// Mqtt message type 7 | private var messageType: Int 8 | /// Mqtt message id. 9 | public var msgID: Int 10 | 11 | public init(msgID: Int) { 12 | messageType = MqttMessageType.unsuback.rawValue 13 | self.msgID = msgID 14 | } 15 | 16 | private enum CodingKeys: String, CodingKey { 17 | case messageType = "w" 18 | case msgID = "i" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/MqttProxy/Unsubscribe.swift: -------------------------------------------------------------------------------- 1 | /// Mqtt proxy message of Unsubscribe. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct Unsubscribe: Decodable { 5 | /// Mqtt topics. 6 | public var topics: [String] 7 | /// Mqtt message id. 8 | public var msgID: Int 9 | 10 | private enum CodingKeys: String, CodingKey { 11 | case topics = "v" 12 | case msgID = "i" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/DeleteNetworkReq.swift: -------------------------------------------------------------------------------- 1 | /// Delete network request. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct DeleteNetworkReq: Encodable { 5 | 6 | /// message type 7 | private var messageType: Int 8 | /// Index of the saved network to delete. 9 | public var index: Int 10 | 11 | /// DeleteNetworkReq is used to delete a saved network. 12 | /// 13 | /// - Parameter Index: index of the saved network to delete. 14 | /// - Returns: A new DeleteNetworkReq. 15 | public init(index: Int) { 16 | messageType = NetworkMessageType.deleteNetworkReq.rawValue 17 | self.index = index 18 | } 19 | 20 | private enum CodingKeys: String, CodingKey { 21 | case messageType = "w" 22 | case index = "g" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/DeleteNetworkResp.swift: -------------------------------------------------------------------------------- 1 | /// Delete network response. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct DeleteNetworkResp: Decodable { 5 | /// Delete operation status. 6 | public var status: NetworkOpStatus 7 | 8 | private enum CodingKeys: String, CodingKey { 9 | case status = "s" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/EditNetworkReq.swift: -------------------------------------------------------------------------------- 1 | /// Edit network request. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct EditNetworkReq: Encodable { 5 | 6 | /// message type 7 | private var messageType: Int 8 | /// Old index of the saved network. 9 | public var index: Int 10 | /// New index of the saved network. 11 | public var newIndex: Int 12 | 13 | /// EditNetworkReq is used to update the priority of a saved network. 14 | /// 15 | /// - Parameters: 16 | /// - index: Old index of the saved network. 17 | /// - newIndex: New index of the saved network. 18 | /// - Returns: A new EditNetworkReq. 19 | public init(index: Int, newIndex: Int) { 20 | messageType = NetworkMessageType.editNetworkReq.rawValue 21 | self.index = index 22 | self.newIndex = newIndex 23 | } 24 | 25 | private enum CodingKeys: String, CodingKey { 26 | case messageType = "w" 27 | case index = "g" 28 | case newIndex = "j" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/EditNetworkResp.swift: -------------------------------------------------------------------------------- 1 | /// Edit network response. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct EditNetworkResp: Decodable { 5 | /// Edit operation status. 6 | public var status: NetworkOpStatus 7 | 8 | private enum CodingKeys: String, CodingKey { 9 | case status = "s" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/ListNetworkReq.swift: -------------------------------------------------------------------------------- 1 | /// List network request. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct ListNetworkReq: Encodable { 5 | 6 | /// message type 7 | private var messageType: Int 8 | /// Max number of networks to scan. 9 | public var maxNetworks: Int 10 | /// Time to scan in seconds. 11 | public var timeout: Int 12 | 13 | /// ListNetworkReq is used to list saved and scanned wifi networks. 14 | /// 15 | /// - Parameters: 16 | /// - maxNetworks: Max number of networks to scan. 17 | /// - timeout: Time to scan in seconds. 18 | /// - Returns: A new EditNetworkReq. 19 | public init(maxNetworks: Int, timeout: Int) { 20 | messageType = NetworkMessageType.listNetworkReq.rawValue 21 | self.maxNetworks = maxNetworks 22 | self.timeout = timeout 23 | } 24 | 25 | private enum CodingKeys: String, CodingKey { 26 | case messageType = "w" 27 | case maxNetworks = "h" 28 | case timeout = "t" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/ListNetworkResp.swift: -------------------------------------------------------------------------------- 1 | /// List network response. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct ListNetworkResp: Decodable { 5 | /// Index of the network. < 0 for scaned networks. 6 | public var index: Int 7 | /// List operation status. 8 | public var status: NetworkOpStatus 9 | /// Wifi ssid. 10 | public var ssid: String 11 | /// Wifi bssid (Mac address). 12 | public var bssid: Data 13 | /// Wifi rssi (Signal strenth). 14 | public var rssi: Int 15 | /// Wifi security type. 16 | public var security: NetworkSecurityType 17 | /// Wifi is hidden or not. 18 | public var hidden: Bool 19 | /// Wifi is connected or not. 20 | public var connected: Bool 21 | /// Last Network in the list or not 22 | public var last: Bool? 23 | 24 | private enum CodingKeys: String, CodingKey { 25 | case index = "g" 26 | case status = "s" 27 | case ssid = "r" 28 | case bssid = "b" 29 | case rssi = "p" 30 | case security = "q" 31 | case hidden = "f" 32 | case connected = "e" 33 | case last = "l" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/NetworkMessage.swift: -------------------------------------------------------------------------------- 1 | /// Generic network config message. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct NetworkMessage: Decodable { 5 | /// Network message type. 6 | public var type: NetworkMessageType 7 | 8 | private enum CodingKeys: String, CodingKey { 9 | case type = "w" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/SaveNetworkReq.swift: -------------------------------------------------------------------------------- 1 | /// Save network request. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct SaveNetworkReq: Encodable { 5 | /// Mqtt message type 6 | private var messageType: Int 7 | /// Index of the network. 8 | public var index: Int 9 | /// Wifi ssid. 10 | public var ssid: String 11 | /// Wifi bssid (Mac address). 12 | public var bssid: Data 13 | /// Wifi password. Saved network ignore this value. 14 | public var psk: String 15 | /// Wifi security type. 16 | public var security: NetworkSecurityType 17 | /// Connect immediately or just save for later. 18 | public var connect: Bool 19 | 20 | /// SaveNetworkReq is used to save wifi network. 21 | /// 22 | /// - Parameters: 23 | /// - index: Index of the network. 24 | /// - ssid: Wifi ssid. 25 | /// - bssid: Wifi bssid (Mac address). 26 | /// - psk: Wifi password. Saved network ignore this value. 27 | /// - security: Wifi security type. 28 | /// - connect: Connect immediately or just save for later. 29 | /// - Returns: A new SaveNetworkReq. 30 | public init(index: Int, ssid: String, bssid: Data, psk: String, security: NetworkSecurityType, connect: Bool) { 31 | messageType = NetworkMessageType.saveNetworkReq.rawValue 32 | self.index = index 33 | self.ssid = ssid 34 | self.bssid = bssid 35 | self.psk = psk 36 | self.security = security 37 | self.connect = connect 38 | } 39 | 40 | private enum CodingKeys: String, CodingKey { 41 | case messageType = "w" 42 | case index = "g" 43 | case ssid = "r" 44 | case bssid = "b" 45 | case psk = "m" 46 | case security = "q" 47 | case connect = "y" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /AmazonFreeRTOS/Services/NetworkConfig/SaveNetworkResp.swift: -------------------------------------------------------------------------------- 1 | /// Save network response. 2 | /// To reduce the encoded CBOR message size, we maps the variable name with a single character by CodingKey 3 | /// Check the "CborKey" Enum to see the mapping relationship. 4 | public struct SaveNetworkResp: Decodable { 5 | /// Save operation status. 6 | public var status: NetworkOpStatus 7 | 8 | private enum CodingKeys: String, CodingKey { 9 | case status = "s" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AmazonFreeRTOSTests/AmazonFreeRTOSTests.swift: -------------------------------------------------------------------------------- 1 | @testable import AmazonFreeRTOS 2 | import XCTest 3 | 4 | class AmazonFreeRTOSTests: XCTestCase {} 5 | -------------------------------------------------------------------------------- /AmazonFreeRTOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional 4 | documentation, we greatly value feedback and contributions from our community. 5 | 6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary 7 | information to effectively respond to your bug report or contribution. 8 | 9 | 10 | ## Reporting Bugs/Feature Requests 11 | 12 | We welcome you to use the GitHub issue tracker to report bugs or suggest features. 13 | 14 | When filing an issue, please check [existing open](https://github.com/aws/amazon-freertos-ble-ios-sdk/issues), or [recently closed](https://github.com/aws/amazon-freertos-ble-ios-sdk/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already 15 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: 16 | 17 | * A reproducible test case or series of steps 18 | * The version of our code being used 19 | * Any modifications you've made relevant to the bug 20 | * Anything unusual about your environment or deployment 21 | 22 | 23 | ## Contributing via Pull Requests 24 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 25 | 26 | 1. You are working against the latest source on the *master* branch. 27 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 28 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. 29 | 30 | To send us a pull request, please: 31 | 32 | 1. Fork the repository. 33 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. 34 | 3. Ensure local tests pass. 35 | 4. Commit to your fork using clear commit messages. 36 | 5. Send us a pull request, answering any default questions in the pull request interface. 37 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. 38 | 39 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 40 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 41 | 42 | 43 | ## Finding contributions to work on 44 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws/amazon-freertos-ble-ios-sdk/labels/help%20wanted) issues is a great place to start. 45 | 46 | 47 | ## Code of Conduct 48 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 49 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 50 | opensource-codeofconduct@amazon.com with any additional questions or comments. 51 | 52 | 53 | ## Security issue notifications 54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. 55 | 56 | 57 | ## Licensing 58 | 59 | See the [LICENSE](https://github.com/aws/amazon-freertos-ble-ios-sdk/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. 60 | 61 | We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes. 62 | -------------------------------------------------------------------------------- /DEPRECATED.txt: -------------------------------------------------------------------------------- 1 | # ![image](https://user-images.githubusercontent.com/56273942/202568467-0ee721bb-1424-4efd-88fc-31b4f2a59dc6.png) DEPRECATED 2 | 3 | ## Announcement: 4 | As of July 31st, 2023, this repository is deprecated. The contents of this repository will remain available but we will no longer provide updates nor accept new contributions and pull requests. We recommend instead that you start [here](https://docs.amplify.aws/start/q/integration/ios/) for creating interactions between an iOS device and AWS. For Bluetooth Low Energy APIs we recommend you start [here](https://developer.apple.com/bluetooth/). 5 | 6 | Since the initial release of this package, several new iOS versions have been released bringing with them enhanced security and usability. AWS Amplify has also [released dozens of later versions](https://github.com/aws-amplify/aws-sdk-ios/releases) of the [AWS SDK](https://github.com/aws-amplify/aws-sdk-ios) with many new features and bug fixes. 7 | 8 | The amazon-freertos-ble-ios-sdk is being deprecated to remove an example built on outdated code. 9 | 10 | Have more questions? Post them in the [FreeRTOS forum](https://forums.freertos.org/). -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/.swift-version: -------------------------------------------------------------------------------- 1 | 5.0 -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/.swiftformat: -------------------------------------------------------------------------------- 1 | --exclude Pods 2 | --decimalgrouping ignore 3 | --disable blankLinesAtStartOfScope 4 | --enable isEmpty -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - closure_body_length 3 | - convenience_type 4 | - custom_rules 5 | - cyclomatic_complexity 6 | - discouraged_object_literal 7 | - discouraged_optional_boolean 8 | - discouraged_optional_collection 9 | - explicit_acl 10 | - explicit_top_level_acl 11 | - explicit_type_interface 12 | - file_length 13 | - function_body_length 14 | - function_parameter_count 15 | - line_length 16 | - lower_acl_than_parent 17 | - multiline_arguments 18 | - multiline_arguments_brackets 19 | - multiline_function_chains 20 | - no_grouping_extension 21 | - prohibited_interface_builder 22 | - required_deinit 23 | - trailing_closure 24 | - type_body_length 25 | - vertical_whitespace_opening_braces 26 | opt_in_rules: 27 | - anyobject_protocol 28 | - array_init 29 | - attributes 30 | - closure_end_indentation 31 | - closure_spacing 32 | - collection_alignment 33 | - conditional_returns_on_newline 34 | - contains_over_first_not_nil 35 | - empty_count 36 | - empty_string 37 | - empty_xctest_method 38 | - explicit_enum_raw_value 39 | - explicit_init 40 | - extension_access_modifier 41 | - fallthrough 42 | - fatal_error_message 43 | - file_header 44 | - file_name 45 | - first_where 46 | - force_unwrapping 47 | - function_default_parameter_at_end 48 | - identical_operands 49 | - implicit_return 50 | - implicitly_unwrapped_optional 51 | - inert_defer 52 | - joined_default_parameter 53 | - last_where 54 | - legacy_random 55 | - let_var_whitespace 56 | - literal_expression_end_indentation 57 | - missing_docs 58 | - modifier_order 59 | - multiline_literal_brackets 60 | - multiline_parameters 61 | - multiline_parameters_brackets 62 | - nimble_operator 63 | - number_separator 64 | - no_extension_access_modifier 65 | - nslocalizedstring_key 66 | - object_literal 67 | - operator_usage_whitespace 68 | - overridden_super_call 69 | - override_in_extension 70 | - pattern_matching_keywords 71 | - prefixed_toplevel_constant 72 | - private_action 73 | - private_outlet 74 | - prohibited_super_call 75 | - quick_discouraged_call 76 | - quick_discouraged_focused_test 77 | - quick_discouraged_pending_test 78 | - redundant_nil_coalescing 79 | - redundant_type_annotation 80 | - required_enum_case 81 | - single_test_class 82 | - sorted_first_last 83 | - sorted_imports 84 | - static_operator 85 | - strict_fileprivate 86 | - strong_iboutlet 87 | - switch_case_on_newline 88 | - toggle_bool 89 | - unavailable_function 90 | - unneeded_parentheses_in_closure_argument 91 | - untyped_error_in_catch 92 | - unused_control_flow_label 93 | - vertical_parameter_alignment_on_call 94 | - vertical_whitespace_between_cases 95 | - vertical_whitespace_closing_braces 96 | - xct_specific_matcher 97 | - yoda_condition 98 | excluded: 99 | - Pods 100 | analyzer_rules: 101 | - unused_import 102 | - unused_private_declaration 103 | 104 | identifier_name: 105 | excluded: 106 | - Ok 107 | - off 108 | - on -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo.xcworkspace/xcshareddata/xcschemes/AmazonFreeRTOSDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 11 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 33 | 39 | 40 | 41 | 42 | 43 | 48 | 49 | 50 | 51 | 57 | 58 | 59 | 60 | 61 | 62 | 72 | 74 | 80 | 81 | 82 | 83 | 84 | 85 | 91 | 93 | 99 | 100 | 101 | 102 | 104 | 105 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Amazon/AmazonConstants.swift: -------------------------------------------------------------------------------- 1 | import AWSCore 2 | 3 | struct AmazonConstants { 4 | 5 | enum AWS { 6 | 7 | #warning("if you do not plan to use the MQTT demo, you can remove these #error.") 8 | 9 | #error("Replace with your AWS Region. eg: AWSRegionType.USEast1") 10 | 11 | static let region = AWSRegionType.USEast1 12 | 13 | #error("Replace with your AWS IoT Policy Name. eg: MyIoTPolicy") 14 | 15 | static let iotPolicyName = "MyIoTPolicy" 16 | 17 | #error("Also update FreeRTOSDemo/Support/awsconfiguration.json with your credentials.") 18 | 19 | static let mqttCustomTopic = "my/custom/topic" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Amazon/AmazonContext.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class AmazonContext: NSObject { 4 | 5 | static let shared = AmazonContext() 6 | 7 | var debugAutoScroll = true 8 | } 9 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Amazon/AmazonTextField.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class AmazonTextField: UITextField { 4 | 5 | let padding = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8) 6 | 7 | override func textRect(forBounds bounds: CGRect) -> CGRect { 8 | return bounds.inset(by: padding) 9 | } 10 | 11 | override func placeholderRect(forBounds bounds: CGRect) -> CGRect { 12 | return bounds.inset(by: padding) 13 | } 14 | 15 | override func editingRect(forBounds bounds: CGRect) -> CGRect { 16 | return bounds.inset(by: padding) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import AmazonFreeRTOS 2 | import AWSMobileClient 3 | import UIKit 4 | 5 | @UIApplicationMain 6 | class AppDelegate: UIResponder, UIApplicationDelegate { 7 | 8 | var window: UIWindow? 9 | 10 | func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 11 | 12 | // FreeRTOS SDK Logging, will switch to AWSDDLog in future releases 13 | _ = AmazonContext.shared 14 | AmazonFreeRTOSManager.shared.isDebug = true 15 | 16 | // Override advertising Service UUIDs if needed. 17 | // AmazonFreeRTOSManager.shared.advertisingServiceUUIDs = [] 18 | 19 | // AWS SDK Logging 20 | // AWSDDLog.sharedInstance.logLevel = .all 21 | // AWSDDLog.add(AWSDDTTYLogger.sharedInstance) 22 | 23 | // Setup the user sign-in with cognito: https://aws-amplify.github.io/docs/ios/authentication#manual-setup 24 | AWSServiceManager.default().defaultServiceConfiguration = AWSServiceConfiguration(region: AmazonConstants.AWS.region, credentialsProvider: AWSMobileClient.default()) 25 | return true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Cells/DeviceCell.swift: -------------------------------------------------------------------------------- 1 | // swiftlint:disable private_outlet 2 | import UIKit 3 | 4 | class DeviceCell: UITableViewCell { 5 | @IBOutlet var labDeviceName: UILabel! 6 | @IBOutlet var labDeviceIdentifier: UILabel! 7 | @IBOutlet var labDeviceRSSI: UILabel! 8 | @IBOutlet var viewDeviceStateIndicator: UIView! 9 | } 10 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Cells/NetworkCell.swift: -------------------------------------------------------------------------------- 1 | // swiftlint:disable private_outlet 2 | import UIKit 3 | 4 | class NetworkCell: UITableViewCell { 5 | @IBOutlet var labWifiSSID: UILabel! 6 | @IBOutlet var labWifiSecurity: UILabel! 7 | @IBOutlet var labWifiBSSID: UILabel! 8 | @IBOutlet var labWifiRSSI: UILabel! 9 | } 10 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Cells/SectionHeaderCell.swift: -------------------------------------------------------------------------------- 1 | // swiftlint:disable private_outlet 2 | import UIKit 3 | 4 | class SectionHeaderCell: UITableViewCell { 5 | @IBOutlet var labSectionTitle: UILabel! 6 | @IBOutlet var labSectionEmpty: UILabel! 7 | } 8 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/DebugViewController.swift: -------------------------------------------------------------------------------- 1 | import AmazonFreeRTOS 2 | import UIKit 3 | 4 | class DebugViewController: UIViewController { 5 | 6 | @IBOutlet private var swAutoScroll: UISwitch! 7 | @IBOutlet private var tvDebugMessages: UITextView! 8 | 9 | var refreshTimer: Timer? 10 | 11 | override func viewDidLoad() { 12 | super.viewDidLoad() 13 | extendedLayoutIncludesOpaqueBars = true 14 | 15 | NotificationCenter.default.addObserver(self, selector: #selector(stopTimer), name: UIApplication.didEnterBackgroundNotification, object: nil) 16 | NotificationCenter.default.addObserver(self, selector: #selector(startTimer), name: UIApplication.willEnterForegroundNotification, object: nil) 17 | 18 | swAutoScroll.setOn(AmazonContext.shared.debugAutoScroll, animated: false) 19 | swAutoScroll.sendActions(for: .valueChanged) 20 | tvDebugMessages.text = AmazonFreeRTOSManager.shared.debugMessages 21 | } 22 | 23 | override func viewDidAppear(_ animated: Bool) { 24 | super.viewDidAppear(animated) 25 | startTimer() 26 | } 27 | 28 | override func viewDidDisappear(_ animated: Bool) { 29 | super.viewDidDisappear(animated) 30 | stopTimer() 31 | } 32 | } 33 | 34 | // Timer 35 | 36 | extension DebugViewController { 37 | 38 | @objc 39 | func startTimer() { 40 | refreshTimer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(updateDebugMessages), userInfo: nil, repeats: true) 41 | refreshTimer?.fire() 42 | } 43 | 44 | @objc 45 | func stopTimer() { 46 | refreshTimer?.invalidate() 47 | refreshTimer = nil 48 | } 49 | 50 | @objc 51 | func updateDebugMessages() { 52 | tvDebugMessages.text = AmazonFreeRTOSManager.shared.debugMessages 53 | if swAutoScroll.isOn { 54 | tvDebugMessages.scrollToBottom() 55 | } 56 | } 57 | } 58 | 59 | extension DebugViewController { 60 | 61 | @IBAction private func btnClearPush(_: UIBarButtonItem) { 62 | AmazonFreeRTOSManager.shared.debugMessages = String() 63 | tvDebugMessages.text = AmazonFreeRTOSManager.shared.debugMessages 64 | } 65 | 66 | @IBAction private func swAutoScrollValueChanged(_ sender: UISwitch) { 67 | AmazonContext.shared.debugAutoScroll = sender.isOn 68 | if sender.isOn { 69 | tvDebugMessages.scrollToBottom() 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Examples/CustomGattMqttViewController.swift: -------------------------------------------------------------------------------- 1 | import AmazonFreeRTOS 2 | import AWSIoT 3 | import AWSMobileClient 4 | import CoreBluetooth 5 | import os.log 6 | import UIKit 7 | 8 | extension AmazonFreeRTOSGattService { 9 | /// Custom BLE service, a counter that can start, stop and reset. 10 | static let Custom = CBUUID(string: "c6f2d9e3-49e7-4125-9014-bfc6d669ff00") 11 | } 12 | 13 | extension AmazonFreeRTOSGattCharacteristic { 14 | static let DemoRead = CBUUID(string: "c6f2d9e3-49e7-4125-9014-bfc6d669ff01") 15 | static let DemoWrite = CBUUID(string: "c6f2d9e3-49e7-4125-9014-bfc6d669ff02") 16 | } 17 | 18 | enum GattDemo: Int { 19 | case start = 0 20 | case stop = 1 21 | case reset = 2 22 | } 23 | 24 | /// Example 3: Custom GATT and MQTT 25 | /// 26 | /// This example showcases how to use another GATT(BLE) and MQTT stack along side with the one that's in the FreeRTOS SDK 27 | class CustomGattMqttViewController: UIViewController { 28 | 29 | @IBOutlet private var btnStartCounter: UIButton! 30 | @IBOutlet private var btnStopCounter: UIButton! 31 | @IBOutlet private var btnResetCounter: UIButton! 32 | 33 | var uuid: UUID? 34 | 35 | var customCentral: CBCentralManager? 36 | var customPeripheral: CBPeripheral? 37 | 38 | override func viewDidLoad() { 39 | super.viewDidLoad() 40 | 41 | guard let uuid = uuid else { 42 | return 43 | } 44 | title = AmazonFreeRTOSManager.shared.devices[uuid]?.peripheral.name 45 | 46 | // Custom GATT 47 | 48 | customCentral = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionShowPowerAlertKey: true]) 49 | 50 | // Custom MQTT 51 | 52 | guard let brokerEndpoint = AmazonFreeRTOSManager.shared.devices[uuid]?.brokerEndpoint, let serviceConfiguration = AWSServiceConfiguration(region: AmazonConstants.AWS.region, endpoint: AWSEndpoint(urlString: "https://\(brokerEndpoint)"), credentialsProvider: AWSMobileClient.sharedInstance()) else { 53 | os_log("[FreeRTOS Demo] Error can't create serviceConfiguration", log: .default, type: .error) 54 | return 55 | } 56 | 57 | // Register a new AWSIoTDataManager with "uuidString_custom". 58 | 59 | AWSIoTDataManager.register(with: serviceConfiguration, forKey: "\(uuid.uuidString)_custom") 60 | AWSIoTDataManager(forKey: "\(uuid.uuidString)_custom").disconnect() 61 | AWSIoTDataManager(forKey: "\(uuid.uuidString)_custom").connectUsingWebSocket(withClientId: uuid.uuidString, cleanSession: true) { status in 62 | os_log("[FreeRTOS Demo] connectUsingWebSocket status: %d", log: .default, type: .default, status.rawValue) 63 | } 64 | } 65 | } 66 | 67 | extension CustomGattMqttViewController: CBCentralManagerDelegate { 68 | 69 | // BLE state change 70 | 71 | func centralManagerDidUpdateState(_ central: CBCentralManager) { 72 | guard let uuid = uuid, central.state == .poweredOn, let retrievedPeripheral = central.retrievePeripherals(withIdentifiers: [uuid]).first else { 73 | os_log("[FreeRTOS Demo] Error can't retrievePeripherals", log: .default, type: .error) 74 | return 75 | } 76 | customPeripheral = retrievedPeripheral 77 | central.connect(retrievedPeripheral, options: nil) 78 | } 79 | 80 | // Connection 81 | 82 | func centralManager(_: CBCentralManager, didConnect peripheral: CBPeripheral) { 83 | os_log("[FreeRTOS Demo] didConnect", log: .default, type: .default) 84 | peripheral.delegate = self 85 | // You should only discover the custom service you want to use, DO NOT discover the FreeRTOS services. 86 | peripheral.discoverServices([AmazonFreeRTOSGattService.Custom]) 87 | } 88 | 89 | func centralManager(_: CBCentralManager, didDisconnectPeripheral _: CBPeripheral, error: Error?) { 90 | if let error = error { 91 | os_log("[FreeRTOS Demo] Error (didDisconnectPeripheral): %@", log: .default, type: .error, error.localizedDescription) 92 | } 93 | } 94 | 95 | func centralManager(_: CBCentralManager, didFailToConnect _: CBPeripheral, error: Error?) { 96 | if let error = error { 97 | os_log("[FreeRTOS Demo] Error (didFailToConnect): %@", log: .default, type: .error, error.localizedDescription) 98 | } 99 | } 100 | } 101 | 102 | extension CustomGattMqttViewController: CBPeripheralDelegate { 103 | 104 | func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) { 105 | if let error = error { 106 | os_log("[FreeRTOS Demo] Error (didDiscoverServices): %@", log: .default, type: .error, error.localizedDescription) 107 | return 108 | } 109 | os_log("[FreeRTOS Demo] didDiscoverServices", log: .default, type: .default) 110 | for service in peripheral.services ?? [] { 111 | peripheral.discoverCharacteristics(nil, for: service) 112 | } 113 | } 114 | 115 | func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { 116 | if let error = error { 117 | os_log("[FreeRTOS Demo] Error (didDiscoverCharacteristics): %@", log: .default, type: .error, error.localizedDescription) 118 | return 119 | } 120 | os_log("[FreeRTOS Demo] didDiscoverCharacteristics", log: .default, type: .default) 121 | for characteristic in service.characteristics ?? [] { 122 | peripheral.setNotifyValue(true, for: characteristic) 123 | } 124 | 125 | // Enable the UI 126 | 127 | btnStartCounter.isEnabled = true 128 | btnStopCounter.isEnabled = true 129 | btnResetCounter.isEnabled = true 130 | } 131 | 132 | func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { 133 | if let error = error { 134 | os_log("[FreeRTOS Demo] Error (didUpdateValueFor): %@", log: .default, type: .error, error.localizedDescription) 135 | return 136 | } 137 | 138 | // Send the message to the custom topic 139 | 140 | guard let value = characteristic.value, AWSIoTDataManager(forKey: "\(peripheral.identifier.uuidString)_custom").getConnectionStatus() == .connected else { 141 | return 142 | } 143 | os_log("[FreeRTOS Demo] Value: %@", log: .default, type: .debug, String(data: value, encoding: .utf8) ?? String()) 144 | AWSIoTDataManager(forKey: "\(peripheral.identifier.uuidString)_custom").publishData(value, onTopic: AmazonConstants.AWS.mqttCustomTopic, qoS: AWSIoTMQTTQoS.messageDeliveryAttemptedAtLeastOnce) 145 | } 146 | } 147 | 148 | extension CustomGattMqttViewController { 149 | 150 | // Custom MQTT 151 | 152 | @IBAction private func btnStartCounterPush(_: UIButton) { 153 | guard let characteristic = customPeripheral?.serviceOf(uuid: AmazonFreeRTOSGattService.Custom)?.characteristicOf(uuid: AmazonFreeRTOSGattCharacteristic.DemoWrite) else { 154 | return 155 | } 156 | customPeripheral?.writeValue(Data([UInt8(GattDemo.start.rawValue)]), for: characteristic, type: .withResponse) 157 | } 158 | 159 | @IBAction private func btnStopCounterPush(_: UIButton) { 160 | guard let characteristic = customPeripheral?.serviceOf(uuid: AmazonFreeRTOSGattService.Custom)?.characteristicOf(uuid: AmazonFreeRTOSGattCharacteristic.DemoWrite) else { 161 | return 162 | } 163 | customPeripheral?.writeValue(Data([UInt8(GattDemo.stop.rawValue)]), for: characteristic, type: .withResponse) 164 | } 165 | 166 | @IBAction private func btnResetCounterPush(_: UIButton) { 167 | guard let characteristic = customPeripheral?.serviceOf(uuid: AmazonFreeRTOSGattService.Custom)?.characteristicOf(uuid: AmazonFreeRTOSGattCharacteristic.DemoWrite) else { 168 | return 169 | } 170 | customPeripheral?.writeValue(Data([UInt8(GattDemo.reset.rawValue)]), for: characteristic, type: .withResponse) 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Examples/MqttProxyViewController.swift: -------------------------------------------------------------------------------- 1 | import AmazonFreeRTOS 2 | import CoreBluetooth 3 | import UIKit 4 | 5 | /// Example 1: Mqtt Proxy 6 | /// 7 | /// This example showcases how to start and stop the mqtt proxy service that allows mqtt messages from FreeRTOS device to be passed to AWS IoT. 8 | class MqttProxyViewController: UIViewController { 9 | 10 | var uuid: UUID? 11 | 12 | override func viewDidLoad() { 13 | super.viewDidLoad() 14 | 15 | guard let uuid = uuid else { 16 | return 17 | } 18 | title = AmazonFreeRTOSManager.shared.devices[uuid]?.peripheral.name 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Examples/NetworkConfigAddViewController.swift: -------------------------------------------------------------------------------- 1 | import Alertift 2 | import AmazonFreeRTOS 3 | import CoreBluetooth 4 | import UIKit 5 | 6 | class NetworkConfigAddViewController: UIViewController { 7 | 8 | @IBOutlet private var tfSSID: AmazonTextField! 9 | @IBOutlet private var tfPassword: AmazonTextField! 10 | @IBOutlet private var viewPassword: UIView! 11 | @IBOutlet private var segSecurity: UISegmentedControl! 12 | @IBOutlet private var lcScrollViewBottom: NSLayoutConstraint! 13 | 14 | var uuid: UUID? 15 | var listNetworkResp: ListNetworkResp? 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | extendedLayoutIncludesOpaqueBars = true 20 | 21 | NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil) 22 | NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notification:)), name: UIResponder.keyboardWillHideNotification, object: nil) 23 | 24 | if let listNetworkResp = listNetworkResp { 25 | tfSSID.text = listNetworkResp.ssid 26 | tfSSID.isEnabled = false 27 | if listNetworkResp.security == .open { 28 | viewPassword.isHidden = true 29 | } 30 | segSecurity.selectedSegmentIndex = listNetworkResp.security.rawValue 31 | segSecurity.isUserInteractionEnabled = false 32 | } 33 | 34 | segSecurity.sendActions(for: .valueChanged) 35 | } 36 | 37 | func addNetwork(connect: Bool) { 38 | guard let uuid = uuid, let security = NetworkSecurityType(rawValue: segSecurity.selectedSegmentIndex) else { 39 | return 40 | } 41 | guard let ssid = tfSSID.text, !ssid.isEmpty else { 42 | Alertift.alert(title: NSLocalizedString("Error", comment: String()), message: NSLocalizedString("Please enter a valid SSID.", comment: String())) 43 | .action(.default(NSLocalizedString("OK", comment: String()))) 44 | .show(on: self) 45 | return 46 | } 47 | if security != .open, tfPassword.text?.isEmpty ?? true { 48 | Alertift.alert(title: NSLocalizedString("Error", comment: String()), message: NSLocalizedString("Please enter a valid password.", comment: String())) 49 | .action(.default(NSLocalizedString("OK", comment: String()))) 50 | .show(on: self) 51 | return 52 | } 53 | AmazonFreeRTOSManager.shared.devices[uuid]?.saveNetwork(SaveNetworkReq(index: listNetworkResp?.index ?? -1, ssid: ssid, bssid: listNetworkResp?.bssid ?? Data(repeating: 0, count: 6), psk: tfPassword.text ?? String(), security: security, connect: connect)) 54 | dismiss(animated: true) 55 | } 56 | } 57 | 58 | // Keyboard 59 | 60 | extension NetworkConfigAddViewController { 61 | 62 | @objc 63 | func keyboardWillShow(notification: NSNotification) { 64 | guard let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue else { 65 | return 66 | } 67 | lcScrollViewBottom.constant = keyboardSize.height - view.safeAreaInsets.bottom 68 | UIView.performWithoutAnimation { 69 | view.layoutIfNeeded() 70 | } 71 | } 72 | 73 | @objc 74 | func keyboardWillHide(notification _: NSNotification) { 75 | lcScrollViewBottom.constant = 170.0 76 | UIView.performWithoutAnimation { 77 | view.layoutIfNeeded() 78 | } 79 | } 80 | } 81 | 82 | extension NetworkConfigAddViewController { 83 | 84 | @IBAction private func segSecurityValueChanged(_ sender: UISegmentedControl) { 85 | if sender.selectedSegmentIndex == 0 { 86 | tfPassword.text = nil 87 | viewPassword.isHidden = true 88 | return 89 | } 90 | viewPassword.isHidden = false 91 | } 92 | 93 | @IBAction private func btnSavePush(_: UIButton) { 94 | addNetwork(connect: false) 95 | } 96 | 97 | @IBAction private func btnConnectPush(_: UIButton) { 98 | addNetwork(connect: true) 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Extensions/UITableView+Amazon.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UITableView { 4 | 5 | func enableTableView() { 6 | isUserInteractionEnabled = true 7 | alpha = 1.0 8 | } 9 | 10 | func disableTableView() { 11 | isUserInteractionEnabled = false 12 | alpha = 0.2 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Extensions/UITextView+Amazon.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UITextView { 4 | 5 | func scrollToBottom() { 6 | guard !text.isEmpty else { 7 | return 8 | } 9 | scrollRangeToVisible(NSRange(location: text.count - 1, length: 1)) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Extensions/UIViewController+Amazon.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UIViewController { 4 | 5 | @IBAction private func btnBackPush(_: UIBarButtonItem) { 6 | _ = navigationController?.popViewController(animated: true) 7 | } 8 | 9 | @IBAction private func btnClosePush(_: UIBarButtonItem) { 10 | dismiss(animated: true) 11 | } 12 | 13 | // Dismiss keyboard on done 14 | @objc 15 | func textFieldShouldReturn(_: UITextField) -> Bool { 16 | view.endEditing(true) 17 | return true 18 | } 19 | } 20 | 21 | // UINavigationControllerDelegate 22 | 23 | extension UIViewController: UINavigationControllerDelegate { 24 | 25 | public func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated _: Bool) { 26 | navigationController.interactivePopGestureRecognizer?.isEnabled = viewController != navigationController.viewControllers.first 27 | navigationController.interactivePopGestureRecognizer?.delegate = nil 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-1024.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-120.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-152.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-167.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-180.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-20.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-29.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-40.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-58.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-60.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-76.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-80.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/AppIcon-87.png -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "AppIcon-40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "AppIcon-60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "AppIcon-58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "AppIcon-87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "AppIcon-80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "AppIcon-120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "AppIcon-120.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "AppIcon-180.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "AppIcon-20.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "AppIcon-40.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "AppIcon-29.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "AppIcon-58.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "AppIcon-40.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "AppIcon-80.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "AppIcon-76.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "AppIcon-152.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "AppIcon-167.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "AppIcon-1024.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/common_logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "common_logo.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/common_logo.imageset/common_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/common_logo.imageset/common_logo.pdf -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/nav_back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nav_back.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/nav_back.imageset/nav_back.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/nav_back.imageset/nav_back.pdf -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/nav_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "nav_close.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/nav_close.imageset/nav_close.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Assets.xcassets/nav_close.imageset/nav_close.pdf -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/alabaster_color.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0xD8", 13 | "alpha" : "1.000", 14 | "blue" : "0xD8", 15 | "green" : "0xD8" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "display-p3", 29 | "components" : { 30 | "red" : "0.893", 31 | "alpha" : "1.000", 32 | "blue" : "0.893", 33 | "green" : "0.893" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/dark_teal_color.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0x00", 13 | "alpha" : "1.000", 14 | "blue" : "0x57", 15 | "green" : "0x4A" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "display-p3", 29 | "components" : { 30 | "red" : "0.000", 31 | "alpha" : "1.000", 32 | "blue" : "0.647", 33 | "green" : "0.551" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/orange_color.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "1.000", 13 | "alpha" : "1.000", 14 | "blue" : "0.000", 15 | "green" : "0.578" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/seafoam_green_color.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0x3E", 13 | "alpha" : "1.000", 14 | "blue" : "0x9A", 15 | "green" : "0xB3" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "display-p3", 29 | "components" : { 30 | "red" : "0.294", 31 | "alpha" : "1.000", 32 | "blue" : "0.729", 33 | "green" : "0.848" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/teal_color.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0x00", 13 | "alpha" : "1.000", 14 | "blue" : "0xC9", 15 | "green" : "0xA1" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "display-p3", 29 | "components" : { 30 | "red" : "0.082", 31 | "alpha" : "1.000", 32 | "blue" : "0.916", 33 | "green" : "0.750" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Colors.xcassets/teal_dark_color.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0x00", 13 | "alpha" : "1.000", 14 | "blue" : "0xB5", 15 | "green" : "0x91" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "dark" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "display-p3", 29 | "components" : { 30 | "red" : "0x13", 31 | "alpha" : "1.000", 32 | "blue" : "0xD6", 33 | "green" : "0xAF" 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | FreeRTOS 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.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSBluetoothPeripheralUsageDescription 26 | The app needs access to Bluetooth 27 | NSBluetoothAlwaysUsageDescription 28 | We need to acces BLE to update the device 29 | UIBackgroundModes 30 | 31 | bluetooth-central 32 | 33 | UILaunchStoryboardName 34 | LaunchScreen 35 | UIMainStoryboardFile 36 | Main 37 | UIRequiredDeviceCapabilities 38 | 39 | armv7 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | UISupportedInterfaceOrientations~ipad 48 | 49 | UIInterfaceOrientationPortrait 50 | UIInterfaceOrientationPortraitUpsideDown 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSGroupSpecifier 10 | FooterText 11 | Copyright 12 | 13 | 14 | Type 15 | PSChildPaneSpecifier 16 | Title 17 | License 18 | File 19 | com.amazonaws.AmazonFreeRTOSDemo 20 | 21 | 22 | Type 23 | PSTitleValueSpecifier 24 | DefaultValue 25 | 1.0.0 26 | Title 27 | Version 28 | Key 29 | sbVersion 30 | 31 | 32 | StringsTable 33 | Root 34 | 35 | 36 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo.latest_result.txt: -------------------------------------------------------------------------------- 1 | name: Alertift, nameSpecified: 2 | body: MIT License 3 | 4 | Copyrig… 5 | version: 4.1.1 6 | 7 | name: AmazonFreeRTOS, nameSpecified: 8 | body: 9 | … 10 | version: 1.1.0 11 | 12 | name: AWSAuthCore, nameSpecified: 13 | body: The AWS Mobile SDK f… 14 | version: 2.12.7 15 | 16 | name: AWSAuthUI, nameSpecified: 17 | body: The AWS Mobile SDK f… 18 | version: 2.12.7 19 | 20 | name: AWSCognitoIdentityProvider, nameSpecified: 21 | body: The AWS Mobile SDK f… 22 | version: 2.12.7 23 | 24 | name: AWSCognitoIdentityProviderASF, nameSpecified: 25 | body: The AWS Mobile SDK f… 26 | version: 1.0.1 27 | 28 | name: AWSCore, nameSpecified: 29 | body: The AWS Mobile SDK f… 30 | version: 2.12.7 31 | 32 | name: AWSIoT, nameSpecified: 33 | body: The AWS Mobile SDK f… 34 | version: 2.12.7 35 | 36 | name: AWSMobileClient, nameSpecified: 37 | body: The AWS Mobile SDK f… 38 | version: 2.12.7 39 | 40 | name: AWSUserPoolsSignIn, nameSpecified: 41 | body: The AWS Mobile SDK f… 42 | version: 2.12.7 43 | 44 | name: LicensePlist, nameSpecified: 45 | body: MIT License 46 | 47 | Copyrig… 48 | version: 2.13.0 49 | 50 | name: SwiftFormat, nameSpecified: 51 | body: MIT License 52 | 53 | Copyrig… 54 | version: 0.44.2 55 | 56 | name: SwiftLint, nameSpecified: 57 | body: The MIT License (MIT… 58 | version: 0.39.1 59 | 60 | add-version-numbers: false 61 | 62 | LicensePlist Version: 2.13.0 -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Title 9 | Licenses 10 | Type 11 | PSGroupSpecifier 12 | 13 | 14 | File 15 | com.amazonaws.AmazonFreeRTOSDemo/Alertift 16 | Title 17 | Alertift 18 | Type 19 | PSChildPaneSpecifier 20 | 21 | 22 | File 23 | com.amazonaws.AmazonFreeRTOSDemo/AmazonFreeRTOS 24 | Title 25 | AmazonFreeRTOS 26 | Type 27 | PSChildPaneSpecifier 28 | 29 | 30 | File 31 | com.amazonaws.AmazonFreeRTOSDemo/AWSAuthCore 32 | Title 33 | AWSAuthCore 34 | Type 35 | PSChildPaneSpecifier 36 | 37 | 38 | File 39 | com.amazonaws.AmazonFreeRTOSDemo/AWSAuthUI 40 | Title 41 | AWSAuthUI 42 | Type 43 | PSChildPaneSpecifier 44 | 45 | 46 | File 47 | com.amazonaws.AmazonFreeRTOSDemo/AWSCognitoIdentityProvider 48 | Title 49 | AWSCognitoIdentityProvider 50 | Type 51 | PSChildPaneSpecifier 52 | 53 | 54 | File 55 | com.amazonaws.AmazonFreeRTOSDemo/AWSCognitoIdentityProviderASF 56 | Title 57 | AWSCognitoIdentityProviderASF 58 | Type 59 | PSChildPaneSpecifier 60 | 61 | 62 | File 63 | com.amazonaws.AmazonFreeRTOSDemo/AWSCore 64 | Title 65 | AWSCore 66 | Type 67 | PSChildPaneSpecifier 68 | 69 | 70 | File 71 | com.amazonaws.AmazonFreeRTOSDemo/AWSIoT 72 | Title 73 | AWSIoT 74 | Type 75 | PSChildPaneSpecifier 76 | 77 | 78 | File 79 | com.amazonaws.AmazonFreeRTOSDemo/AWSMobileClient 80 | Title 81 | AWSMobileClient 82 | Type 83 | PSChildPaneSpecifier 84 | 85 | 86 | File 87 | com.amazonaws.AmazonFreeRTOSDemo/AWSUserPoolsSignIn 88 | Title 89 | AWSUserPoolsSignIn 90 | Type 91 | PSChildPaneSpecifier 92 | 93 | 94 | File 95 | com.amazonaws.AmazonFreeRTOSDemo/LicensePlist 96 | Title 97 | LicensePlist 98 | Type 99 | PSChildPaneSpecifier 100 | 101 | 102 | File 103 | com.amazonaws.AmazonFreeRTOSDemo/SwiftFormat 104 | Title 105 | SwiftFormat 106 | Type 107 | PSChildPaneSpecifier 108 | 109 | 110 | File 111 | com.amazonaws.AmazonFreeRTOSDemo/SwiftLint 112 | Title 113 | SwiftLint 114 | Type 115 | PSChildPaneSpecifier 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSAuthCore.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSAuthUI.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSCognitoIdentityProvider.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSCognitoIdentityProviderASF.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the Amazon Cognito Identity Provider and Amazon Cognito Sync subcomponents being licensed under the Amazon Software License and the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSCore.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSIoT.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSMobileClient.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/AWSUserPoolsSignIn.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). 10 | 11 | Type 12 | PSGroupSpecifier 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/Alertift.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | MIT License 10 | 11 | Copyright (c) 2017 Suguru Kishimoto 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | 31 | Type 32 | PSGroupSpecifier 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/LicensePlist.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | MIT License 10 | 11 | Copyright (c) 2017 Masayuki Ono 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | 31 | Type 32 | PSGroupSpecifier 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/SwiftFormat.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | MIT License 10 | 11 | Copyright (c) 2016 Nick Lockwood 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | 31 | Type 32 | PSGroupSpecifier 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/com.amazonaws.AmazonFreeRTOSDemo/SwiftLint.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2020 Realm Inc. 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | 31 | Type 32 | PSGroupSpecifier 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/awsconfiguration.json: -------------------------------------------------------------------------------- 1 | { 2 | "UserAgent": "MobileHub/1.0", 3 | "Version": "1.0", 4 | "CredentialsProvider": { 5 | "CognitoIdentity": { 6 | "Default": { 7 | "PoolId": "Federated Identities -> Edit identity pool -> Identity pool ID. (eg. us-west-2:fc4d19b1-873f-44d8-bdcf-3a8e7aabf3ea)", 8 | "Region": "Your Region. (eg. us-east-1)" 9 | } 10 | } 11 | }, 12 | "IdentityManager": { 13 | "Default": {} 14 | }, 15 | "CognitoUserPool": { 16 | "Default": { 17 | "PoolId": "UserPool -> General settings -> Pool Id. (eg. us-east-1_example)", 18 | "AppClientId": "UserPool -> General settings -> App clients -> Show Details. (eg. 3tcegaot7efa8abgn1fxnebq5)", 19 | "AppClientSecret": "UserPool -> General settings -> App clients -> Show Details. (eg. dse11rx91vs1t9600uacc0ssw1byju8em3k60271n748s26ts9l)", 20 | "Region": "Your Region. (eg. us-east-1)" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/UI/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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '14.1' 2 | use_frameworks! 3 | target 'AmazonFreeRTOSDemo' do 4 | pod 'Alertift' 5 | pod 'AmazonFreeRTOS', :path => '../../' 6 | pod 'AWSAuthUI' 7 | pod 'AWSMobileClient','~> 2.17.0' 8 | pod 'AWSUserPoolsSignIn' 9 | pod 'LicensePlist' 10 | pod 'SwiftFormat/CLI' 11 | pod 'SwiftLint' 12 | end 13 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/README.md: -------------------------------------------------------------------------------- 1 | # iOS SDK for Amazon FreeRTOS Bluetooth Devices: Demo Application 2 | 3 | ## Introduction 4 | 5 | This demo application demonstrates some of the features of the iOS SDK for Amazon FreeRTOS Bluetooth devices. 6 | 7 | For information about configuring and using the demo application, see [Amazon FreeRTOS BLE Mobile SDK Demo Application](https://docs.aws.amazon.com/freertos/latest/userguide/ble-demo.html#ble-sdk-app) on docs.aws.amazon.com. 8 | 9 | ## Contents 10 | 11 | The demo application includes 3 example controllers: 12 | 13 | **MqttProxyViewController.swift** 14 | 15 | This controller starts and stops the MQTT proxy service that allows MQTT messages from Amazon FreeRTOS device to be passed to AWS IoT. 16 | 17 | **NetworkConfigViewController.swift** 18 | 19 | This controller uses the network config service to configure the Wi-Fi network on the Amazon FreeRTOS device. 20 | 21 | **CustomGattMqttViewController.swift** 22 | 23 | This controller uses a custom GATT service and MQTT stack with the stack that is included in the Amazon FreeRTOS SDK. 24 | 25 | ## License 26 | 27 | This library is licensed under the Apache 2.0 License. 28 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/Scripts/license-plist.sh: -------------------------------------------------------------------------------- 1 | cd "${SRCROOT}" 2 | "${PODS_ROOT}/LicensePlist/license-plist" --output-path "${SRCROOT}/AmazonFreeRTOSDemo/Support/Settings.bundle" --prefix "com.amazonaws.AmazonFreeRTOSDemo" 3 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/Scripts/swift-format.sh: -------------------------------------------------------------------------------- 1 | "${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat" "${SRCROOT}" --config "${SRCROOT}/.swiftformat" 2 | -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/Scripts/swift-lint-analyze.sh: -------------------------------------------------------------------------------- 1 | xcodebuild -workspace AmazonFreeRTOSDemo.xcworkspace -scheme AmazonFreeRTOSDemo > xcodebuild.log 2 | ./Pods/SwiftLint/swiftlint analyze --compiler-log-path ./xcodebuild.log -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/Scripts/swift-lint.sh: -------------------------------------------------------------------------------- 1 | "${PODS_ROOT}/SwiftLint/swiftlint" -------------------------------------------------------------------------------- /Example/AmazonFreeRTOSDemo/Scripts/xunique.sh: -------------------------------------------------------------------------------- 1 | xunique "${PROJECT_FILE_PATH}/project.pbxproj" 2 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | iOS SDK for Amazon FreeRTOS Bluetooth Devices 2 | Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | ********************** 5 | THIRD PARTY COMPONENTS 6 | ********************** 7 | 8 | This software includes third party software subject to the following copyrights: 9 | - Hassaniiii/CBORSwift - Copyright (c) 2011-2018 GitHub Inc. - MIT License 10 | 11 | ==================== 12 | 13 | Hassaniiii/CBORSwift 14 | https://github.com/Hassaniiii/CBORSwift 15 | 16 | Copyright (c) 2011-2018 GitHub Inc. 17 | 18 | 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: 19 | 20 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 21 | 22 | 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. -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '14.1' 2 | use_frameworks! 3 | 4 | target 'AmazonFreeRTOS' do 5 | pod "AWSIoT" 6 | pod 'SwiftFormat/CLI' 7 | pod 'SwiftLint' 8 | pod 'CBORCoding' 9 | end 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ![image](https://user-images.githubusercontent.com/56273942/202568467-0ee721bb-1424-4efd-88fc-31b4f2a59dc6.png) DEPRECATED 2 | 3 | ## Announcement: 4 | As of July 31st, 2023, this repository is deprecated. The contents of this repository will remain available but we will no longer provide updates nor accept new contributions and pull requests. We recommend instead that you start [here](https://docs.amplify.aws/start/q/integration/ios/) for creating interactions between an iOS device and AWS. For Bluetooth Low Energy APIs we recommend you start [here](https://developer.apple.com/bluetooth/). 5 | 6 | Since the initial release of this package, several new iOS versions have been released bringing with them enhanced security and usability. AWS Amplify has also [released dozens of later versions](https://github.com/aws-amplify/aws-sdk-ios/releases) of the [AWS SDK](https://github.com/aws-amplify/aws-sdk-ios) with many new features and bug fixes. 7 | 8 | The amazon-freertos-ble-ios-sdk is being deprecated to remove an example built on outdated code. 9 | 10 | Have more questions? Post them in the [FreeRTOS forum](https://forums.freertos.org/). 11 | 12 | # iOS SDK for FreeRTOS Bluetooth Devices 13 | 14 | [![CocoaPods Version](https://img.shields.io/cocoapods/v/AmazonFreeRTOS.svg?style=flat)](https://cocoapods.org/pods/AmazonFreeRTOS) 15 | [![License](https://img.shields.io/cocoapods/l/AmazonFreeRTOS.svg?style=flat)](https://cocoapods.org/pods/AmazonFreeRTOS) 16 | [![Platform](https://img.shields.io/cocoapods/p/AmazonFreeRTOS.svg?style=flat)](https://cocoapods.org/pods/AmazonFreeRTOS) 17 | [![Build Status](https://travis-ci.org/aws/amazon-freertos-ble-ios-sdk.svg?branch=master)](https://travis-ci.org/aws/amazon-freertos-ble-ios-sdk) 18 | 19 | ## Introduction 20 | 21 | Using the iOS SDK for FreeRTOS Bluetooth Devices, you can create mobile applications that do the following: 22 | 23 | - Scan for and connect to nearby BLE devices running FreeRTOS 24 | 25 | - Provision Wi-Fi networks for a BLE device running FreeRTOS 26 | 27 | - Act as a proxy for transmitting MQTT messages between a device running FreeRTOS and the AWS IoT cloud 28 | 29 | ## Setting Up the SDK 30 | 31 | **To install the iOS SDK for FreeRTOS Bluetooth Devices** 32 | 33 | 1. Install CocoaPods: 34 | ```ruby 35 | $ gem install cocoapods 36 | $ pod setup 37 | ``` 38 | 39 | **Note** 40 | 41 | You might need to use sudo to install CocoaPods. 42 | 43 | 2. Install the SDK with CocoaPods (In Podfile): 44 | 45 | **Newer version of the freertos firmware use CBOR encoding, please use:** 46 | 47 | ```ruby 48 | pod 'AmazonFreeRTOS' 49 | ``` 50 | 51 | **Older version of the freertos firmware use JSON encoding, please use:** 52 | 53 | ```ruby 54 | pod 'AmazonFreeRTOS', :git => 'https://github.com/aws/amazon-freertos-ble-ios-sdk.git', :tag => '0.9.4' 55 | ``` 56 | 57 | **For FreeRTOS** 58 | 59 | https://github.com/aws/amazon-freertos release 201906.00_Major and after 60 | 61 | 62 | ## Contents 63 | 64 | All main functions are defined in 65 | 66 | [AmazonFreeRTOSManager.swift](AmazonFreeRTOS/AmazonFreeRTOSManager.swift) 67 | 68 | [AmazonFreeRTOSDevice.swift](AmazonFreeRTOS/AmazonFreeRTOSDevice.swift) 69 | 70 | These functions include: 71 | 72 | ## AmazonFreeRTOSManager 73 | 74 | ### BLE Helper Functions 75 | 76 | The SDK includes some functions that help you perform BLE operations with Amazon FreeRTOS devices: 77 | 78 | ```swift 79 | // Start scan for FreeRTOS devices. 80 | startScanForDevices() 81 | 82 | // Stop scan for FreeRTOS devices. 83 | stopScanForDevices() 84 | 85 | // Disconnect. Clear all contexts. Scan for FreeRTOS devices. 86 | rescanForDevices() 87 | ``` 88 | 89 | ## AmazonFreeRTOSDevice 90 | 91 | ### BLE Helper Functions 92 | 93 | The device ble options: 94 | 95 | ```swift 96 | // Connect to the FreeRTOS device. 97 | connect(reconnect: Bool, certificateId: String? = nil, credentialsProvider: AWSCredentialsProvider? = nil) 98 | 99 | // Disconnect from the FreeRTOS device. 100 | disconnect() 101 | ``` 102 | 103 | ### MQTT Proxy Service 104 | 105 | MQTT proxy service start automatically 106 | 107 | ### Network Config Service 108 | 109 | The network configuration service configures the Wi-Fi network of the FreeRTOS Device. Its functions include: 110 | 111 | ```swift 112 | listNetwork(_ listNetworkReq: ListNetworkReq) 113 | saveNetwork(_ saveNetworkReq: SaveNetworkReq) 114 | editNetwork(_ editNetworkReq: EditNetworkReq) 115 | deleteNetwork(_ deleteNetworkReq: DeleteNetworkReq) 116 | ``` 117 | ## Documentation 118 | 119 | https://aws.github.io/amazon-freertos-ble-ios-sdk/ 120 | 121 | ## Demo Application 122 | 123 | The SDK includes a demo application that demonstrates some of the main features of the SDK. You can find the demo in [Example/AmazonFreeRTOSDemo](Example/AmazonFreeRTOSDemo). 124 | 125 | ## License 126 | 127 | This library is licensed under the Apache 2.0 License. 128 | -------------------------------------------------------------------------------- /docs/Extensions/NSNotification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NSNotification Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

AmazonFreeRTOS Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 157 |
158 |
159 |
160 |

NSNotification

161 | 162 |
163 |
164 |
165 |
    166 |
  • 167 |
    168 | 169 | 170 | 171 | Name 172 | 173 |
    174 |
    175 |
    176 |
    177 |
    178 |
    179 |

    Notifications for operations

    180 | 181 | See more 182 |
    183 |
    184 |

    Declaration

    185 |
    186 |

    Swift

    187 |
    extension NSNotification.Name
    188 | 189 |
    190 |
    191 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 | 202 |
203 |
204 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /docs/Structs/Puback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Puback Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

AmazonFreeRTOS Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 157 |
158 |
159 |
160 |

Puback

161 |
162 |
163 |
public struct Puback : Encborable
164 | 165 |
166 |
167 |

Mqtt proxy message of Puback.

168 | 169 |
170 |
171 |
172 |
    173 |
  • 174 |
    175 | 176 | 177 | 178 | msgID 179 | 180 |
    181 |
    182 |
    183 |
    184 |
    185 |
    186 |

    Mqtt message id.

    187 | 188 |
    189 |
    190 |

    Declaration

    191 |
    192 |

    Swift

    193 |
    public var msgID: Int
    194 | 195 |
    196 |
    197 |
    198 |
    199 |
  • 200 |
201 |
202 |
203 |
204 | 208 |
209 |
210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/Structs/Unsuback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Unsuback Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

AmazonFreeRTOS Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 157 |
158 |
159 |
160 |

Unsuback

161 |
162 |
163 |
public struct Unsuback : Encborable
164 | 165 |
166 |
167 |

Mqtt proxy message of Unsuback.

168 | 169 |
170 |
171 |
172 |
    173 |
  • 174 |
    175 | 176 | 177 | 178 | msgID 179 | 180 |
    181 |
    182 |
    183 |
    184 |
    185 |
    186 |

    Mqtt message id.

    187 | 188 |
    189 |
    190 |

    Declaration

    191 |
    192 |

    Swift

    193 |
    public var msgID: Int
    194 | 195 |
    196 |
    197 |
    198 |
    199 |
  • 200 |
201 |
202 |
203 |
204 | 208 |
209 |
210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 100% 23 | 24 | 25 | 100% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 2; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 2; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 20px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | .main-content .section-name p { 173 | margin-bottom: inherit; 174 | line-height: inherit; } 175 | .main-content .section-name code { 176 | background-color: inherit; 177 | padding: inherit; 178 | color: inherit; } 179 | 180 | .section { 181 | padding: 0 25px; } 182 | 183 | .highlight { 184 | background-color: #eee; 185 | padding: 10px 12px; 186 | border: 1px solid #e2e2e2; 187 | border-radius: 4px; 188 | overflow-x: auto; } 189 | 190 | .declaration .highlight { 191 | overflow-x: initial; 192 | padding: 0 40px 40px 0; 193 | margin-bottom: -25px; 194 | background-color: transparent; 195 | border: none; } 196 | 197 | .section-name { 198 | margin: 0; 199 | margin-left: 18px; } 200 | 201 | .task-group-section { 202 | padding-left: 6px; 203 | border-top: 1px solid #e2e2e2; } 204 | 205 | .task-group { 206 | padding-top: 0px; } 207 | 208 | .task-name-container a[name]:before { 209 | content: ""; 210 | display: block; 211 | padding-top: 70px; 212 | margin: -70px 0 0; } 213 | 214 | .section-name-container { 215 | position: relative; 216 | display: inline-block; } 217 | .section-name-container .section-name-link { 218 | position: absolute; 219 | top: 0; 220 | left: 0; 221 | bottom: 0; 222 | right: 0; 223 | margin-bottom: 0; } 224 | .section-name-container .section-name { 225 | position: relative; 226 | pointer-events: none; 227 | z-index: 1; } 228 | .section-name-container .section-name a { 229 | pointer-events: auto; } 230 | 231 | .item { 232 | padding-top: 8px; 233 | width: 100%; 234 | list-style-type: none; } 235 | .item a[name]:before { 236 | content: ""; 237 | display: block; 238 | padding-top: 70px; 239 | margin: -70px 0 0; } 240 | .item code { 241 | background-color: transparent; 242 | padding: 0; } 243 | .item .token, .item .direct-link { 244 | padding-left: 3px; 245 | margin-left: 15px; 246 | font-size: 11.9px; 247 | transition: all 300ms; } 248 | .item .token-open { 249 | margin-left: 0px; } 250 | .item .discouraged { 251 | text-decoration: line-through; } 252 | .item .declaration-note { 253 | font-size: .85em; 254 | color: gray; 255 | font-style: italic; } 256 | 257 | .pointer-container { 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -23px; 260 | padding-bottom: 13px; 261 | position: relative; 262 | width: 110%; } 263 | 264 | .pointer { 265 | background: #f9f9f9; 266 | border-left: 1px solid #e2e2e2; 267 | border-top: 1px solid #e2e2e2; 268 | height: 12px; 269 | left: 21px; 270 | top: -7px; 271 | -webkit-transform: rotate(45deg); 272 | -moz-transform: rotate(45deg); 273 | -o-transform: rotate(45deg); 274 | transform: rotate(45deg); 275 | position: absolute; 276 | width: 12px; } 277 | 278 | .height-container { 279 | display: none; 280 | left: -25px; 281 | padding: 0 25px; 282 | position: relative; 283 | width: 100%; 284 | overflow: hidden; } 285 | .height-container .section { 286 | background: #f9f9f9; 287 | border-bottom: 1px solid #e2e2e2; 288 | left: -25px; 289 | position: relative; 290 | width: 100%; 291 | padding-top: 10px; 292 | padding-bottom: 5px; } 293 | 294 | .aside, .language { 295 | padding: 6px 12px; 296 | margin: 12px 0; 297 | border-left: 5px solid #dddddd; 298 | overflow-y: hidden; } 299 | .aside .aside-title, .language .aside-title { 300 | font-size: 9px; 301 | letter-spacing: 2px; 302 | text-transform: uppercase; 303 | padding-bottom: 0; 304 | margin: 0; 305 | color: #aaa; 306 | -webkit-user-select: none; } 307 | .aside p:last-child, .language p:last-child { 308 | margin-bottom: 0; } 309 | 310 | .language { 311 | border-left: 5px solid #cde9f4; } 312 | .language .aside-title { 313 | color: #4b8afb; } 314 | 315 | .aside-warning, .aside-deprecated, .aside-unavailable { 316 | border-left: 5px solid #ff6666; } 317 | .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { 318 | color: #ff0000; } 319 | 320 | .graybox { 321 | border-collapse: collapse; 322 | width: 100%; } 323 | .graybox p { 324 | margin: 0; 325 | word-break: break-word; 326 | min-width: 50px; } 327 | .graybox td { 328 | border: 1px solid #e2e2e2; 329 | padding: 5px 25px 5px 10px; 330 | vertical-align: middle; } 331 | .graybox tr td:first-of-type { 332 | text-align: right; 333 | padding: 7px; 334 | vertical-align: top; 335 | word-break: normal; 336 | width: 40px; } 337 | 338 | .slightly-smaller { 339 | font-size: 0.9em; } 340 | 341 | #footer { 342 | position: relative; 343 | top: 10px; 344 | bottom: 0px; 345 | margin-left: 25px; } 346 | #footer p { 347 | margin: 0; 348 | color: #aaa; 349 | font-size: 0.8em; } 350 | 351 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 352 | display: none; } 353 | 354 | html.dash .main-content { 355 | width: 980px; 356 | margin-left: 0; 357 | border: none; 358 | width: 100%; 359 | top: 0; 360 | padding-bottom: 0; } 361 | 362 | html.dash .height-container { 363 | display: block; } 364 | 365 | html.dash .item .token { 366 | margin-left: 0; } 367 | 368 | html.dash .content-wrapper { 369 | width: auto; } 370 | 371 | html.dash #footer { 372 | position: static; } 373 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.amazonfreertos 7 | CFBundleName 8 | AmazonFreeRTOS 9 | DocSetPlatformFamily 10 | amazonfreertos 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/Extensions/NSNotification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NSNotification Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

AmazonFreeRTOS Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 157 |
158 |
159 |
160 |

NSNotification

161 | 162 |
163 |
164 |
165 |
    166 |
  • 167 |
    168 | 169 | 170 | 171 | Name 172 | 173 |
    174 |
    175 |
    176 |
    177 |
    178 |
    179 |

    Notifications for operations

    180 | 181 | See more 182 |
    183 |
    184 |

    Declaration

    185 |
    186 |

    Swift

    187 |
    extension NSNotification.Name
    188 | 189 |
    190 |
    191 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 | 202 |
203 |
204 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/Structs/Puback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Puback Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

AmazonFreeRTOS Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 157 |
158 |
159 |
160 |

Puback

161 |
162 |
163 |
public struct Puback : Encborable
164 | 165 |
166 |
167 |

Mqtt proxy message of Puback.

168 | 169 |
170 |
171 |
172 |
    173 |
  • 174 |
    175 | 176 | 177 | 178 | msgID 179 | 180 |
    181 |
    182 |
    183 |
    184 |
    185 |
    186 |

    Mqtt message id.

    187 | 188 |
    189 |
    190 |

    Declaration

    191 |
    192 |

    Swift

    193 |
    public var msgID: Int
    194 | 195 |
    196 |
    197 |
    198 |
    199 |
  • 200 |
201 |
202 |
203 |
204 | 208 |
209 |
210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 2; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 2; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 20px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | .main-content .section-name p { 173 | margin-bottom: inherit; 174 | line-height: inherit; } 175 | .main-content .section-name code { 176 | background-color: inherit; 177 | padding: inherit; 178 | color: inherit; } 179 | 180 | .section { 181 | padding: 0 25px; } 182 | 183 | .highlight { 184 | background-color: #eee; 185 | padding: 10px 12px; 186 | border: 1px solid #e2e2e2; 187 | border-radius: 4px; 188 | overflow-x: auto; } 189 | 190 | .declaration .highlight { 191 | overflow-x: initial; 192 | padding: 0 40px 40px 0; 193 | margin-bottom: -25px; 194 | background-color: transparent; 195 | border: none; } 196 | 197 | .section-name { 198 | margin: 0; 199 | margin-left: 18px; } 200 | 201 | .task-group-section { 202 | padding-left: 6px; 203 | border-top: 1px solid #e2e2e2; } 204 | 205 | .task-group { 206 | padding-top: 0px; } 207 | 208 | .task-name-container a[name]:before { 209 | content: ""; 210 | display: block; 211 | padding-top: 70px; 212 | margin: -70px 0 0; } 213 | 214 | .section-name-container { 215 | position: relative; 216 | display: inline-block; } 217 | .section-name-container .section-name-link { 218 | position: absolute; 219 | top: 0; 220 | left: 0; 221 | bottom: 0; 222 | right: 0; 223 | margin-bottom: 0; } 224 | .section-name-container .section-name { 225 | position: relative; 226 | pointer-events: none; 227 | z-index: 1; } 228 | .section-name-container .section-name a { 229 | pointer-events: auto; } 230 | 231 | .item { 232 | padding-top: 8px; 233 | width: 100%; 234 | list-style-type: none; } 235 | .item a[name]:before { 236 | content: ""; 237 | display: block; 238 | padding-top: 70px; 239 | margin: -70px 0 0; } 240 | .item code { 241 | background-color: transparent; 242 | padding: 0; } 243 | .item .token, .item .direct-link { 244 | padding-left: 3px; 245 | margin-left: 15px; 246 | font-size: 11.9px; 247 | transition: all 300ms; } 248 | .item .token-open { 249 | margin-left: 0px; } 250 | .item .discouraged { 251 | text-decoration: line-through; } 252 | .item .declaration-note { 253 | font-size: .85em; 254 | color: gray; 255 | font-style: italic; } 256 | 257 | .pointer-container { 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -23px; 260 | padding-bottom: 13px; 261 | position: relative; 262 | width: 110%; } 263 | 264 | .pointer { 265 | background: #f9f9f9; 266 | border-left: 1px solid #e2e2e2; 267 | border-top: 1px solid #e2e2e2; 268 | height: 12px; 269 | left: 21px; 270 | top: -7px; 271 | -webkit-transform: rotate(45deg); 272 | -moz-transform: rotate(45deg); 273 | -o-transform: rotate(45deg); 274 | transform: rotate(45deg); 275 | position: absolute; 276 | width: 12px; } 277 | 278 | .height-container { 279 | display: none; 280 | left: -25px; 281 | padding: 0 25px; 282 | position: relative; 283 | width: 100%; 284 | overflow: hidden; } 285 | .height-container .section { 286 | background: #f9f9f9; 287 | border-bottom: 1px solid #e2e2e2; 288 | left: -25px; 289 | position: relative; 290 | width: 100%; 291 | padding-top: 10px; 292 | padding-bottom: 5px; } 293 | 294 | .aside, .language { 295 | padding: 6px 12px; 296 | margin: 12px 0; 297 | border-left: 5px solid #dddddd; 298 | overflow-y: hidden; } 299 | .aside .aside-title, .language .aside-title { 300 | font-size: 9px; 301 | letter-spacing: 2px; 302 | text-transform: uppercase; 303 | padding-bottom: 0; 304 | margin: 0; 305 | color: #aaa; 306 | -webkit-user-select: none; } 307 | .aside p:last-child, .language p:last-child { 308 | margin-bottom: 0; } 309 | 310 | .language { 311 | border-left: 5px solid #cde9f4; } 312 | .language .aside-title { 313 | color: #4b8afb; } 314 | 315 | .aside-warning, .aside-deprecated, .aside-unavailable { 316 | border-left: 5px solid #ff6666; } 317 | .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { 318 | color: #ff0000; } 319 | 320 | .graybox { 321 | border-collapse: collapse; 322 | width: 100%; } 323 | .graybox p { 324 | margin: 0; 325 | word-break: break-word; 326 | min-width: 50px; } 327 | .graybox td { 328 | border: 1px solid #e2e2e2; 329 | padding: 5px 25px 5px 10px; 330 | vertical-align: middle; } 331 | .graybox tr td:first-of-type { 332 | text-align: right; 333 | padding: 7px; 334 | vertical-align: top; 335 | word-break: normal; 336 | width: 40px; } 337 | 338 | .slightly-smaller { 339 | font-size: 0.9em; } 340 | 341 | #footer { 342 | position: relative; 343 | top: 10px; 344 | bottom: 0px; 345 | margin-left: 25px; } 346 | #footer p { 347 | margin: 0; 348 | color: #aaa; 349 | font-size: 0.8em; } 350 | 351 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 352 | display: none; } 353 | 354 | html.dash .main-content { 355 | width: 980px; 356 | margin-left: 0; 357 | border: none; 358 | width: 100%; 359 | top: 0; 360 | padding-bottom: 0; } 361 | 362 | html.dash .height-container { 363 | display: block; } 364 | 365 | html.dash .item .token { 366 | margin-left: 0; } 367 | 368 | html.dash .content-wrapper { 369 | width: auto; } 370 | 371 | html.dash #footer { 372 | position: static; } 373 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | function toggleItem($link, $content) { 12 | var animationDuration = 300; 13 | $link.toggleClass('token-open'); 14 | $content.slideToggle(animationDuration); 15 | } 16 | 17 | function itemLinkToContent($link) { 18 | return $link.parent().parent().next(); 19 | } 20 | 21 | // On doc load + hash-change, open any targetted item 22 | function openCurrentItemIfClosed() { 23 | if (window.jazzy.docset) { 24 | return; 25 | } 26 | var $link = $(`.token[href="${location.hash}"]`); 27 | $content = itemLinkToContent($link); 28 | if ($content.is(':hidden')) { 29 | toggleItem($link, $content); 30 | } 31 | } 32 | 33 | $(openCurrentItemIfClosed); 34 | $(window).on('hashchange', openCurrentItemIfClosed); 35 | 36 | // On item link ('token') click, toggle its discussion 37 | $('.token').on('click', function(event) { 38 | if (window.jazzy.docset) { 39 | return; 40 | } 41 | var $link = $(this); 42 | toggleItem($link, itemLinkToContent($link)); 43 | 44 | // Keeps the document from jumping to the hash. 45 | var href = $link.attr('href'); 46 | if (history.pushState) { 47 | history.pushState({}, '', href); 48 | } else { 49 | location.hash = href; 50 | } 51 | event.preventDefault(); 52 | }); 53 | 54 | // Clicks on links to the current, closed, item need to open the item 55 | $("a:not('.token')").on('click', function() { 56 | if (location == this.href) { 57 | openCurrentItemIfClosed(); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/docsets/AmazonFreeRTOS.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/AmazonFreeRTOS.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/docsets/AmazonFreeRTOS.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-freertos-ble-ios-sdk/3c62f970d5f8cf96c95a658c7a288b8c20e58d3b/docs/img/gh.png -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | function toggleItem($link, $content) { 12 | var animationDuration = 300; 13 | $link.toggleClass('token-open'); 14 | $content.slideToggle(animationDuration); 15 | } 16 | 17 | function itemLinkToContent($link) { 18 | return $link.parent().parent().next(); 19 | } 20 | 21 | // On doc load + hash-change, open any targetted item 22 | function openCurrentItemIfClosed() { 23 | if (window.jazzy.docset) { 24 | return; 25 | } 26 | var $link = $(`.token[href="${location.hash}"]`); 27 | $content = itemLinkToContent($link); 28 | if ($content.is(':hidden')) { 29 | toggleItem($link, $content); 30 | } 31 | } 32 | 33 | $(openCurrentItemIfClosed); 34 | $(window).on('hashchange', openCurrentItemIfClosed); 35 | 36 | // On item link ('token') click, toggle its discussion 37 | $('.token').on('click', function(event) { 38 | if (window.jazzy.docset) { 39 | return; 40 | } 41 | var $link = $(this); 42 | toggleItem($link, itemLinkToContent($link)); 43 | 44 | // Keeps the document from jumping to the hash. 45 | var href = $link.attr('href'); 46 | if (history.pushState) { 47 | history.pushState({}, '', href); 48 | } else { 49 | location.hash = href; 50 | } 51 | event.preventDefault(); 52 | }); 53 | 54 | // Clicks on links to the current, closed, item need to open the item 55 | $("a:not('.token')").on('click', function() { 56 | if (location == this.href) { 57 | openCurrentItemIfClosed(); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | 4 | ], 5 | "source_directory": "/Users/xuazh/Documents/GitHub/amazon-freertos-ble-ios-sdk" 6 | } --------------------------------------------------------------------------------