You cannot use the @Siddharth jain solution. Problem: The application will be rejected by Apple with a warning that you should no longer use non-public APIs. Otherwise, you may risk your developer program.
As far as I know, all you can do is open the iPhone settings in general (or bring them to the application settings, if any. For this you need the following code
guard let url = URL(string: UIApplication.openSettingsURLString) else {
This way you will always get a URL that you can use without any problems with your apple review.
source share