J'ai une application Xamarin.iOS où j'utilise ce guide pour utiliser la propriété ascendante CMPedometer. Voici un code pertinent sur mon application vue unique:Application iOS s'écraser sur l'utilisation des fonctions CMPedometer
CMPedometer pedometer;
...
public override async void ViewDidLoad(){
base.ViewDidLoad();
if (CMPedometer.IsFloorCountingAvailable)
{
pedometer = new CMPedometer();
//app crashes here:
pedometer.StartPedometerUpdates(new NSDate(), UpdatePedometerData);
var data = await pedometer.QueryPedometerDataAsync((NSDate)DateTime.SpecifyKind(DateTime.Now.AddHours(-24), DateTimeKind.Utc), (NSDate)DateTime.Now);
UpdatePedometerData(data, null);
}
}
Mon application se bloque très basiques lorsque je tente d'obtenir des mises à jour de mon CMPedometer avec une sortie peu d'erreur. C'est ce que j'ai:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
ce qui peut être un problème avec les autorisations de mon application? Si tel est le cas, je ne sais pas comment accorder/demander des autorisations sur l'utilisation du CDPedometer. Merci pour toute aide