LoginSignup
38
37

More than 5 years have passed since last update.

iBeaconを使用前に設定しとくこと

Last updated at Posted at 2014-10-07

iBeaconだけではないと思いますが、位置情報使ったアプリを作るときに、まずやっとく設定があり、ぐぐっても出てこなかったので残しておきます。(ここには書いてありますCLLocationManager)

やること

2014/10/08修正

135yshrさんに教えていただいたブログでようやっと理解できたので、修正しました。

info.plistに「NSLocationWhenInUseUsageDescription」か、「NSLocationAlwaysUsageDescription」を入れます。TypeはString、Valueは説明文。

kobito.1412767032.650530.png

設定すると、アプリ起動時に出てくる位置情報取得の確認ポップや、設定画面の位置情報に下のように出てくる。

  • NSLocationWhenInUseUsageDescription: このApp使用中のみ許可
  • NSLocationAlwaysUsageDescription: 常に許可

Appの説明に、Valueに設定した説明文が表示されます。やたー

kobito.1412767488.534724.png

info.plistの設定はいつも適当なので、ちゃんと調べたいです。。。

38
37
2

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
38
37