shiftinv / MotionSourceiOS

iOS App providing gyroscope/accelerometer data to various emulators
GNU Lesser General Public License v2.1
34 stars 7 forks source link

Is there a way to allow this to run in the background? #2

Open laralove143 opened 2 years ago

laralove143 commented 2 years ago

Is it possible or is it another iOS limitation? I can't use it otherwise since I use Moonlight to stream to my iPhone

khebe commented 2 years ago

I think it's impossible. Read this https://developer.apple.com/forums/thread/685525. but I want to use it on background too :>.

laralove143 commented 2 years ago

A possible workaround for this would be to add a mock PiP that users can just put away, it's obviously hacky and the little arrow in the edge will have to be there, but it should work, I can't think of any other way and I'm not sure if it'd work because I've never done iOS development

shiftinv commented 2 years ago

Thanks for the feature request! I'll be completely honest and say that I've somewhat moved on from this project and haven't used Cemu in almost a year by now, though I might still be open to try and figure out a solution. However, since iOS development requires a recent-ish Apple computer, which I currently don't have, that's unfortunately not happening any time soon.

From a quick search it seems like the best solution would be requesting background GPS location access (and ignoring those events) to keep the application running, something like this. Still, I'm afraid I currently don't have the means (or time) to update this project in any significant way. I appreciate any and all PRs that resolve this, though I understand that it's probably fairly difficult to solve; the code in its current state is also quite a mess, it started out as a sort of proof-of-concept stemming from me being frustrated by BotW gyro shrines, and never really moved on from that c: