I have submitted my app for review, but it got rejected for the following reason:
Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
We noticed that your app requests the user’s consent to access the location, but doesn’t sufficiently explain the use of the location in the purpose string. To help users make informed decisions about how their data is used, permission request alerts need to explain and include an example of how your app will use the requested information.
My App uses the LocationButton
provided by apple for a one time use of their location. I have googled around and still haven't found anything. I have added all of the info.plist blocks under "Privacy-Location" but still nothing.
Location Button:
final class ContentViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
@Published var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 40, longitude: 120), span: MKCoordinateSpan(latitudeDelta: 100, longitudeDelta: 100))
let locationManager = CLLocationManager()
override init() {
super.init()
locationManager.delegate = self
}
func requestAllowOnceLocationPermission() {
locationManager.requestLocation()
}
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
guard let latestLocation = locations.first else {
// show an error
return
}
DispatchQueue.main.async {
self.region = MKCoordinateRegion(center: latestLocation.coordinate, span: MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05))
}
}
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print(error.localizedDescription)
}
}
CodePudding user response:
there is no way you can call custom requests for permissions. At most, you can edit messages for which you need this or that permission. Logically, if your employer still asks you to make it more beautiful, you can write a separate screen for access for all permissions in your app.