3
3

More than 3 years have passed since last update.

iOSでBluetoothの許可設定

Posted at

単なるメモです。
なにか作ったら、そのうちアップします。多分

やってたこと

M5StackとiPhoneで通信するiOSアプリとM5Stack側のソフト

数少ないM5StackとiOSの記事を参考にしながら、iOSアプリを作っていたわけですが、どうしてもBluetoothで通信できない。。。。

何をやって解決したか?

結論から言うと、Bluetoothを使うときの許可設定をやっていなかった。だけ
よく見る、Bluetooth使うけどOK? はい いいえ 見たいやつ。

Appの実装

「plist」を右クリック→「Open Ad」 → 「source code」
スクリーンショット 2020-03-07 14.59.58.png

以下を書き足す

Info.plist
<dict>
    <key>NSBluetoothAlwaysUsageDescription</key>   ←ここを追加
    <string>Bluetooth使うけどほんとにいいよね?</string> ←ここを追加

環境

Xcode:11.2.1
iOS: 13.3.1 (iphone 7 / X )

3
3
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3