react-native-flic2 0.3.24 → 0.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/Flic2.xcodeproj/project.pbxproj +8 -4
- package/ios/Flic2.xcworkspace/xcuserdata/wesdewitte.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/package.json +1 -1
- package/react-native-flic2.podspec +2 -2
- package/ios/flic2lib.xcframework/Info.plist +0 -56
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/Headers/FLICButton.h +0 -335
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/Headers/FLICEnums.h +0 -315
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/Headers/FLICManager.h +0 -171
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/Headers/flic2lib.h +0 -19
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/Modules/module.modulemap +0 -6
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/Resources/Info.plist +0 -50
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-maccatalyst/flic2lib.framework/Versions/A/flic2lib +0 -0
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/Headers/FLICButton.h +0 -335
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/Headers/FLICEnums.h +0 -315
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/Headers/FLICManager.h +0 -171
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/Headers/flic2lib.h +0 -19
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/Info.plist +0 -0
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/Modules/module.modulemap +0 -6
- package/ios/flic2lib.xcframework/ios-arm64_x86_64-simulator/flic2lib.framework/flic2lib +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/Headers/FLICButton.h +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/Headers/FLICEnums.h +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/Headers/FLICManager.h +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/Headers/flic2lib.h +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/Info.plist +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/Modules/module.modulemap +0 -0
- /package/ios/{flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework → flic2lib.framework}/flic2lib +0 -0
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
|
|
10
|
+
3A6BB39D2B7E4AB400A0F73C /* Flic2.h in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5881CC2AC0600A0062D /* Flic2.h */; };
|
|
11
|
+
3A9E18882B7F704600B18D9F /* flic2lib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A8166302B7F45110032C2D0 /* flic2lib.framework */; platformFilter = ios; };
|
|
11
12
|
B3E7B58A1CC2AC0600A0062D /* Flic2.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* Flic2.m */; };
|
|
12
13
|
/* End PBXBuildFile section */
|
|
13
14
|
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
|
|
26
27
|
/* Begin PBXFileReference section */
|
|
27
28
|
134814201AA4EA6300B7C361 /* libFlic2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFlic2.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
28
|
-
|
|
29
|
+
3A8166302B7F45110032C2D0 /* flic2lib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = flic2lib.framework; sourceTree = "<group>"; };
|
|
29
30
|
B3E7B5881CC2AC0600A0062D /* Flic2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flic2.h; sourceTree = SOURCE_ROOT; };
|
|
30
31
|
B3E7B5891CC2AC0600A0062D /* Flic2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Flic2.m; sourceTree = SOURCE_ROOT; };
|
|
31
32
|
/* End PBXFileReference section */
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
isa = PBXFrameworksBuildPhase;
|
|
36
37
|
buildActionMask = 2147483647;
|
|
37
38
|
files = (
|
|
38
|
-
|
|
39
|
+
3A9E18882B7F704600B18D9F /* flic2lib.framework in Frameworks */,
|
|
39
40
|
);
|
|
40
41
|
runOnlyForDeploymentPostprocessing = 0;
|
|
41
42
|
};
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
3A919E962B7CAD8E00FA7A77 /* Frameworks */ = {
|
|
54
55
|
isa = PBXGroup;
|
|
55
56
|
children = (
|
|
56
|
-
|
|
57
|
+
3A8166302B7F45110032C2D0 /* flic2lib.framework */,
|
|
57
58
|
);
|
|
58
59
|
name = Frameworks;
|
|
59
60
|
sourceTree = "<group>";
|
|
@@ -127,6 +128,7 @@
|
|
|
127
128
|
isa = PBXSourcesBuildPhase;
|
|
128
129
|
buildActionMask = 2147483647;
|
|
129
130
|
files = (
|
|
131
|
+
3A6BB39D2B7E4AB400A0F73C /* Flic2.h in Sources */,
|
|
130
132
|
B3E7B58A1CC2AC0600A0062D /* Flic2.m in Sources */,
|
|
131
133
|
);
|
|
132
134
|
runOnlyForDeploymentPostprocessing = 0;
|
|
@@ -257,6 +259,7 @@
|
|
|
257
259
|
LIBRARY_SEARCH_PATHS = (
|
|
258
260
|
"$(inherited)",
|
|
259
261
|
"$(PROJECT_DIR)/Frameworks/flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework",
|
|
262
|
+
"$(PROJECT_DIR)/flic2lib.framework",
|
|
260
263
|
);
|
|
261
264
|
OTHER_LDFLAGS = "-ObjC";
|
|
262
265
|
PRODUCT_NAME = Flic2;
|
|
@@ -282,6 +285,7 @@
|
|
|
282
285
|
LIBRARY_SEARCH_PATHS = (
|
|
283
286
|
"$(inherited)",
|
|
284
287
|
"$(PROJECT_DIR)/Frameworks/flic2lib.xcframework/ios-arm64_armv7/flic2lib.framework",
|
|
288
|
+
"$(PROJECT_DIR)/flic2lib.framework",
|
|
285
289
|
);
|
|
286
290
|
OTHER_LDFLAGS = "-ObjC";
|
|
287
291
|
PRODUCT_NAME = Flic2;
|
package/ios/Flic2.xcworkspace/xcuserdata/wesdewitte.xcuserdatad/UserInterfaceState.xcuserstate
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -15,9 +15,9 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.platforms = { :ios => "9.0" }
|
|
16
16
|
s.source = { :git => "https://github.com/X-Guard/react-native-flic2.git", :tag => "#{s.version}" }
|
|
17
17
|
|
|
18
|
-
s.source_files = "ios
|
|
18
|
+
s.source_files = "ios/**/*.{h,m,swift}"
|
|
19
19
|
s.requires_arc = true
|
|
20
|
-
s.vendored_frameworks = 'ios/flic2lib.
|
|
20
|
+
s.vendored_frameworks = 'ios/flic2lib.framework'
|
|
21
21
|
|
|
22
22
|
s.dependency "React"
|
|
23
23
|
# ...
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>AvailableLibraries</key>
|
|
6
|
-
<array>
|
|
7
|
-
<dict>
|
|
8
|
-
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-arm64_armv7</string>
|
|
10
|
-
<key>LibraryPath</key>
|
|
11
|
-
<string>flic2lib.framework</string>
|
|
12
|
-
<key>SupportedArchitectures</key>
|
|
13
|
-
<array>
|
|
14
|
-
<string>arm64</string>
|
|
15
|
-
<string>armv7</string>
|
|
16
|
-
</array>
|
|
17
|
-
<key>SupportedPlatform</key>
|
|
18
|
-
<string>ios</string>
|
|
19
|
-
</dict>
|
|
20
|
-
<dict>
|
|
21
|
-
<key>LibraryIdentifier</key>
|
|
22
|
-
<string>ios-arm64_x86_64-simulator</string>
|
|
23
|
-
<key>LibraryPath</key>
|
|
24
|
-
<string>flic2lib.framework</string>
|
|
25
|
-
<key>SupportedArchitectures</key>
|
|
26
|
-
<array>
|
|
27
|
-
<string>arm64</string>
|
|
28
|
-
<string>x86_64</string>
|
|
29
|
-
</array>
|
|
30
|
-
<key>SupportedPlatform</key>
|
|
31
|
-
<string>ios</string>
|
|
32
|
-
<key>SupportedPlatformVariant</key>
|
|
33
|
-
<string>simulator</string>
|
|
34
|
-
</dict>
|
|
35
|
-
<dict>
|
|
36
|
-
<key>LibraryIdentifier</key>
|
|
37
|
-
<string>ios-arm64_x86_64-maccatalyst</string>
|
|
38
|
-
<key>LibraryPath</key>
|
|
39
|
-
<string>flic2lib.framework</string>
|
|
40
|
-
<key>SupportedArchitectures</key>
|
|
41
|
-
<array>
|
|
42
|
-
<string>arm64</string>
|
|
43
|
-
<string>x86_64</string>
|
|
44
|
-
</array>
|
|
45
|
-
<key>SupportedPlatform</key>
|
|
46
|
-
<string>ios</string>
|
|
47
|
-
<key>SupportedPlatformVariant</key>
|
|
48
|
-
<string>maccatalyst</string>
|
|
49
|
-
</dict>
|
|
50
|
-
</array>
|
|
51
|
-
<key>CFBundlePackageType</key>
|
|
52
|
-
<string>XFWK</string>
|
|
53
|
-
<key>XCFrameworkFormatVersion</key>
|
|
54
|
-
<string>1.0</string>
|
|
55
|
-
</dict>
|
|
56
|
-
</plist>
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// FLICButton.h
|
|
3
|
-
// flic2lib
|
|
4
|
-
//
|
|
5
|
-
// Created by Anton Meier on 2019-04-11.
|
|
6
|
-
// Copyright © 2020 Shortcut Labs. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import "FLICEnums.h"
|
|
11
|
-
|
|
12
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
-
|
|
14
|
-
@protocol FLICButtonDelegate;
|
|
15
|
-
|
|
16
|
-
/*!
|
|
17
|
-
* @class FLICButton
|
|
18
|
-
*
|
|
19
|
-
* @discussion An instance of this class represents a physical Flic.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
@interface FLICButton : NSObject
|
|
23
|
-
|
|
24
|
-
/*!
|
|
25
|
-
* @property identifier
|
|
26
|
-
*
|
|
27
|
-
* @discussion This identifier is guaranteed to be the same for each Flic paired to a particular iOS device. Thus it can be used to identify a Flic within an app.
|
|
28
|
-
* However, If you need to identify Flics cross different apps on different iOS devices, then you should have look at the either uuid, serialNumber, or bluetoothAddress.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
@property(readonly, nonatomic, strong, nonnull) NSUUID *identifier;
|
|
32
|
-
|
|
33
|
-
/*!
|
|
34
|
-
* @property delegate
|
|
35
|
-
*
|
|
36
|
-
* @discussion The delegate that will receive events related to this particular Flic.
|
|
37
|
-
* You can either set this delegate manually for each button, or let the manager do so automatically using the buttonDelegate as default.
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
@property(weak, nonatomic, nullable) id<FLICButtonDelegate> delegate;
|
|
41
|
-
|
|
42
|
-
/*!
|
|
43
|
-
* @property name
|
|
44
|
-
*
|
|
45
|
-
* @discussion The bluetooth advertisement name of the Flic. This will be the same name that is shown by iOS it its bluetooth settings.
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
@property(nonatomic, readonly, strong, nullable) NSString *name;
|
|
49
|
-
|
|
50
|
-
/*!
|
|
51
|
-
* @property nickname
|
|
52
|
-
*
|
|
53
|
-
* @discussion With this property you can read out the display name that the user may change in for example the Flic app. This value can also be changed from third party apps
|
|
54
|
-
* integrating this framework (including your app). The purpose of this is to provide more human readable name that the user can use to identify its Flic's across apps.
|
|
55
|
-
* For example "Kitchen Flic" or "Bedroom Lights". The nickname has a maximum length limit of 23 bytes. Keep in mind that this is the length in bytes, and not the
|
|
56
|
-
* number of UTF8 characters (which may be up to 4 bytes long). If you write anything longer than 23 bytes then the nickname will automatically be truncated to at
|
|
57
|
-
* most 23 bytes. When truncating the string, the framework will always cut between UTF8 character, so you don't have to worry about writing half an emoji, for example.
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
@property(nonatomic, readwrite, strong, nullable) NSString *nickname;
|
|
61
|
-
|
|
62
|
-
/*!
|
|
63
|
-
* @property bluetoothAddress
|
|
64
|
-
*
|
|
65
|
-
* @discussion The bluetooth address of the Flic. This will be a string representation of a 49 bit long address. Example: "00:80:e4:da:12:34:56"
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
@property(nonatomic, readonly, strong, nonnull) NSString *bluetoothAddress;
|
|
69
|
-
|
|
70
|
-
/*!
|
|
71
|
-
* @property uuid
|
|
72
|
-
*
|
|
73
|
-
* @discussion This is a unique identifier string that best used to identify a Flic. This is for example used to identify Flics on all our API endpoints.
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
@property(nonatomic, readonly, strong, nonnull) NSString *uuid;
|
|
77
|
-
|
|
78
|
-
/*!
|
|
79
|
-
* @property serialNumber
|
|
80
|
-
*
|
|
81
|
-
* @discussion The serial number is a production identifier that is printed on the backside of the Flic inside the battery hatch.
|
|
82
|
-
* This serves no other purpose than allowing a user to identify a button by manually looking at it. Can be useful in some cases.
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
@property(nonatomic, readonly, strong, nonnull) NSString *serialNumber;
|
|
86
|
-
|
|
87
|
-
/*!
|
|
88
|
-
* @property triggerMode
|
|
89
|
-
*
|
|
90
|
-
* @discussion Use this property to let the flic2lib know what type of click events you are interested it. By default you will get Click, Double Click and Hold events.
|
|
91
|
-
* However, if you for example are only interested in Click events then you can set this property to FLICButtonTriggerModeClick. Doing so will allow the flic2lib to
|
|
92
|
-
* deliver the events quicker since it can now ignore Double Click and Hold.
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
@property(nonatomic, readwrite) FLICButtonTriggerMode triggerMode;
|
|
96
|
-
|
|
97
|
-
/*!
|
|
98
|
-
* @property state
|
|
99
|
-
*
|
|
100
|
-
* @discussion Lets you know if the Flic is Connected, Disconnected, Connecting, or Disconnecting.
|
|
101
|
-
*
|
|
102
|
-
*/
|
|
103
|
-
@property(nonatomic, readonly) FLICButtonState state;
|
|
104
|
-
|
|
105
|
-
/*!
|
|
106
|
-
* @property pressCount
|
|
107
|
-
*
|
|
108
|
-
* @discussion The number of times the Flic has been clicked since last time it booted.
|
|
109
|
-
*
|
|
110
|
-
*/
|
|
111
|
-
@property(nonatomic, readonly) uint32_t pressCount;
|
|
112
|
-
|
|
113
|
-
/*!
|
|
114
|
-
* @property firmwareRevision
|
|
115
|
-
*
|
|
116
|
-
* @discussion The revision of the firmware currently running on the Flic.
|
|
117
|
-
*
|
|
118
|
-
*/
|
|
119
|
-
@property(nonatomic, readonly) uint32_t firmwareRevision;
|
|
120
|
-
|
|
121
|
-
/*!
|
|
122
|
-
* @property isReady
|
|
123
|
-
*
|
|
124
|
-
* @discussion When a Flic connects it will go through a quick cryptographic verification to ensure that it is both a genuine Flic and that it is the correct Flic.
|
|
125
|
-
* Once this is completed this property will be set to YES and it is not until after that that you will start receiving click events (if any). As soon as the button disconnects
|
|
126
|
-
* this will be set to NO again.
|
|
127
|
-
*
|
|
128
|
-
*/
|
|
129
|
-
@property(nonatomic, readonly) BOOL isReady;
|
|
130
|
-
|
|
131
|
-
/*!
|
|
132
|
-
* @property batteryVoltage
|
|
133
|
-
*
|
|
134
|
-
* @discussion This will be the last know battery sample taken on the Flic. If this value is 0 then you should assume that no sample has yet been taken. It is important to know that
|
|
135
|
-
* the voltage may fluctuate depending on many different factors, such as temperature and workload. For example, heavy usage of the LED will temporarily lower the voltage,
|
|
136
|
-
* but it is likely to recover shortly after. Therefore we do not recomend to exactly translate this value into a battery percentage, instead consider showing a
|
|
137
|
-
* "change the battery soon"-status in your app once the voltage goes below 2.65V.
|
|
138
|
-
*
|
|
139
|
-
*/
|
|
140
|
-
@property(nonatomic, readonly) float batteryVoltage;
|
|
141
|
-
|
|
142
|
-
/*!
|
|
143
|
-
* @property isUnpaired
|
|
144
|
-
*
|
|
145
|
-
* @discussion If this property is YES, then it means that this app's pairing with this specific Flic is no longer valid. This can for example occur if the Flic has been factory reset,
|
|
146
|
-
* or if the maximum number of pairings have been reached. In this case you will need to delete the button from the manager and then scan for it again.
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
@property(nonatomic, readonly) BOOL isUnpaired;
|
|
150
|
-
|
|
151
|
-
/*!
|
|
152
|
-
* @property latencyMode
|
|
153
|
-
*
|
|
154
|
-
* @discussion Lets you switch between two different latency modes. For most use-cases it is recommend to keep the default FLICLatencyModeNormal.
|
|
155
|
-
* FLICLatencyModeLow should ideally only be used for foreground applications, such as games, where low latency is needed. Keep in mind that the
|
|
156
|
-
* energy consumption will be significantly higher in the low latency mode.
|
|
157
|
-
*
|
|
158
|
-
*/
|
|
159
|
-
@property(nonatomic, readwrite) FLICLatencyMode latencyMode;
|
|
160
|
-
|
|
161
|
-
/*!
|
|
162
|
-
* @method connect
|
|
163
|
-
*
|
|
164
|
-
* @discussion Attempts to connect the Flic. If the Flic is not available, due to either being out of range or not advertising, then it will be connected once it becomes
|
|
165
|
-
* available as this call does not time out. This is often called a pending connection. It can be canceled by calling disconnect.
|
|
166
|
-
*
|
|
167
|
-
*/
|
|
168
|
-
- (void)connect;
|
|
169
|
-
|
|
170
|
-
/*!
|
|
171
|
-
* @method disconnect
|
|
172
|
-
*
|
|
173
|
-
* @discussion Disconnect a currently connected Flic or cancel a pending connection.
|
|
174
|
-
*
|
|
175
|
-
*/
|
|
176
|
-
- (void)disconnect;
|
|
177
|
-
|
|
178
|
-
@end
|
|
179
|
-
|
|
180
|
-
/*!
|
|
181
|
-
* @protocol FLICButtonDelegate
|
|
182
|
-
*
|
|
183
|
-
* @discussion The delegate of a FLICButton instance must adopt the FLICButtonDelegate protocol. All calls to the delegate methods will be on the main dispatch queue.
|
|
184
|
-
*
|
|
185
|
-
*/
|
|
186
|
-
@protocol FLICButtonDelegate <NSObject>
|
|
187
|
-
|
|
188
|
-
/*!
|
|
189
|
-
* @method buttonDidConnect:
|
|
190
|
-
*
|
|
191
|
-
* @param button The FLICButton instance that the event originated from.
|
|
192
|
-
*
|
|
193
|
-
* @discussion This method is called every time the Flic establishes a new bluetooth connection. Keep in mind that you also have to wait for the buttonIsReady: before
|
|
194
|
-
* the Flic is ready to be used.
|
|
195
|
-
*
|
|
196
|
-
*/
|
|
197
|
-
- (void)buttonDidConnect:(FLICButton *)button;
|
|
198
|
-
|
|
199
|
-
/*!
|
|
200
|
-
* @method buttonIsReady:
|
|
201
|
-
*
|
|
202
|
-
* @param button The FLICButton instance that the event originated from.
|
|
203
|
-
*
|
|
204
|
-
* @discussion This method is called after each connection once the Flic has been cryptographically verified. You will not receive any click events before this is called.
|
|
205
|
-
*
|
|
206
|
-
*/
|
|
207
|
-
- (void)buttonIsReady:(FLICButton *)button;
|
|
208
|
-
|
|
209
|
-
/*!
|
|
210
|
-
* @method button:didDisconnectWithError:
|
|
211
|
-
*
|
|
212
|
-
* @param button The FLICButton instance that the event originated from.
|
|
213
|
-
* @param error This error lets you know the reason for the disconnect. An error does not necessarily mean that something went wrong.
|
|
214
|
-
*
|
|
215
|
-
* @discussion This method is called every time the bluetooth link with the Flic is lost. This can occur for several different reasons. The most common would be that
|
|
216
|
-
* the iOS device and the Flic is no longer within range of each other.
|
|
217
|
-
*
|
|
218
|
-
*/
|
|
219
|
-
- (void)button:(FLICButton *)button didDisconnectWithError:(NSError * _Nullable)error;
|
|
220
|
-
|
|
221
|
-
/*!
|
|
222
|
-
* @method button:didFailToConnectWithError:
|
|
223
|
-
*
|
|
224
|
-
* @param button The FLICButton instance that the event originated from.
|
|
225
|
-
* @param error This error lets you know why the connection attempt failed.
|
|
226
|
-
*
|
|
227
|
-
* @discussion This method is called when a connection attempt to a button fails. This indicates that something has gone wrong and that the pending connection will not be reset.
|
|
228
|
-
*
|
|
229
|
-
*/
|
|
230
|
-
- (void)button:(FLICButton *)button didFailToConnectWithError:(NSError * _Nullable)error;
|
|
231
|
-
|
|
232
|
-
@optional
|
|
233
|
-
|
|
234
|
-
/*!
|
|
235
|
-
* @method button:didReceiveButtonDown:age:
|
|
236
|
-
*
|
|
237
|
-
* @param button The FLICButton instance that the event originated from.
|
|
238
|
-
* @param queued Whether the event is a queued event that happened before the Flic connected or if it is a real time event.
|
|
239
|
-
* @param age If the event was queued, then this will let you know the age of the event rounded to the nearest second.
|
|
240
|
-
*
|
|
241
|
-
* @discussion The Flic registered a button down event.
|
|
242
|
-
*
|
|
243
|
-
*/
|
|
244
|
-
- (void)button:(FLICButton *)button didReceiveButtonDown:(BOOL)queued age:(NSInteger)age;
|
|
245
|
-
|
|
246
|
-
/*!
|
|
247
|
-
* @method button:didReceiveButtonUp:age:
|
|
248
|
-
*
|
|
249
|
-
* @param button The FLICButton instance that the event originated from.
|
|
250
|
-
* @param queued Whether the event is a queued event that happened before the Flic connected or if it is a real time event.
|
|
251
|
-
* @param age If the event was queued, then this will let you know the age of the event rounded to the nearest second.
|
|
252
|
-
*
|
|
253
|
-
* @discussion The Flic registered a button up event.
|
|
254
|
-
*
|
|
255
|
-
*/
|
|
256
|
-
- (void)button:(FLICButton *)button didReceiveButtonUp:(BOOL)queued age:(NSInteger)age;
|
|
257
|
-
|
|
258
|
-
/*!
|
|
259
|
-
* @method button:didReceiveButtonClick:age:
|
|
260
|
-
*
|
|
261
|
-
* @param button The FLICButton instance that the event originated from.
|
|
262
|
-
* @param queued Whether the event is a queued event that happened before the Flic connected or if it is a real time event.
|
|
263
|
-
* @param age If the event was queued, then this will let you know the age of the event rounded to the nearest second.
|
|
264
|
-
*
|
|
265
|
-
* @discussion The Flic registered a button click event.
|
|
266
|
-
*
|
|
267
|
-
*/
|
|
268
|
-
- (void)button:(FLICButton *)button didReceiveButtonClick:(BOOL)queued age:(NSInteger)age;
|
|
269
|
-
|
|
270
|
-
/*!
|
|
271
|
-
* @method button:didReceiveButtonDoubleClick:age:
|
|
272
|
-
*
|
|
273
|
-
* @param button The FLICButton instance that the event originated from.
|
|
274
|
-
* @param queued Whether the event is a queued event that happened before the Flic connected or if it is a real time event.
|
|
275
|
-
* @param age If the event was queued, then this will let you know the age of the event rounded to the nearest second.
|
|
276
|
-
*
|
|
277
|
-
* @discussion The Flic registered a double click event.
|
|
278
|
-
*
|
|
279
|
-
*/
|
|
280
|
-
- (void)button:(FLICButton *)button didReceiveButtonDoubleClick:(BOOL)queued age:(NSInteger)age;
|
|
281
|
-
|
|
282
|
-
/*!
|
|
283
|
-
* @method button:didReceiveButtonHold:age:
|
|
284
|
-
*
|
|
285
|
-
* @param button The FLICButton instance that the event originated from.
|
|
286
|
-
* @param queued Whether the event is a queued event that happened before the Flic connected or if it is a real time event.
|
|
287
|
-
* @param age If the event was queued, then this will let you know the age of the event rounded to the nearest second.
|
|
288
|
-
*
|
|
289
|
-
* @discussion The Flic registered a button hold event.
|
|
290
|
-
*
|
|
291
|
-
*/
|
|
292
|
-
- (void)button:(FLICButton *)button didReceiveButtonHold:(BOOL)queued age:(NSInteger)age;
|
|
293
|
-
|
|
294
|
-
/*!
|
|
295
|
-
* @method button:didUnpairWithError:
|
|
296
|
-
*
|
|
297
|
-
* @param button The FLICButton instance that the event originated from.
|
|
298
|
-
* @param error This will always be nil at this time.
|
|
299
|
-
*
|
|
300
|
-
* @discussion The app no longer has a valid pairing with the Flic button. The isUnpaired property will now be YES and all connection
|
|
301
|
-
* attempts made will immediately fail. To fix this you need to delete the button from the manager and then re-scan it again.
|
|
302
|
-
*
|
|
303
|
-
*/
|
|
304
|
-
- (void)button:(FLICButton *)button didUnpairWithError:(NSError * _Nullable)error;
|
|
305
|
-
|
|
306
|
-
/*!
|
|
307
|
-
* @method button:didUpdateBatteryVoltage:
|
|
308
|
-
*
|
|
309
|
-
* @param button The FLICButton instance that the event originated from.
|
|
310
|
-
* @param voltage Float representation of the latest battery voltage sample.
|
|
311
|
-
*
|
|
312
|
-
* @discussion This callback will be sent once the Flic button updates its battery voltage with a new value. Typically this will occurs a few seconds
|
|
313
|
-
* after the button connects. If you show a battery indicator in you app, then this would be a good place to refresh your UI. Please
|
|
314
|
-
* see the description for the batteryVoltage property for more information.
|
|
315
|
-
*
|
|
316
|
-
*/
|
|
317
|
-
- (void)button:(FLICButton *)button didUpdateBatteryVoltage:(float)voltage;
|
|
318
|
-
|
|
319
|
-
/*!
|
|
320
|
-
* @method button:didUpdateNickname:
|
|
321
|
-
*
|
|
322
|
-
* @param button The FLICButton instance that the event originated from.
|
|
323
|
-
* @param nickname The new nickname that was sent from the Flic.
|
|
324
|
-
*
|
|
325
|
-
* @discussion If the nickname is updated by another app (including the official Flic app), then you will get this callback letting you know that the
|
|
326
|
-
* name has changed. This may either be in real time (if multiple apps are connected at the same time), or a deayed event that
|
|
327
|
-
* occurs after the button connects (if the nickname was changed while your app was not active). If your app displays this nickname,
|
|
328
|
-
* then this would be a good place to refresh your UI.
|
|
329
|
-
*
|
|
330
|
-
*/
|
|
331
|
-
- (void)button:(FLICButton *)button didUpdateNickname:(NSString *)nickname;
|
|
332
|
-
|
|
333
|
-
@end
|
|
334
|
-
|
|
335
|
-
NS_ASSUME_NONNULL_END
|