-
Notifications
You must be signed in to change notification settings - Fork 52
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
Save location by GPS #6
Comments
One thing to keep in mind is that we'll have to clear out the saved zip when GPS is used, and clear out the saved GPS if zip is used. The issues view controller will have to prefer using GPS over zip, but check both. Alternatively we could use another key that specifies which location type was used: let locationType = UserDefaults.standard.string(for: UserDefaultKeys.locationType.rawValue)
if locationType == "gps" {
// use saved address
} else if locationType == "zip" {
// use zip
} else {
// nil location
} Up to you. |
For now, I'm proceeding with "when in use" permissions only. |
Yes, in fact I wish there was a “single use only” option :)
… On Feb 2, 2017, at 10:17 AM, Chris Brandow ***@***.***> wrote:
For now, I'm proceeding with "when in use" permissions only.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#6 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AADnBL2hhHiGSdkAsA-i1B2dNBum2FRDks5rYgGYgaJpZM4L0pX7>.
|
Merged
chrisbrandow
added a commit
that referenced
this issue
Feb 4, 2017
* 5C-GPSLocation * added CLLocationManager * added "when in use" authorization * lookup the returned location * added a label to display location (though perhaps it should just be an alert controller for user to confirm they want to use this address) * still need to handle persistence and the zipcode retrieval logic * 5C-GPSLocation mostly finished. need to clean up the fetching, and general cleanup * 5C-GPSLocation * cleanup unneeded init in `EditLocationViewController` * `IssuesContainerViewController` * refactored setTitle * refactored `updateWith` for zipCode and for lat/long * updated `IssuesManager` to handle zip or latLong * updated `FetchIssuesOperation to handle zip or latLong * updated execute to append zip or lat long -- confirmed both work * added LocationInfoKeys * 5C-GPSLocation * removed leftover `print` * reverted an unneeded storyboard change * * removed unneeded notification name, storyboard change * Fixes some issues discovered in the PR * removed old comments from `EditLocationViewController` * removed unneeded `self` reference in `IssuesContainerViewController` * made `self` references in VC dismissal closures `[weak self]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tap Edit Location, tap "Use My Location".
CLLocationManager
UserDefaults
, preferrably under a single key w/ a dictionary valueIssuesViewController
reads the saved location / address and passes to the fetch operation when loading issues.The text was updated successfully, but these errors were encountered: