LoginSignup
13
4

More than 5 years have passed since last update.

iOS12以降でCNCopyCurrentNetworkInfo() の注意点

Last updated at Posted at 2018-09-13

まとめ

iOS12以降、CNCopyCurrentNetworkInfo()でSSIDなどの情報を取得するには、Capablitiesで"Access Wifi Information"を追加する必要があります。

どうしてこうなった

CNCopyCurrentNetworkInfo()のDiscussionから抜粋。

Important

To use this function in iOS 12 and later, enable the Access WiFi Information capability for your app in Xcode. When you enable this capability, Xcode automatically adds the Access WiFi Information entitlement to your entitlements file and App ID.

対策

プロジェクトのTargets -> CapablitiesAccess Wifi InformationをONにします。

Capablities.png

13
4
0

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
13
4