-
Notifications
You must be signed in to change notification settings - Fork 673
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
Record location with CLLocationManager if permission given by user #107
Conversation
@vadymmarkov @RamonGilabert what do you guys think? |
Hey @fnakstad! Thank's for your contribution. Have a question about this. Could we make it optional to use? One of the problems that we have with ImagePicker, or with any photos app really is that iOS asks you two permissions to grab images, the access to the camera and access to the library. I personally am very skeptical about those pop ups that appear, they are very aggressive to the user. Putting one more seems a bit harsh, if we put this as an optional thing, then it would be perfect, what do you think? |
Yea, that's a point I was considering myself, and it actually is optional the way it works right now. If the |
@fnakstad what if you use location for other things in your application, like showing maps etc. This would mean that your application would be configured to use it but you don't have the fine-grained control that you might want. Hope I didn't misread your previous messages. You could make it a configuration that defaults to So that would actually fulfill both needs but handling edge-cases before they appear might not be what we want. Regardless on what we land on, I think there should be a paragraph about this in the README. What do you guys think? @vadymmarkov @RamonGilabert |
That's a very good point @zenangst! If the user already has authorized your app to use Location Services some other place in your app (e.g. map), then it won't prompt you again for permission to use it for the camera. But I guess we're talking about the possible case where someone wants to use Location Services for a map or something, but actively does not want the camera to fetch location, in which case we need a configuration setting in the library. It seems like an uncommon scenario, but I'd be happy to make the changes if you'd rather have it work this way. |
@fnakstad mind fixing the merge conflicts? ^^ |
Should be fixed now! |
The more I thought about it the more sense it makes to have an explicit configuration option, so I went ahead and added it. Sorry it took so long, but it's been busy the last few days :( |
Can Disable Camera Rotation
…o gps-tag-support
Thanks for the feedback! Went ahead an implemented the changes. |
Record location with CLLocationManager if permission given by user
@fnakstad this is great! thanks a lot for all the hard work you have put into this PR 😎 |
Awesome :) Already using it in my own app, so I'm hoping it proves useful to others as well. |
Hi guys, thanks for this awesome library and PR. Was just wondering what the best way is to extract the location data in the I tried using the sample code here: But the |
Here's a proposed fix for #102 which I posted the other day. Some notes about this solution:
NSLocationWhenInUseUsageDescription
key in Info.plist must be set to whatever message should be displayed when requesting Location Services access from the user. If this key is not set, CLLocationManager will not attempt to fetch new locations.startUpdatingLocation()
andstopUpdatingLocation()
were used rather thanrequestLocationUpdate()
in order to get a location fix more quickly.As always, thanks for maintaining this project, and hoping this is helpful :)