I have launched application settings using UIApplication.shared.open(URL(string: UIApplicationOpenSettingsURLString)!, options: [:], completionHandler: nil)
I am using this to enable camera when the user has denied this once.
In settings app, when I enable camera, the application is crashed.
Is there any way I can fix it?
No you can't... Any change in any of your app permission (from the settings) Your app is killed and next time when you launch your application either from app switcher or from the app icon it starts a new process. This is how it works in IOS.
Also See this answer.