Open your app's Info.plist
Add a new key named NSLocationAlwaysUsageDescription of Type String (if it does not exist already)
Add a new key named NSLocationWhenInUseUsageDescription of Type String (if it does not exist already)
Add a new key named NSLocationAlwaysAndWhenInUseUsageDescription of Type String (if it does not exist already)
These key values will be the text displayed in location permission authorization prompts for your app. You may may customize them to fit your app.
If you are using location permissions to enable a feature in your app you may keep your existing permission dialog language. Otherwise, if you are adding permissions solely for the snippet you may use this description which has worked with Apple review and users: "Grant the Always Allow permission to enable <App> to intermittently detect Bluetooth Low Energy Beacons when you visit certain stores and restaurants. We monetize this anonymous beacon data with third parties to support continued app development."
You may use the CLLocationManager instance in AreaMetrics.swift to request location permission at the moment you believe is ideal: