Closed cognitiveflux closed 9 years ago
It would be great if you could do this! We've been having difficulty getting the location working properly on ios 8 and that's probably why.
I created a branch and committed 5eba0ae2d587dd7a41b53507e22df9ee661048e1, the specs (updated) pass, though I haven't been able to test actual location updates in either the simulator or device. Is there a simple location app using BW::Location I can pull and test with?
Created pull request https://github.com/rubymotion/BubbleWrap/pull/422, though the build is failing on Travis with a *** Cannot start simulator: (null)
error. Previous pull request from another user had the same issue, not sure if it's using the latest simulator. I ran the rspec tests locally, tested on the simulator and also on a device and didn't have any observed issues.
Hey everyone,
I was just checking in to see if there was any solution to this that I've missed. I notice that I get location errors on simulator pretty often unless I rake:clean and rebuild all the time.
It works often but not all the time... randomly...
I'll end up with this error:
undefined method `coordinate' for {...}:Hash (NoMethodError)
Are you using a branch with #422? I retried several times to run the tests but running tests against master
failed and I didn't have the time to figure out what other commit was causing the tests to fail before trying to test with my branch. I ended up implementing location services without BW.
Separate issue, I know that if the simulator is left running (~ 15 minutes) it stops responding to location requests, whether using BW+422 or implementing CLLocationManagerDelegate
, so at least that much I would attribute as an issue directly with the Simulator because I have never come across it on a device.
:+1:
The
CLLocationManagerDelegate
methodlocationManager:didUpdateToLocation:fromLocation
has been deprecated since two prior major version of iOS and recommendslocationManager:didUpdateLocations
instead.While the new delegate method guarantees at least one
CLLocation
object in the response, additional objects may or may not be included.I can create a branch and implement the new delegate method, however I created this issue to collect feedback on how it should be implemented because a
result[:from]
value is no longer guaranteed as provided in this Callback.A possible implementation would require
result[:from]
to be removed and replaced with an optionalresult[:previous_locations]
, for example. Alternatively, the callback could store the previous location in an instance variable and return it forresult[:from]
in the event that thelocations
array returned by the delegate method only has one member, thus preserving theBW::Location
functionality. That being said, in the current implementationresult[:from]
will ways benil
on the first location update.