Skip to content

Commit cd207c9

Browse files
authored
Merge pull request #2476 from transistorsoft/release-5.0.2
Release 5.0.2
2 parents 9e83df7 + 33b6211 commit cd207c9

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
# Change Log
1+
# CHANGELOG
2+
3+
## 5.0.2 — 2026-01-28
4+
* [iOS] Fix bug in iOS License Validation Failure modal dialog interfering with React Native app launching. Change to less intrusive alert mechanism.
5+
* [iOS] Fix bug returning wrong data-structure to watchPosition callback.
6+
* [iOS] Fix first-launch issue with initial call to `.start()`.
7+
* [iOS] Fix config.authorization bug (refreshPayload and refreshHeaders being ignored).
8+
* [Android] Re-factor Android activity life-cycle management. It's all done internally within SDK now. No need for react-native plugin code to manually listen to Activity lifecycle and poke the SDK when interesting events happen.
9+
* Fix bug not respecting `PersistenceConfig.geofenceTemplate`
10+
* [iOS] Fix bug in `setOdometer` not resolving its `Promise`
211

312
## 5.0.1
413
* [Android] Fix incorrect references to `TSLog.logger` in `HeadlessTask.java`, `HeadlessTaskManager.java`

RNBackgroundGeolocation.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
2727
s.preserve_paths = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json', 'RNBackgroundGeolocation.ios.js'
2828

2929
s.dependency 'CocoaLumberjack', '~> 3.8.5'
30-
s.dependency 'TSLocationManager', '~> 4.0.0'
30+
s.dependency 'TSLocationManager', '~> 4.0.10'
3131

3232
s.libraries = 'sqlite3', 'z', 'stdc++'
3333
s.resource_bundles = {

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ plugins {
44
}
55

66
// Android dependencies
7-
def DEFAULT_COMPILE_SDK_VERSION = 36
8-
def DEFAULT_TARGET_SDK_VERSION = 36
7+
def DEFAULT_COMPILE_SDK_VERSION = 35
8+
def DEFAULT_TARGET_SDK_VERSION = 35
99

1010
// Plugin dependencies
1111
def DEFAULT_PLAY_SERVICES_LOCATION_VERSION = "21.3.0"

android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,13 @@ public void onHostResume() {
326326

327327
@Override
328328
public void onHostPause() {
329-
Context context = getReactApplicationContext();
330-
TSConfig config = TSConfig.getInstance(context);
331-
if (config.getEnabled()) {
332-
TSScheduleManager.getInstance(context).oneShot(TerminateEvent.ACTION, 10000);
333-
}
329+
334330
}
335331
@Override
336332
public void onHostDestroy() {
337333
mInitialized = false;
338334
mReady = false;
339335
removeAllListeners();
340-
getAdapter().onActivityDestroy();
341336
}
342337

343338
@Override
@@ -1017,8 +1012,7 @@ public void removeListeners(double count) {
10171012
private void removeAllListeners() {
10181013
synchronized (mListeners) {
10191014
mListeners.clear();
1020-
}
1021-
getAdapter().removeListeners();
1015+
}
10221016
}
10231017

10241018
private void onLocationError(Integer code) {
@@ -1274,11 +1268,5 @@ private WritableMap getState() {
12741268

12751269
private BackgroundGeolocation getAdapter() {
12761270
return BackgroundGeolocation.getInstance(getReactApplicationContext());
1277-
}
1278-
1279-
@Override
1280-
public void onCatalystInstanceDestroy() {
1281-
mInitialized = false;
1282-
removeAllListeners();
1283-
}
1271+
}
12841272
}

ios/RNBackgroundGeolocation/RNBackgroundGeolocation.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ -(NSDictionary*)getState
363363
RCT_EXPORT_METHOD(watchPosition:(NSDictionary*)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)
364364
{
365365
TSWatchPositionRequest *request = [TSWatchPositionRequest requestWithSuccess:^(TSLocationStreamEvent *event) {
366-
[self sendEvent:EVENT_WATCHPOSITION body:[event toDictionary]];
366+
[self sendEvent:EVENT_WATCHPOSITION body:[event.locationEvent toDictionary]];
367367
} failure:^(NSError *error) {
368368
// No reject; stream API
369369
}];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22

33
"name": "react-native-background-geolocation",
4-
"version": "5.0.1",
4+
"version": "5.0.2",
55
"description": "The most sophisticated cross-platform background location-tracking & geofencing module with battery-conscious motion-detection intelligence",
66
"scripts": {
77
"build": "yarn run build:expo",

0 commit comments

Comments
 (0)