Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9dee3d3
Renamed Battery sensor to BatteryStatus
minoskt Oct 31, 2018
39d5369
Fix typo
minoskt Nov 17, 2018
a532c63
Create .travis.yml
minoskt Nov 26, 2018
fee88b8
Update .travis.yml
minoskt Nov 26, 2018
6fa41ea
Update .travis.yml
minoskt Nov 26, 2018
c39da38
Update .travis.yml
minoskt Nov 26, 2018
69a9d65
Update .travis.yml
minoskt Nov 26, 2018
70c578c
Update travis
minoskt Nov 26, 2018
6165f2b
Update .travis.yml
minoskt Nov 26, 2018
1fd2f6d
Update .travis.yml
minoskt Nov 26, 2018
4572193
Update bug_report.md
minoskt Nov 27, 2018
6f181c7
Change author property
minoskt Nov 11, 2019
1efdb33
Migrate to new Xcode 11.2
minoskt Nov 11, 2019
4c26313
Change organisation name
minoskt Nov 11, 2019
925d3d2
Add support for iOS 14 and Xcode 12; drop support for < iOS 12
minoskt Jul 20, 2021
89f9c21
Fix import warnings
minoskt Jul 20, 2021
6e545c0
Fix warnings about CBCentralManagerStatePoweredOn
minoskt Jul 20, 2021
3a067b9
Fix more warnings in ESSBeaconScanner
minoskt Jul 20, 2021
ad81f8f
Fix warning in ESSTimer
minoskt Jul 20, 2021
b6b0087
Do not target macOS
minoskt Jul 20, 2021
99c3627
Draft camera implementation (not compiling)
minoskt Jul 20, 2021
431a9b5
Change email in Copyright
minoskt Jul 20, 2021
ae0fa42
Remove duplicate header
minoskt Jul 20, 2021
4359cb9
Remove Camera draft
minoskt Mar 16, 2022
a3680bf
Xcode 15 compatibility fixes
minoskt Apr 3, 2024
10727b0
Update README
minoskt Apr 3, 2024
e52ee98
Update podspec
minoskt Apr 3, 2024
83b1c35
Add support for ScreenBrightness sensor
minoskt Apr 10, 2024
20cd5c1
Fix incorrect number of sensors
minoskt Apr 10, 2024
253f6cc
Remove Camera from tests
minoskt Apr 10, 2024
92a267b
Fix ScreenBrightness issues (and tests)
minoskt Apr 10, 2024
a29eb98
Fix csvHeader issue
minoskt Apr 10, 2024
aee6702
Update descriptors
minoskt Apr 10, 2024
c181f0f
Fix test name
minoskt Apr 10, 2024
8697917
Add draft implementation of NetworkConnection
minoskt Apr 10, 2024
ffe50c9
Update README.md
minoskt Apr 10, 2024
a2694eb
Add draft support for data consumption
minoskt Apr 25, 2024
8b04f06
Fix incorrect class types
minoskt Apr 25, 2024
5d0b2c0
Update CHANGELOG.md
minoskt Apr 25, 2024
98c6c09
Fixes to handle cumulative data changes
minoskt Apr 25, 2024
cb09c61
Report cumulative data properly; code refinements
minoskt Apr 25, 2024
ffee4c9
Add proper info
minoskt Apr 25, 2024
ad0bd79
Use jazzy for docs
minoskt Apr 26, 2024
9b54f23
Report lowPowerMode in Battery Status sensor
minoskt Apr 30, 2024
95f31f2
Update (internal) method naming
minoskt Apr 30, 2024
07ddd41
Update README.md
minoskt Mar 8, 2026
f2ec983
Update CHANGELOG.md
minoskt Mar 8, 2026
d584483
Fix incorrect error code
minoskt Mar 8, 2026
2f1455e
Add documentation on NetworkConnSensor
minoskt Mar 8, 2026
dd14e67
Fix strong ref issue
minoskt Mar 8, 2026
7c7df53
Update CHANGELOG.md
minoskt Mar 8, 2026
bdd43f6
Update CHANGELOG.md
minoskt Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ If applicable, add screenshots to help explain your problem.

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone X]
- OS: iOS
- Version [e.g. 12.0]
- iOS Version [e.g. 12.0]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ profile
*.moved-aside
DerivedData
.idea/
Documentation
docs/
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: objective-c
osx_image: xcode10
xcode_project: SensingKit.xcodeproj
xcode_scheme: SensingKit
xcode_destination: platform=iOS Simulator,OS=12.0,name=iPhone XS
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

### 0.6.0 (March 9, 2026)
- Added support for Network Connection sensor.
- Added support for Screen Brightness sensor.
- Added support for iOS 26 and Xcode 26.
- Renamed Battery sensor to BatteryStatus.
- Added support for tracking Low Power Mode in the Battery Status sensor.
- Changed the minimum supported platform to iOS 12.
- Replaced appledoc documentation with Jazzy.

### 0.5.1 (September 20, 2018)
- Added support for Heading sensor.
- Added support for iOS 12 and Xcode 10.
Expand Down
18 changes: 9 additions & 9 deletions ESSEddystone/ESSBeaconScanner.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ - (instancetype)init {

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

- (void)centralManagerDidUpdateState:(CBCentralManager *)central {
if (central.state == CBCentralManagerStatePoweredOn && _shouldBeScanning) {
if (central.state == CBManagerStatePoweredOn && _shouldBeScanning) {
[self startScanning];
}
}
Expand Down Expand Up @@ -165,12 +165,12 @@ - (void)centralManager:(CBCentralManager *)central
block:
^(ESSTimer *timer) {
ESSBeaconInfo *lostBeaconInfo =
_seenEddystoneCache[beaconInfo.beaconID][kSeenCacheBeaconInfo];
self->_seenEddystoneCache[beaconInfo.beaconID][kSeenCacheBeaconInfo];
if (lostBeaconInfo) {
if ([_delegate respondsToSelector:@selector(beaconScanner:didLoseBeacon:)]) {
[_delegate beaconScanner:self didLoseBeacon:lostBeaconInfo];
if ([self->_delegate respondsToSelector:@selector(beaconScanner:didLoseBeacon:)]) {
[self->_delegate beaconScanner:self didLoseBeacon:lostBeaconInfo];
}
[_seenEddystoneCache removeObjectForKey:beaconInfo.beaconID];
[self->_seenEddystoneCache removeObjectForKey:beaconInfo.beaconID];
}
}];

Expand Down
2 changes: 1 addition & 1 deletion ESSEddystone/ESSTimer.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@interface ESSTimer ()

@property(nonatomic, copy, readwrite) ESSTimerBlock block;
@property(nonatomic, copy, readwrite) void(^wrappedBlock)();
@property(nonatomic, copy, readwrite) void(^wrappedBlock)(void);
@property(nonatomic, strong, readwrite) dispatch_queue_t queue;
@property(nonatomic, assign, readwrite) NSTimeInterval delay;

Expand Down
47 changes: 26 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ An iOS library that provides Continuous Sensing functionality to your applicatio

## Supported Sensors

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

- Accelerometer
- Gyroscope
Expand All @@ -14,12 +14,14 @@ The following mobile sensors are currently supported in SensingKit-iOS, (listed
- Motion Activity
- Pedometer
- Altimeter
- Battery
- BatteryStatus
- Location
- Heading
- iBeacon™ Proximity
- Eddystone™ Proximity
- Microphone
- Screen Brightness
- Network Connection


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

```ruby
target <MyApp> do
target 'MyApp' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!

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

*Objective-C*
```objectivec
if ([self.sensingKit isSensorAvailable:Battery]) {
if ([self.sensingKit isSensorAvailable:BatteryStatus]) {
// You can access the sensor
}
```

*Swift*
```swift
if sensingKit.isSensorAvailable(SKSensorType.Battery) {
if sensingKit.isSensorAvailable(SKSensorType.BatteryStatus) {
// You can access the sensor
}
```


Register a sensor (e.g. a Battery sensor) as shown below:
Register a sensor (e.g. a BatteryStatus sensor) as shown below:

*Objective-C*
```objectivec
[self.sensingKit registerSensor:Battery error:NULL];
[self.sensingKit registerSensor:BatteryStatus error:NULL];
```

*Swift*
```swift
do {
try sensingKit.register(SKSensorType.Battery)
try sensingKit.register(SKSensorType.BatteryStatus)
}
catch {
// Handle error
Expand All @@ -117,24 +119,24 @@ Subscribe a sensor data handler. You can cast the data object into the actual se

*Objective-C*
```objectivec
[self.sensingKit subscribeToSensor:Battery
[self.sensingKit subscribeToSensor:BatteryStatus
withHandler:^(SKSensorType sensorType, SKSensorData *sensorData, NSError *error) {

if (!error) {
SKBatteryData *batteryData = (SKBatteryData *)sensorData;
NSLog(@"Battery Level: %f", batteryData.level);
SKBatteryStatusData *batteryStatusData = (SKBatteryStatusData *)sensorData;
NSLog(@"Battery Level: %f", batteryStatusData.level);
}
} error:NULL];
```

*Swift*
```swift
do {
try sensingKit.subscribe(to: SKSensorType.Battery, withHandler: { (sensorType, sensorData, error) in
try sensingKit.subscribe(to: SKSensorType.BatteryStatus, withHandler: { (sensorType, sensorData, error) in

if (error == nil) {
let batteryData = sensorData as! SKBatteryData
print("Battery Level: \(batteryData)")
let batteryStatusData = sensorData as! SKBatteryStatusData
print("Battery Level: \(batteryStatusData.level)")
}
})
}
Expand All @@ -149,25 +151,25 @@ You can Start and Stop the Continuous Sensing using the following commands:
*Objective-C*
```objectivec
// Start
[self.sensingKit startContinuousSensingWithSensor:Battery error:NULL];
[self.sensingKit startContinuousSensingWithSensor:BatteryStatus error:NULL];

// Stop
[self.sensingKit stopContinuousSensingWithSensor:Battery error:NULL];
[self.sensingKit stopContinuousSensingWithSensor:BatteryStatus error:NULL];
```

*Swift*
```swift
// Start
do {
try sensingKit.startContinuousSensing(with:SKSensorType.Battery)
try sensingKit.startContinuousSensing(with:SKSensorType.BatteryStatus)
}
catch {
// Handle error
}

// Stop
do {
try sensingKit.stopContinuousSensing(with:SKSensorType.Battery)
try sensingKit.stopContinuousSensing(with:SKSensorType.BatteryStatus)
}
catch {
// Handle error
Expand All @@ -185,8 +187,11 @@ Depending on the used sensor and its configuration, some keys with a user-friend
### Microphone
- NSMicrophoneUsageDescription

### Eddystone
- NSBluetoothPeripheralUsageDescription
### iBeacon™ Proximity
- NSBluetoothAlwaysUsageDescription (when Broadcasting only)

### Eddystone™ Proximity
- NSBluetoothAlwaysUsageDescription

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

```
Copyright (c) 2014. Kleomenis Katevas
Kleomenis Katevas, k.katevas@imperial.ac.uk
Kleomenis Katevas, minos.kat@gmail.com

This file is part of SensingKit-iOS library.
For more information, please visit https://www.sensingkit.org
Expand Down
10 changes: 5 additions & 5 deletions SensingKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "SensingKit"
s.version = "0.5.1"
s.version = "0.6.0"
s.summary = "Mobile Sensing Framework."

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

s.homepage = "https://www.sensingkit.org"
Expand Down Expand Up @@ -53,17 +53,17 @@ Pod::Spec.new do |s|
# profile URL.
#

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


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

s.platform = :ios, "9.0"
s.platform = :ios, "12.0"


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
Loading