Open phice opened 6 years ago
I added SetAdaptor() in AppDelegate.cs.
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
Today (2020) in iOS you also need to add some lines to info.plist
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Connection to ... require Bluetooth. Please accept the connection.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Connection to ... require Bluetooth. Please accept the connection.</string>
After that the demo worked.
using Robotics.Mobile.Core.Bluetooth.LE;
in AppDelegate.cs.
making reference and complementing the solution of: @henrikberg(up)
I've managed to get it work with Android, with IOS I get a null reference error because in the Appdelegate the adapter is not set (like in android):
App.SetAdapter(new Robotics.Mobile.Core.Bluetooth.LE.Adapter());
how can I fix it?