iOS issue using Accelerometer - Feature Not Supported

Grime 796 Reputation points
2021-02-18T09:26:12.15+00:00

The Xamarin Essentials accelerometer setting here works fine on Android and is published. It also work fine deployed directly to my iPhone 11, but doesn't work on two tested simulators:

        protected override async void OnAppearing()  
        {  
            Accelerometer.ShakeDetected += this.OnShaked;  
            Accelerometer.Start(SensorSpeed.Default);  
  
            base.OnAppearing();  
            await fvm.GetFarts();  
            FartListView.ItemsSource = fvm.FartList;  
        }  

69448-screen-shot-2021-02-18-at-71609-pm.png

Any help greatly appreciated.

Developer technologies | .NET | Xamarin
0 comments No comments

Answer accepted by question author

Anonymous
2021-02-18T10:59:35.747+00:00

Hello,​

Welcome to our Microsoft Q&A platform!

You can't test it using simulator, you should use real device for testing accelerometer.

69438-image.png

Here is Apple's document about testing on the iOS Simulator.

https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator/TestingontheiOSSimulator.html

Best Regards,

Leon Lu


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.