bitpay / cordova-plugin-qrscanner

A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
MIT License
567 stars 773 forks source link

'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString' #401

Open fairport opened 8 months ago

fairport commented 8 months ago

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)
        }
    }
julienkermarec commented 7 months ago

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