Location:

Project Configuration & Description

Introducing System Library Files

The system library files that need to be imported include the following:

CoreLocation.framework

SystemConfiguration.framework

Security.framework

libsqlite3.0.tbd (xcode7 used to be libsqlite3.0.dylib)

CoreTelephony.framework

libc++.tbd (for iOS12, you need to update libstdc++.6.0.9.tbd to libc++.tbd)

AdSupport.framework

Click "+" in >General->Linked Frameworks and Libraries to find the above files in turn, add them to the project, and complete the import of system library files.

Request Permission

Add a targeting permission request in the project's Info.plist. According to your actual business needs, choose the following settings:

NSLocationWhenInUseUsageDescription: indicates that the application can find updated location information when it is in the foreground;

NSLocationAlwaysUsageDescription: Indicates that the application can obtain updated location data in both the foreground and the background (suspend or terminated);

NSLocationAlwaysAndWhenInUseUsageDescription: Request permanent targeting so that the app can get location data both in the foreground and in the background;

Note: iOS 11 has been updated with respect to targeting permissions settings. The targeting settings are as follows:

If you need to target during use, please set it as follows:

Configure NSLocationWhenInUseUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription in Info.plist;

If you need permanent positioning, please set it as follows:

Configure NSLocationWhenInUseUsageDescription, NSLocationAlwaysUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription in Info.plist;

Add the App Transport Security Settings field to the project's Info.plist and make the relevant settings as follows:

TOP