so I posted previously about this issue here.
As you can read I was rejected.
My question is how do I update this code to use openSettingsURLString instead of UIApplication.shared.openURL
After doing some asking and some research I found out I have to change this:
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
}
into code that uses this
But I'm so confused because I can't find that class anywhere, and if it's a class why is isn't the class capitalized?
How can I use it in the code snippet above.
I think it is a subclass of String, but I have no idea where to find this, or how to incorporate the change into the existing code safely.
Very confused on this and thank you for any insights.