Skip to content

Commit 2bffc5d

Browse files
authored
Merge pull request #19 from SensingKit/next
Release v0.6.0
2 parents fc288ca + bdd43f6 commit 2bffc5d

127 files changed

Lines changed: 1626 additions & 472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ If applicable, add screenshots to help explain your problem.
1818

1919
**Smartphone (please complete the following information):**
2020
- Device: [e.g. iPhone X]
21-
- OS: iOS
22-
- Version [e.g. 12.0]
21+
- iOS Version [e.g. 12.0]
2322

2423
**Additional context**
2524
Add any other context about the problem here.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ profile
1616
*.moved-aside
1717
DerivedData
1818
.idea/
19-
Documentation
19+
docs/

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: objective-c
2+
osx_image: xcode10
3+
xcode_project: SensingKit.xcodeproj
4+
xcode_scheme: SensingKit
5+
xcode_destination: platform=iOS Simulator,OS=12.0,name=iPhone XS

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
### 0.6.0 (March 9, 2026)
4+
- Added support for Network Connection sensor.
5+
- Added support for Screen Brightness sensor.
6+
- Added support for iOS 26 and Xcode 26.
7+
- Renamed Battery sensor to BatteryStatus.
8+
- Added support for tracking Low Power Mode in the Battery Status sensor.
9+
- Changed the minimum supported platform to iOS 12.
10+
- Replaced appledoc documentation with Jazzy.
11+
312
### 0.5.1 (September 20, 2018)
413
- Added support for Heading sensor.
514
- Added support for iOS 12 and Xcode 10.

ESSEddystone/ESSBeaconScanner.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ - (instancetype)init {
7575

7676
- (void)startScanning {
7777
dispatch_async(_beaconOperationsQueue, ^{
78-
if (_centralManager.state != CBCentralManagerStatePoweredOn) {
78+
if (self->_centralManager.state != CBManagerStatePoweredOn) {
7979
NSLog(@"CBCentralManager state is %ld, cannot start or stop scanning",
80-
(long)_centralManager.state);
81-
_shouldBeScanning = YES;
80+
(long)self->_centralManager.state);
81+
self->_shouldBeScanning = YES;
8282
} else {
8383
NSLog(@"Starting to scan for Eddystones");
8484
NSArray *services = @[
@@ -88,7 +88,7 @@ - (void)startScanning {
8888
// We do not want multiple discoveries of the same beacon to be coalesced into one.
8989
// (Unfortunately this is ignored when we are in the background.)
9090
NSDictionary *options = @{ CBCentralManagerScanOptionAllowDuplicatesKey : @YES };
91-
[_centralManager scanForPeripheralsWithServices:services options:options];
91+
[self->_centralManager scanForPeripheralsWithServices:services options:options];
9292
}
9393
});
9494
}
@@ -100,7 +100,7 @@ - (void)stopScanning {
100100
}
101101

102102
- (void)centralManagerDidUpdateState:(CBCentralManager *)central {
103-
if (central.state == CBCentralManagerStatePoweredOn && _shouldBeScanning) {
103+
if (central.state == CBManagerStatePoweredOn && _shouldBeScanning) {
104104
[self startScanning];
105105
}
106106
}
@@ -165,12 +165,12 @@ - (void)centralManager:(CBCentralManager *)central
165165
block:
166166
^(ESSTimer *timer) {
167167
ESSBeaconInfo *lostBeaconInfo =
168-
_seenEddystoneCache[beaconInfo.beaconID][kSeenCacheBeaconInfo];
168+
self->_seenEddystoneCache[beaconInfo.beaconID][kSeenCacheBeaconInfo];
169169
if (lostBeaconInfo) {
170-
if ([_delegate respondsToSelector:@selector(beaconScanner:didLoseBeacon:)]) {
171-
[_delegate beaconScanner:self didLoseBeacon:lostBeaconInfo];
170+
if ([self->_delegate respondsToSelector:@selector(beaconScanner:didLoseBeacon:)]) {
171+
[self->_delegate beaconScanner:self didLoseBeacon:lostBeaconInfo];
172172
}
173-
[_seenEddystoneCache removeObjectForKey:beaconInfo.beaconID];
173+
[self->_seenEddystoneCache removeObjectForKey:beaconInfo.beaconID];
174174
}
175175
}];
176176

ESSEddystone/ESSTimer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@interface ESSTimer ()
2323

2424
@property(nonatomic, copy, readwrite) ESSTimerBlock block;
25-
@property(nonatomic, copy, readwrite) void(^wrappedBlock)();
25+
@property(nonatomic, copy, readwrite) void(^wrappedBlock)(void);
2626
@property(nonatomic, strong, readwrite) dispatch_queue_t queue;
2727
@property(nonatomic, assign, readwrite) NSTimeInterval delay;
2828

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ An iOS library that provides Continuous Sensing functionality to your applicatio
55

66
## Supported Sensors
77

8-
The following mobile sensors are currently supported in SensingKit-iOS, (listed in [SKSensorType](SensingKit/SKSensorType.h) enum):
8+
The following mobile sensors are currently supported in SensingKit-iOS (listed in [SKSensorType](SensingKit/SKSensorType.h) enum):
99

1010
- Accelerometer
1111
- Gyroscope
@@ -14,12 +14,14 @@ The following mobile sensors are currently supported in SensingKit-iOS, (listed
1414
- Motion Activity
1515
- Pedometer
1616
- Altimeter
17-
- Battery
17+
- BatteryStatus
1818
- Location
1919
- Heading
2020
- iBeacon™ Proximity
2121
- Eddystone™ Proximity
2222
- Microphone
23+
- Screen Brightness
24+
- Network Connection
2325

2426

2527
## Installing the Library
@@ -33,7 +35,7 @@ $ gem install cocoapods
3335
To integrate SensingKit into your Xcode project, specify it in your `Podfile`:
3436

3537
```ruby
36-
target <MyApp> do
38+
target 'MyApp' do
3739
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
3840
use_frameworks!
3941

@@ -82,30 +84,30 @@ Check if a sensor is available in the device:
8284

8385
*Objective-C*
8486
```objectivec
85-
if ([self.sensingKit isSensorAvailable:Battery]) {
87+
if ([self.sensingKit isSensorAvailable:BatteryStatus]) {
8688
// You can access the sensor
8789
}
8890
```
8991
9092
*Swift*
9193
```swift
92-
if sensingKit.isSensorAvailable(SKSensorType.Battery) {
94+
if sensingKit.isSensorAvailable(SKSensorType.BatteryStatus) {
9395
// You can access the sensor
9496
}
9597
```
9698

9799

98-
Register a sensor (e.g. a Battery sensor) as shown below:
100+
Register a sensor (e.g. a BatteryStatus sensor) as shown below:
99101

100102
*Objective-C*
101103
```objectivec
102-
[self.sensingKit registerSensor:Battery error:NULL];
104+
[self.sensingKit registerSensor:BatteryStatus error:NULL];
103105
```
104106
105107
*Swift*
106108
```swift
107109
do {
108-
try sensingKit.register(SKSensorType.Battery)
110+
try sensingKit.register(SKSensorType.BatteryStatus)
109111
}
110112
catch {
111113
// Handle error
@@ -117,24 +119,24 @@ Subscribe a sensor data handler. You can cast the data object into the actual se
117119

118120
*Objective-C*
119121
```objectivec
120-
[self.sensingKit subscribeToSensor:Battery
122+
[self.sensingKit subscribeToSensor:BatteryStatus
121123
withHandler:^(SKSensorType sensorType, SKSensorData *sensorData, NSError *error) {
122124

123125
if (!error) {
124-
SKBatteryData *batteryData = (SKBatteryData *)sensorData;
125-
NSLog(@"Battery Level: %f", batteryData.level);
126+
SKBatteryStatusData *batteryStatusData = (SKBatteryStatusData *)sensorData;
127+
NSLog(@"Battery Level: %f", batteryStatusData.level);
126128
}
127129
} error:NULL];
128130
```
129131
130132
*Swift*
131133
```swift
132134
do {
133-
try sensingKit.subscribe(to: SKSensorType.Battery, withHandler: { (sensorType, sensorData, error) in
135+
try sensingKit.subscribe(to: SKSensorType.BatteryStatus, withHandler: { (sensorType, sensorData, error) in
134136
135137
if (error == nil) {
136-
let batteryData = sensorData as! SKBatteryData
137-
print("Battery Level: \(batteryData)")
138+
let batteryStatusData = sensorData as! SKBatteryStatusData
139+
print("Battery Level: \(batteryStatusData.level)")
138140
}
139141
})
140142
}
@@ -149,25 +151,25 @@ You can Start and Stop the Continuous Sensing using the following commands:
149151
*Objective-C*
150152
```objectivec
151153
// Start
152-
[self.sensingKit startContinuousSensingWithSensor:Battery error:NULL];
154+
[self.sensingKit startContinuousSensingWithSensor:BatteryStatus error:NULL];
153155

154156
// Stop
155-
[self.sensingKit stopContinuousSensingWithSensor:Battery error:NULL];
157+
[self.sensingKit stopContinuousSensingWithSensor:BatteryStatus error:NULL];
156158
```
157159
158160
*Swift*
159161
```swift
160162
// Start
161163
do {
162-
try sensingKit.startContinuousSensing(with:SKSensorType.Battery)
164+
try sensingKit.startContinuousSensing(with:SKSensorType.BatteryStatus)
163165
}
164166
catch {
165167
// Handle error
166168
}
167169
168170
// Stop
169171
do {
170-
try sensingKit.stopContinuousSensing(with:SKSensorType.Battery)
172+
try sensingKit.stopContinuousSensing(with:SKSensorType.BatteryStatus)
171173
}
172174
catch {
173175
// Handle error
@@ -185,8 +187,11 @@ Depending on the used sensor and its configuration, some keys with a user-friend
185187
### Microphone
186188
- NSMicrophoneUsageDescription
187189

188-
### Eddystone
189-
- NSBluetoothPeripheralUsageDescription
190+
### iBeacon™ Proximity
191+
- NSBluetoothAlwaysUsageDescription (when Broadcasting only)
192+
193+
### Eddystone™ Proximity
194+
- NSBluetoothAlwaysUsageDescription
190195

191196
### Location
192197
- NSLocationAlwaysUsageDescription
@@ -201,7 +206,7 @@ Depending on the used sensor and its configuration, some keys with a user-friend
201206

202207
```
203208
Copyright (c) 2014. Kleomenis Katevas
204-
Kleomenis Katevas, k.katevas@imperial.ac.uk
209+
Kleomenis Katevas, minos.kat@gmail.com
205210
206211
This file is part of SensingKit-iOS library.
207212
For more information, please visit https://www.sensingkit.org

SensingKit.podspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "SensingKit"
19-
s.version = "0.5.1"
19+
s.version = "0.6.0"
2020
s.summary = "Mobile Sensing Framework."
2121

2222
# This description is used to generate tags and improve search results.
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
# * Write the description between the DESC delimiters below.
2626
# * Finally, don't worry about the indent, CocoaPods strips it!
2727
s.description = "<<-DESC
28-
An iOS library that provides Continuous Sensing functionality to your applications.
28+
An iOS framework that provides Mobile Sensing to your apps.
2929
DESC"
3030

3131
s.homepage = "https://www.sensingkit.org"
@@ -53,17 +53,17 @@ Pod::Spec.new do |s|
5353
# profile URL.
5454
#
5555

56-
s.author = { "Kleomenis Katevas" => 'k.katevas@qmul.ac.uk'}
56+
s.author = { "Kleomenis Katevas" => 'minos.kat@gmail.com'}
5757
s.social_media_url = "https://twitter.com/SensingKit"
58-
58+
5959

6060
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
6161
#
6262
# If this Pod runs only on iOS or OS X, then specify the platform and
6363
# the deployment target. You can optionally include the target after the platform.
6464
#
6565

66-
s.platform = :ios, "9.0"
66+
s.platform = :ios, "12.0"
6767

6868

6969
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

0 commit comments

Comments
 (0)