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

Build error on iOS

Open jf-gl opened this issue 4 years ago • 9 comments

I'am facing compilation error on Xcode with UIApplication.openSettingsURLString.

UIApplication.openSettingsURLString should be replaced by UIApplicationOpenSettingsURLString.

jf-gl avatar Dec 15 '20 11:12 jf-gl

Same here: Screenshot 2020-12-17 at 14 14 10

bbialas avatar Dec 17 '20 13:12 bbialas

https://github.com/bitpay/cordova-plugin-qrscanner/issues/314#issuecomment-614322958 this link has the answer

Mathewkutty avatar Dec 21 '20 10:12 Mathewkutty

@bbialas @Mathewkutty @jf-gl We've forked the repo and upgraded it to modern versions. Check https://github.com/nosoloforks/cordova-plugin-qrscanner (v4.0.0 is not published on NPM)

pedroadame avatar Feb 24 '21 13:02 pedroadame

@bbialas @Mathewkutty @jf-gl We've forked the repo and upgraded it to modern versions. Check https://github.com/nosoloforks/cordova-plugin-qrscanner (v4.0.0 is not published on NPM)

Trying this fork using the Monaca.io platform:

  • Cordova CLI Version 10.0.0
  • iOS Plaform: 6.1.1
  • Xcode 12.2

Build fails with:

Plugins/cordova-plugin-qrscanner/QRScanner.swift:484:74: error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
[06:36:38]                 UIApplication.shared.openURL(NSURL(string: UIApplication.openSettingsURLString)! as URL)
[06:36:38]                                                                          ^~~~~~~~~~~~~~~~~~~~~
[06:36:38]                                                                          UIApplicationOpenSettingsURLString
[06:36:38] UIKit.UIApplication:70:22: note: 'openSettingsURLString' was introduced in Swift 4.2
[06:36:38]     public class let openSettingsURLString: String

msudol avatar Mar 16 '21 22:03 msudol

@bbialas @Mathewkutty @jf-gl We've forked the repo and upgraded it to modern versions. Check https://github.com/nosoloforks/cordova-plugin-qrscanner (v4.0.0 is not published on NPM)

Trying this fork using the Monaca.io platform:

  • Cordova CLI Version 10.0.0
  • iOS Plaform: 6.1.1
  • Xcode 12.2

Build fails with:

Plugins/cordova-plugin-qrscanner/QRScanner.swift:484:74: error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
[06:36:38]                 UIApplication.shared.openURL(NSURL(string: UIApplication.openSettingsURLString)! as URL)
[06:36:38]                                                                          ^~~~~~~~~~~~~~~~~~~~~
[06:36:38]                                                                          UIApplicationOpenSettingsURLString
[06:36:38] UIKit.UIApplication:70:22: note: 'openSettingsURLString' was introduced in Swift 4.2
[06:36:38]     public class let openSettingsURLString: String

Interesting. Which Swift version are you using? we had this error on Swift 4.2, and Xcode told us to go back to UIApplication.openSettingsURLString with Swift 5, so we opted to keep the latest version working.

pedroadame avatar Mar 16 '21 23:03 pedroadame

Got a build together with Swift 5, but app is just white screening.. wonder if that might be some other plugin or this, best I can figure out it has something to do with "WKWebView"

msudol avatar Mar 19 '21 01:03 msudol

I cannot really help you without further information. Maybe upgrading cordova and cordova-ios could help. WKWebView is used by default on cordova-ios=>6

pedroadame avatar Mar 19 '21 15:03 pedroadame

I cannot really help you without further information. Maybe upgrading cordova and cordova-ios could help. WKWebView is used by default on cordova-ios=>6

Thanks, I think my issue now is no longer related to qr-scanner... really missing Adobe Phonegap Build online right now, probably should have chose Ionic over Monaca.io - seems like Ionic has a better support/community

msudol avatar Mar 19 '21 16:03 msudol

How to install nosoloforks, please.

BenLaKnet avatar Oct 29 '23 04:10 BenLaKnet