i am trying to use BLE plugin to find bluetooth device, and i want to show
all devices have find.
i have problem when i try to create an alert box to show my Bluetooth data.
this is the error when i try to deploy on IOS.
and here is my code, i cannot see any problem on my code
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { BLE } from '@ionic-native/ble';
import { AlertController } from 'ionic-angular';
/**
* Generated class for the WalkieTalkiePage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@Component({
selector: 'page-walkie-talkie',
templateUrl: 'walkie-talkie.html',
})
export class WalkieTalkiePage {
constructor(private ble: BLE, public alertCtrl: AlertController) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad WalkieTalkiePage',);
}
startScan(){
var searchedDevices = this.ble.startScan([]);
console.log(searchedDevices);
let alert = this.alertCtrl.create({
title: 'New Friend!',
subTitle: searchedDevices,
buttons: ['OK']
});
alert.present();
}
}
thanks for the time to reading this