Skip to content
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

Should only stop relevant regions #7

Open
asowers1 opened this issue Nov 28, 2017 · 3 comments
Open

Should only stop relevant regions #7

asowers1 opened this issue Nov 28, 2017 · 3 comments
Labels

Comments

@asowers1
Copy link
Contributor

When BackgroundLocationManager calls ClearRegions, all monitored locations in CoreLocation are being stopped. If users creates a RegionConfig with less than the maximum region per sandboxed app (20), then any other regions that app was monitoring via CoreLocation would also be stopped.

fileprivate func clearRegions() {
        locationManager.monitoredRegions.forEach { region in
            locationManager.stopMonitoring(for: region)
        }
}
@yoman07 yoman07 added the bug label Dec 6, 2017
@yoman07
Copy link
Owner

yoman07 commented Dec 6, 2017

Great catch @asowers1 . We should fix it. You're welcome to create a PR with it.

@candangios
Copy link

app not working when backdround:
` if launchOptions?[UIApplicationLaunchOptionsKey.location] != nil {
// BackgroundDebug().write(string: "UIApplicationLaunchOptionsLocationKey")

        backgroundLocationManager.startBackground() { result in
            if case let .Success(location) = result {
                //                    LocationLogger().writeLocationToFile(location: location)
                if DataManager.shareManager.currentAccount != nil{
                    
                    NetworkManager.shareManager.postSEND_LOCATION(phone:(DataManager.shareManager.currentAccount?.PHONE)! , longitude: String(location.coordinate.longitude), latitude:String(location.coordinate.latitude)) { (success, _, _) in
                        print(success)
                    }
                    
                }
                
            }
        }
    }`

@yawboafo
Copy link

@candangios any solution for your problem im facing the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants