Skip to content

Commit 064ff0f

Browse files
committed
chore: TSLocationManager 4.0.25 (url + checksum)
1 parent e2def0b commit 064ff0f

31 files changed

Lines changed: 1911 additions & 10 deletions

CHANGELOG.md

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

3+
## 4.0.25 — 2026-03-26
4+
- Clean stale entries from Unreleased section
5+
- Add changelog generation to publish script
6+
37
## 4.0.24 — 2026-03-25
48
- Don't show location authorization nag-dialog while !config.enabled
59

Package.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ let package = Package(
1212
.iOS(.v12)
1313
],
1414
products: [
15-
// Consumers import this product.
16-
.library(name: "TSLocationManager", targets: ["TSLocationManagerKit"])
15+
// Consumers: import BackgroundGeolocation
16+
.library(name: "BackgroundGeolocation", targets: ["BackgroundGeolocation"])
1717
],
1818
dependencies: [
1919
// SPM dependency on TSBackgroundFetch (allow patch updates)
@@ -25,18 +25,18 @@ let package = Package(
2525
targets: [
2626
.binaryTarget(
2727
name: "TSLocationManager",
28-
url: "https://github.com/transistorsoft/native-background-geolocation/releases/download/4.0.24/TSLocationManager.xcframework.zip",
29-
checksum: "62d44df5de0187258bb168805b6b0d0fa1336438c46625547013780d440bf869"
28+
url: "https://github.com/transistorsoft/native-background-geolocation/releases/download/4.0.25/TSLocationManager.xcframework.zip",
29+
checksum: "7c560255be9e75db044d958ea72933a343289290df228f757fc1a6f9767e80f3"
3030
),
3131

32-
// Wrapper Swift target that reexports the binary + TSBackgroundFetch
32+
// Swift overlay that reexports the binary + TSBackgroundFetch
3333
.target(
34-
name: "TSLocationManagerKit",
34+
name: "BackgroundGeolocation",
3535
dependencies: [
3636
"TSLocationManager",
3737
.product(name: "TSBackgroundFetch", package: "transistor-background-fetch")
3838
],
39-
path: "Sources/TSLocationManagerKit"
39+
path: "Sources/BackgroundGeolocation"
4040
)
4141
]
4242
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// ----------------------- AUTO-GENERATED -----------------------
2+
// DO NOT EDIT DIRECTLY. This file is generated by publish-ios.sh
3+
// --------------------------------------------------------------
4+
5+
@_exported import TSBackgroundFetch
6+
@_exported import TSLocationManager
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// App.swift
3+
// TSLocationManager
4+
//
5+
6+
import UIKit
7+
import TSLocationManager
8+
9+
extension BGGeo {
10+
public class App {
11+
private let manager = BackgroundGeolocation.sharedInstance()
12+
13+
init() {}
14+
15+
public func createBackgroundTask() -> UIBackgroundTaskIdentifier {
16+
manager.createBackgroundTask()
17+
}
18+
19+
public func stopBackgroundTask(_ taskId: UIBackgroundTaskIdentifier) {
20+
manager.stopBackgroundTask(taskId)
21+
}
22+
23+
public var isPowerSaveMode: Bool {
24+
manager.isPowerSaveMode()
25+
}
26+
}
27+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//
2+
// Authorization.swift
3+
// TSLocationManager
4+
//
5+
6+
import Foundation
7+
import TSLocationManager
8+
9+
extension BGGeo {
10+
public class Authorization {
11+
private let manager = BackgroundGeolocation.sharedInstance()
12+
13+
init() {}
14+
15+
public func getState() -> BGGeo.ProviderChangeEvent {
16+
BGGeo.ProviderChangeEvent(manager.getProviderState())
17+
}
18+
19+
public func requestPermission() async throws -> Int {
20+
try await withCheckedThrowingContinuation { continuation in
21+
manager.requestPermission(
22+
{ status in continuation.resume(returning: status.intValue) },
23+
failure: { status in
24+
continuation.resume(throwing: NSError(
25+
domain: "BGGeo", code: status.intValue,
26+
userInfo: [NSLocalizedDescriptionKey: "Permission denied: \(status)"]
27+
))
28+
}
29+
)
30+
}
31+
}
32+
33+
public func requestTemporaryFullAccuracy(purpose: String) async throws -> Int {
34+
try await withCheckedThrowingContinuation { continuation in
35+
manager.requestTemporaryFullAccuracy(purpose,
36+
success: { continuation.resume(returning: Int($0)) },
37+
failure: { continuation.resume(throwing: $0) }
38+
)
39+
}
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)