-
Notifications
You must be signed in to change notification settings - Fork 208
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
Updated CLLocationManagerDelegate method for locationManager:didUpdateLocations #422
Updated CLLocationManagerDelegate method for locationManager:didUpdateLocations #422
Conversation
I hate it when Travis fails and you look at the log and see zero errors and exit status: 0. 😒 Re-running the build. |
It looks like the failure is actually nothing related to this PR... |
Sorry it took me so long to check this out... this fixes my problem! I also tested it in iOS 7 and it appears to be working just fine when built with the iOS 8.1 SDK. Can you rebase master into your branch so all other tests pass (there were some issues with UIAlertView tests in iOS 8 that I fixed in Then we'll get this merged asap and release a new version. Thanks so much for doing the legwork on this, @cognitiveflux! |
Looks OK. It's always starting with a position and on the iPhone 4S(8.0.2) it works flawless. |
Reset the simulator, quit it and then Glad to get some more confirmation here that this is working! |
@markrickert yeah. I did all of that...
|
But that just happens when you manually change your location in the debug menu of the sim, correct? |
No idea why the build is failing on Travis again, no changes to the branch other than a rebase ... |
@markrickert Yes. It's happening when I change the location in the simulator(Xcode 6.0.1) |
Travis is a fickle mistress. I'll reinit another build on this branch. |
Looking at the commit history and trying to keep it clean, not sure if you want me to create a new branch and resubmit a pull request, let me know |
I'm OK leaving as is... we all personally have a sordid past of things we'd rather forget... why not BubbleWrap too!!? 😁 |
@cognitiveflux you can |
@otzy007 pretty sure I figured out why you're getting that error, let me guess, you're using significant change tracking? Actually surprised this hasn't been reported more, these lines only restart immediate location tracking, they don't restart significant change tracking, I'll make the change and add it to this pull request |
Yeah, I don’t think this will be an issue since it seems to work just fine on the device… the only time the app would stop tracking and return an error would be if the user turned off their phone, went a long distance, then turned it back on. In which case, your app wouldn’t likely be active anymore anyways. |
d0c2a39
to
388f201
Compare
*Changed locationManager:didUpdateToLocation:fromLocation to locationManager:didUpdateLocations. *Preserved callback result[:from] key-value by storing previous location in an instance variable. *Added result[:previous] to include additional locations returned by the delegate method. *Updated inline documentation for location.rb *Updated spec BW::Location
388f201
to
0a89cf3
Compare
I'll create a separate pull request for the restart patch since it has nothing to do with the location services deprecated method. Local tests are failing on a test nothing related to location services: .window
- returns UIApplication.sharedApplication.keyWindow [FAILED - UIWindow.==(UIView) failed] |
Re the failure - are you running xcode 6.0.1 and ios 8.1? Apple did some weird things with the way alertviews work in ios 8. |
I am, however Travis is failing with the same one, looks like it's this spec |
@cognitiveflux I'm using just BW::Location.get without any parameters. |
Finally getting around to merging this so i can release a new version. Sorry about the delay and thanks for the contribution! |
…didUpdateLocations Updated CLLocationManagerDelegate method for locationManager:didUpdateLocations
Updated
CLLocationManagerDelegate
methods forlocationManager:didUpdateLocations
*Changed
locationManager:didUpdateToLocation:fromLocation
tolocationManager:didUpdateLocations
*Preserved callback
result[:from]
key-value by storing previous location in an instance variable*Added
result[:previous]
to include additional locations returned by the delegate method*Updated inline documentation for
location.rb
*Updated spec
BW::Location
*Updated
README.md
with information about 'result[:previous]' valueUpdated RSpec tests passed, tested on iOS Simulator 8.0 (iPhone 6) and iPhone 4S (iOS 8.0.2) device, compiled with RubyMotion 2.34.