So while submitting the app to the appstore, we get this response back:
I've been reviewing some answers on here and this solution might be doable, but I'm having trouble figuring out how to encorporate the fix into this codebase I'm working in.
Also, and most importantly, how can I make sure this won't get rejected again if I think I fix it. Is there any way to test whether or not this app fix will lead to a successful submission?
Here is the snippet of code that needs to change:
static func openSettingsAlert(_ title: String, message: String, settingsURL: String) -> UIAlertController {
let alertController = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
let settingsAction = UIAlertAction(title: "Settings", style: .default) { (_) -> Void in
let settingsURL = URL(string: settingsURL)
if let url = settingsURL {
DispatchQueue.main.async(execute: {
UIApplication.shared.openURL(url)
})
}
}
let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: nil)
alertController.addAction(cancelAction)
alertController.addAction(settingsAction)
return alertController
}
Thank you for any insights you can provide into this matter.
Thanks