cordova-plugin-qrscanner icon indicating copy to clipboard operation
cordova-plugin-qrscanner copied to clipboard

'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'

Open fairport opened this issue 1 year ago • 1 comments

This error is being thrown during a build in XCode Version 14.3 (14E222b)

'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'

Easy enough to fix but maybe it needs fixing inside the plugin

   @objc func openSettings(_ command: CDVInvokedUrlCommand) {
        guard let settingsUrl = URL(string: UIApplicationOpenSettingsURLString) else {   //replace here  
            return
        }
        if UIApplication.shared.canOpenURL(settingsUrl) {
            UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
                self.getStatus(command)
            })
        } else {
            self.sendErrorCode(command: command, error: QRScannerError.open_settings_unavailable)
        }
    }

fairport avatar Aug 10 '23 02:08 fairport

Ok, thanks for the fix. I create a PR ! Can you approve ?

julienkermarec avatar Sep 23 '23 15:09 julienkermarec