-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed gpsLocationWith()
init with builder which does not work correctly (cannot configure get continuous GPS values)
#306
Comments
Did your request removed after the first result? Sorry I didn’t understand. |
When you first initialize Location request without options, the subscription option is set as single. Therefore, it sets evictionPolicy for continuous subscription, too. SwiftLocation/Sources/SwiftLocation/Request/Requests/GPSLocation/GPSLocationRequest.swift Line 116 in 9f9a81b
Therefore, the request is removed after first result.
|
Did the following now and it seems to be working, but don't know if that's the correct way:
AppDelegate:
Hope I didn't forgot something in the code, but with this code I'll get continous updates + Local Push Notifications with an GPX file. |
thank you for your report, I've just fixed it by changing how the builder is created and passed: @discardableResult
public func gpsLocationWith(_ optionsBuilder: ((GPSLocationOptions) -> Void)) -> GPSLocationRequest {
let options = GPSLocationOptions()
optionsBuilder(options)
return gpsLocationWith(options)
} |
gpsLocationWith()
init with builder which does not work correctly (cannot configure get continuous GPS values)
Hi,
I've looked through your demo app in version 5.0 and tried out my use case and it seems working.
But after I implement the suggested demo code from the documentation to receive continous gps data, it just does so after the first time.
I've added the following code to my viewDidLoad:
Am I missing something? Maybe do I have to add something to AppDelegate?
How do I get continous updates on this?
Thanks!
The text was updated successfully, but these errors were encountered: