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
CoreMotion #366
CoreMotion #366
Conversation
Looks good! |
For |
Ahh yes, good catch! |
Forgot to push! Those have been added @clayallsopp. Now it's time for specs. |
What's the status on this, @colinta? |
Oh I got hung up trying to write specs. There's no support for CoreMotion in the simulator, so other than making sure the methods run and don't throw errors, there's no automated testing we can do using MacBacon. But other than that, it's ready, so a quick test on a device would make me feel pretty good about it. |
…n' to 'bubble-wrap/all'
That sounds like the crazy! Here are some basic specs, and I cleaned up the motion.rb code. |
Question for y'all: should this be called 'core-motion' instead of 'motion'? I think it might be a source of confusion. I followed the lead of 'bubble-wrap/location' => CoreLocation, but in this case we end up with paths like `bubble-wrap/motion/motion/motion.rb'. wtf is that?? 😉 |
I think those sanity check specs are good enough to get it included in the library. I like paths like motion/motion/motion... it'll keep us on our toes :P |
Haha works for me! I'm compiling to device now to check things out. One more commit for the README coming in a sec, too. |
Sweet! then we can have @clayallsopp give his blessing and get more awesomeness included in BubbleWrap! |
Aw shoot, I forgot my iphone at home. Mark can you give this code a whirl? BW::Motion::accelerometer.once do |result_data, error|
NSLog("TESTING the Accelerometer
result_data: #{result_data.inspect}
error: #{error.inspect}")
end
BW::Motion::gyroscope.once do |result_data, error|
NSLog("TESTING the Gyroscope
result_data: #{result_data.inspect}
error: #{error.inspect}")
end
BW::Motion::magnetometer.once do |result_data, error|
NSLog("TESTING the Magnetometer
result_data: #{result_data.inspect}
error: #{error.inspect}")
end
BW::Motion::device.once do |result_data, error|
NSLog("TESTING the Device
result_data: #{result_data.inspect}
error: #{error.inspect}")
end Hey, and you back in CO yet??? How was Moab? Beautiful, ain't in? 😃 |
Ok, I'm done fiddling with this. Once we can do a quick on-device test (add the above code to the test delegate), I think it's ready to merge. |
Just arrived in Denver... I'll test that out as soon as I can get the provisioning profiles ported over to my new iPhone 6. |
OHHHH man now I'm jealous. |
Here's the result:
|
Oh, hmm, well the data looks good, but this was done using |
I copied and pasted your code above, but removed the newlines in the nslog statements. |
And I put it directly in my app delegate did finish launching method. |
Next mark is gonna say "And ran it on my iPhone 6, the new one, the brand new iPhone 6" |
👍 |
LGTM, very thorough work 👍 definitely merge at your discretion |
@clayallsopp @markrickert As promised! Adding specs next (and a couple more things to do), not merge ready, but wanted to have eyes on it before I got too far along.