Closed cognitiveflux closed 9 years ago
I hate it when Travis fails and you look at the log and see zero errors and exit status: 0. :unamused:
Re-running the build.
It looks like the failure is actually nothing related to this PR... The command "bundle exec rake spec" exited with 2.
It's the UIActionSheet
that's causing the issue. I'll try and sort it out in the main BW repo.
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 master
).
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. Only on the simulator I get {:error => 3} when I change the location, for example from City Run to Apple and then back to City Run.
Reset the simulator, quit it and then rake clean:all && bundle install && rake pod:install && rake
and see if that fixes the issue in the sim. My new gem might help you with this :) https://github.com/MohawkApps/reset-sim
Glad to get some more confirmation here that this is working!
@markrickert yeah. I did all of that...
{:to=>#<CLLocation:0x11cb0b90>, :from=>#<CLLocation:0x11ee7fe0>, :previous=>[]}
{:to=>#<CLLocation:0x18e03560>, :from=>#<CLLocation:0x11cb0b90>, :previous=>[]}
{:error=>3}
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!!? :grin:
@cognitiveflux you can rebase HEAD~6 -i
and instead of pick for the last 5 you put "f". This way it will make a single commit.
@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.
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.
This bug that I'm having in the simulator, kCLErrorDomain code=0
, happens in the RubyMotionSamples repo too. It's probably a simulator bug.
I'm all :+1: :+1: to merge it :wink:
@otzy007 would you mind trying your test against https://github.com/rubymotion/BubbleWrap/pull/432 to see if that resolves it?
Finally getting around to merging this so i can release a new version. Sorry about the delay and thanks for the contribution!
Updated
CLLocationManagerDelegate
methods forlocationManager:didUpdateLocations
Changed
locationManager:didUpdateToLocation:fromLocation
tolocationManager:didUpdateLocations
Preserved callbackresult[:from]
key-value by storing previous location in an instance variable Addedresult[:previous]
to include additional locations returned by the delegate method Updated inline documentation forlocation.rb
Updated specBW::Location
UpdatedREADME.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.