bitpay / cordova-plugin-qrscanner

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

Build error on iOS #337

Open jf-gl opened 3 years ago

jf-gl commented 3 years ago

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

UIApplication.openSettingsURLString should be replaced by UIApplicationOpenSettingsURLString.

bbialas commented 3 years ago

Same here:

Screenshot 2020-12-17 at 14 14 10
Mathewkutty commented 3 years ago

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

pedroadame commented 3 years ago

@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)

msudol commented 3 years ago

@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:

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
pedroadame commented 3 years ago

@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.

msudol commented 3 years ago

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"

pedroadame commented 3 years ago

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

msudol commented 3 years ago

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

BenLaKnet commented 10 months ago

How to install nosoloforks, please.