cordova-plugin-qrscanner
cordova-plugin-qrscanner copied to clipboard
Fix for QRScanner.swift:471:63: error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
Refer #259
Two references needed to be updated. Works for me.
Ionic:
Ionic CLI : 5.0.1 (/Users/markterrill/.nvm/versions/node/v8.11.2/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.6
@ionic/app-scripts : 3.2.1
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 24 other plugins)
Utility:
cordova-res : 0.3.0
native-run : 0.2.6
System:
Android SDK Tools : 26.1.1 (/Users/markterrill/Library/Android/sdk/)
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v8.11.2 (/Users/markterrill/.nvm/versions/node/v8.11.2/bin/node)
npm : 6.1.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
Refer to PR272, it achieves the same thing and is a bit cleaner: https://github.com/bitpay/cordova-plugin-qrscanner/pull/272
Whatever. Just get it fixed.
Sent from my iPhone
On 2 Jul 2019, at 17:50, Alex Steinberg <[email protected]mailto:[email protected]> wrote:
Refer to PR272, it achieves the same thing and is a bit cleaner: #272https://github.com/bitpay/cordova-plugin-qrscanner/pull/272
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/bitpay/cordova-plugin-qrscanner/pull/271?email_source=notifications&email_token=AAT5UUKKGN4NFKPKDQLP7LTP5MCD3A5CNFSM4H4XH5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZAMYHY#issuecomment-507563039, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAT5UUMJH2XEVD5KZHDCPADP5MCD3ANCNFSM4H4XH5VA.
Ps, adding .idea to .gitignore would help! Got caught out by that while taking the unplanned detour to fix and send you a pr ;)
Sent from my iPhone
On 2 Jul 2019, at 17:50, Alex Steinberg <[email protected]mailto:[email protected]> wrote:
Refer to PR272, it achieves the same thing and is a bit cleaner: #272https://github.com/bitpay/cordova-plugin-qrscanner/pull/272
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/bitpay/cordova-plugin-qrscanner/pull/271?email_source=notifications&email_token=AAT5UUKKGN4NFKPKDQLP7LTP5MCD3A5CNFSM4H4XH5VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZAMYHY#issuecomment-507563039, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAT5UUMJH2XEVD5KZHDCPADP5MCD3ANCNFSM4H4XH5VA.
Hello,
Please merge this
Please, can you merge this?
When is this getting merged?
could we get this merged, please?
Yes please, is a small issue and crash our CI flow
This PR doesn't work for me:
'UIApplicationOpenSettingsURLString' has been renamed to 'UIApplication.openSettingsURLString'
Please, use these options into your config.xml:
<preference name="UseSwiftLanguageVersion" value="5" />
<plugin name="cordova-plugin-add-swift-support" spec="1.7.2" />
My ionic info
is:
Ionic:
ionic (Ionic CLI) : 4.10.4
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.3
Cordova:
cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : android 7.1.2, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, (and 26 other plugins)
System:
Android SDK Tools : 26.1.1
NodeJS : v10.16.2 (/usr/local/bin/node)
npm : 6.10.3
OS : macOS Mojave
Xcode : Xcode 10.3 Build version 10G8
[email protected] added swift support and it seems it somehow conflicts with the plugin cordova-plugin-add-swift-support. @cmgustavo's config above did not work for me with ios 5.0.1.
What did work for me is adding the following:
<preference name="SwiftVersion" value="4.2" />
This and #272 have been sitting open for over a month. Please merge one of them.
If someone need a temporal solution, you can use this:
npm install cordova-plugin-qrscanner-dual
This is fixed.
@cmgustavo it works for me, im using that:
ionic 4 "cordova-plugin-qrscanner": "3.0.1",
and adding the lines in config.xml:
Who is the maintainer here?
Seems this repo is dead.
[email protected] added swift support and it seems it somehow conflicts with the plugin cordova-plugin-add-swift-support. @cmgustavo's config above did not work for me with ios 5.0.1.
What did work for me is adding the following:
<preference name="SwiftVersion" value="4.2" />
man , you save my day !
@cmgustavo could you have a look into this?
Who is the maintainer here?
Seems this repo is dead.
@markterrill I have given up on waiting for this to be fixed. I have created a substitute for the npm package using your code. I am using it in my projects by replacing the npm package with my own:
npm uninstall cordova-plugin-qrscanner
npm install git+https://[email protected]/danielzen/cordova-plugin-qrscanner
Hope it works for others as well...
Though many people want this pull request and #272 to be merged, thing is UIApplication.openSettingsURLString(current code) is for swift 5 and UIApplicationOpenSettingsURLString(pull request) is for older version. So this pull request essentially reverts this plugin to old state.
See this pull request #236(Adds Swift 5 support)
So I think best way would be to use "cordova-plugin-add-swift-support" and set swift version to 5 as @cmgustavo has pointed out.
@toshihidetagami hi! Well, Swift5 isn't supported by all plugins and folk don't necessarily want to compile with it. That may have changed since I wrote the pull, but it's still how we're compiling right now!
I don't know swift that well. Can you IFDEF stuff in and out based on platform/swift version like you can in C?
Hi @markterrill ! I think you are right. But sorry, I am not a maintainer so I can't merge this.
Refer #259
Two references needed to be updated. Works for me.
Ionic: Ionic CLI : 5.0.1 (/Users/markterrill/.nvm/versions/node/v8.11.2/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.6 @ionic/app-scripts : 3.2.1 Cordova: Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 24 other plugins) Utility: cordova-res : 0.3.0 native-run : 0.2.6 System: Android SDK Tools : 26.1.1 (/Users/markterrill/Library/Android/sdk/) ios-deploy : 1.9.4 ios-sim : 8.0.1 NodeJS : v8.11.2 (/Users/markterrill/.nvm/versions/node/v8.11.2/bin/node) npm : 6.1.0 OS : macOS Mojave Xcode : Xcode 10.2.1 Build version 10E1001