You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by James Jong <wj...@gmail.com> on 2013/09/17 21:53:00 UTC

[iOS 7] input on accelerometer plugin implementation

Seeking some input from my fellow iOS devs...

Background:
https://issues.apache.org/jira/browse/CB-4825
UIAccelerometer has been deprecated as of iOS 5 in favor of using CoreMotion framework.
Our iOS core Accelerometer plugin uses UIAccelerometer and Xcode 5 shows warnings for using the deprecated class.

Issue:
I have a working implementation using CoreMotion but iOS 7 repeatedly issues an annoying debug message in Xcode when accelerometer is being watched.  A workaround is discussed here by shimming stderr->_write to ignore the message.
https://devforums.apple.com/message/866900#866900

What to do?  I see 3 choices:
1) Leave current code as is with warnings in Xcode 5.  Switch to CoreMotion when Apple fixes bug.
2) Implement with CoreMotion as is with debug message present.
3) Implement with CoreMotion with stderr->_write workaround.

Any preferences on the above options?  Suggestions?

-James Jong


Re: [iOS 7] input on accelerometer plugin implementation

Posted by Shazron <sh...@gmail.com>.
Thanks James,
I'm thinking, option 1 - IMO i'd rather not muck around with internal
things to workaround this. This really is an Apple thing, we could merge
your changes when Apple fixes this (file an Apple radar?)


On Tue, Sep 17, 2013 at 12:53 PM, James Jong <wj...@gmail.com> wrote:

> Seeking some input from my fellow iOS devs...
>
> Background:
> https://issues.apache.org/jira/browse/CB-4825
> UIAccelerometer has been deprecated as of iOS 5 in favor of using
> CoreMotion framework.
> Our iOS core Accelerometer plugin uses UIAccelerometer and Xcode 5 shows
> warnings for using the deprecated class.
>
> Issue:
> I have a working implementation using CoreMotion but iOS 7 repeatedly
> issues an annoying debug message in Xcode when accelerometer is being
> watched.  A workaround is discussed here by shimming stderr->_write to
> ignore the message.
> https://devforums.apple.com/message/866900#866900
>
> What to do?  I see 3 choices:
> 1) Leave current code as is with warnings in Xcode 5.  Switch to
> CoreMotion when Apple fixes bug.
> 2) Implement with CoreMotion as is with debug message present.
> 3) Implement with CoreMotion with stderr->_write workaround.
>
> Any preferences on the above options?  Suggestions?
>
> -James Jong
>
>