実現させたいこと: 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
あなたの回答
tips
プレビュー