diff --git a/Scyther Playground/Scyther Playground.xcodeproj/project.pbxproj b/Scyther Playground/Scyther Playground.xcodeproj/project.pbxproj index 8c6610e4..c38b6a46 100644 --- a/Scyther Playground/Scyther Playground.xcodeproj/project.pbxproj +++ b/Scyther Playground/Scyther Playground.xcodeproj/project.pbxproj @@ -641,7 +641,7 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/bstillitano/scyther"; requirement = { - branch = "feature/location-spoofer"; + branch = main; kind = branch; }; }; diff --git a/Scyther Playground/Scyther Playground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Scyther Playground/Scyther Playground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 910547c0..f9bd92fe 100644 --- a/Scyther Playground/Scyther Playground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Scyther Playground/Scyther Playground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "package": "Scyther", "repositoryURL": "https://github.com/bstillitano/scyther", "state": { - "branch": "feature/location-spoofer", - "revision": "d4817830c368cfbdd5179938fd088b80abca6769", + "branch": "main", + "revision": "790d03db89973b4ced00ab71a10c67cde479a9c7", "version": null } }, diff --git a/Sources/Scyther/Utilities/Location Spoofer/LocationSpoofer.swift b/Sources/Scyther/Utilities/Location Spoofer/LocationSpoofer.swift index df5b56c6..ec8b0e50 100644 --- a/Sources/Scyther/Utilities/Location Spoofer/LocationSpoofer.swift +++ b/Sources/Scyther/Utilities/Location Spoofer/LocationSpoofer.swift @@ -70,6 +70,9 @@ internal class LocationSpoofer: CLLocationManager { // MARK: - Lifecycle override func startUpdatingLocation() { + guard delegate != nil else { + return + } guard spoofingEnabled else { super.startUpdatingLocation() return @@ -163,6 +166,9 @@ internal extension LocationSpoofer { func spoofingEnabledChanged() { swizzle() guard spoofingEnabled else { + guard delegate != nil else { + return + } requestLocation() return }