質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Bluetooth

Bluetoothとは短距離の間でデータを交換するための無線通信規格である。固定・モバイル両方のデバイスから、短波の電波送信を行うことで、高いセキュリティをもつパーソナルエリアネットワーク(PAN)を構築する。

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Q&A

0回答

1644閲覧

ios10の実機にビルドしてbluetooth機能を起動させたい

mizugasira

総合スコア29

Bluetooth

Bluetoothとは短距離の間でデータを交換するための無線通信規格である。固定・モバイル両方のデバイスから、短波の電波送信を行うことで、高いセキュリティをもつパーソナルエリアネットワーク(PAN)を構築する。

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

0グッド

0クリップ

投稿2017/02/09 06:21

編集2017/02/09 06:35

実現させたいこと: ios10の実機にコードをビルドさせてその際に、bluetoothを起動させalert表示をしたい。

開発環境:

macOS Sierra version 10.12.3
Xcode 8
iOS10 (実機)

今xcode8を使い実機のios10にビルドさせているのですが、その際にbluetoothを起動させようとしているのですがうまくいっていません。
記事などや助言などでinfo.plistに記述しなければいけないと書いてあったのですが同じように書いてもうまく行きませんでした。

他のやり方でbluetoothを起動させることは可能なのでしょうか。それともinfo.plistの書き方が適切ではないのでしょうか。
どうかよろしくお願いいたします。

↓info.plistです

plist

1<?xml version="1.0" encoding="UTF-8"?> 2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3<plist version="1.0"> 4<dict> 5 <key>NSCameraUsageDescription</key> 6 <string>カメラの撮影時に必須です</string> 7 <key>CFBundleDevelopmentRegion</key> 8 <string>en</string> 9 <key>CFBundleDisplayName</key> 10 <string>$(PRODUCT_NAME)</string> 11 <key>CFBundleExecutable</key> 12 <string>$(EXECUTABLE_NAME)</string> 13 <key>CFBundleIdentifier</key> 14 <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> 15 <key>CFBundleInfoDictionaryVersion</key> 16 <string>6.0</string> 17 <key>CFBundleName</key> 18 <string>$(PRODUCT_NAME)</string> 19 <key>CFBundlePackageType</key> 20 <string>APPL</string> 21 <key>CFBundleShortVersionString</key> 22 <string>1.0</string> 23 <key>CFBundleSignature</key> 24 <string>????</string> 25 <key>CFBundleVersion</key> 26 <string>1</string> 27 <key>LSRequiresIPhoneOS</key> 28 <true/> 29 <key>NSBluetoothPeripheralUsageDescription</key> 30 <string>$(PRODUCT_NAME) Bluetooth Peripheral use</string> 31 <key>UIBackgroundModes</key> 32 <array> 33 <string>bluetooth-central</string> 34 <string>bluetooth-peripheral</string> 35 <string>location</string> 36 </array> 37 <key>UILaunchStoryboardName</key> 38 <string>LaunchScreen</string> 39 <key>UIMainStoryboardFile</key> 40 <string>Main</string> 41 <key>UIRequiredDeviceCapabilities</key> 42 <array> 43 <string>bluetooth-le</string> 44 <string>armv7</string> 45 </array> 46 <key>UIStatusBarTintParameters</key> 47 <dict> 48 <key>UINavigationBar</key> 49 <dict> 50 <key>Style</key> 51 <string>UIBarStyleDefault</string> 52 <key>Translucent</key> 53 <false/> 54 </dict> 55 </dict> 56 <key>UISupportedInterfaceOrientations</key> 57 <array> 58 <string>UIInterfaceOrientationPortrait</string> 59 <string>UIInterfaceOrientationLandscapeLeft</string> 60 <string>UIInterfaceOrientationLandscapeRight</string> 61 </array> 62 <key>UISupportedInterfaceOrientations~ipad</key> 63 <array> 64 <string>UIInterfaceOrientationPortrait</string> 65 <string>UIInterfaceOrientationPortraitUpsideDown</string> 66 <string>UIInterfaceOrientationLandscapeLeft</string> 67 <string>UIInterfaceOrientationLandscapeRight</string> 68 </array> 69</dict> 70</plist> 71

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

t_obara

2017/02/09 06:26

Bluetoothの起動とは、具体的にどのような状態になることを意味されていますか?
mizugasira

2017/02/09 06:32

tomohiro_obaraさん、ご指摘ありがとうございます。具体的にはinfo.plistのvalueに書いた文章がalert表示されればいいかなと思っております。
t_obara

2017/02/28 08:23

想定しているのは、ペリフェラルでしょうか?それともセントラル?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問