iPhoneをBeaconの発信機にしようとUnityで下の無料のアセットを使っているのですが、startrangingbeaconsinregionの部分が実行されない。
使用中アセット
C#
1void Monitor() { 2// StopAdvertise(); 3 if (isMonitoring) { 4 Log("Already monitoring."); 5 return; 6 } 7 8 if (locationManager == null) { 9 locationManager = new CLLocationManager(); 10 } 11 locationManager.DidStartMonitoring += DidStartMonitoringForRegion; 12 locationManager.DidEnter += DidEnterRegion; 13 locationManager.DidExit += DidExitRegion; 14 locationManager.DidRangeBeacons += DidRangeBeacons; 15 locationManager.StartMonitoring(beaconRegion); 16 locationManager.StartRangingBeaconsInRegion(beaconRegion);//実行されない箇所 17 Log("Monitoring."); 18 isMonitoring = true; 19 }
参照リンク
ここでつまる方が割といるらしく上記リンクの回答にある通りXcodeの設定にあるBackground Modesを編集したんですが、実行すると
上記のようになってしまいます。
解決の方法ご存知の方いらっしゃいますか?