bitpay / cordova-plugin-qrscanner

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

Fix for QRScanner.swift:471:63: error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString' #271

Open markterrill opened 4 years ago

markterrill commented 4 years ago

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 (cordova-lib@9.0.1)
   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
alex-steinberg commented 4 years ago

Refer to PR272, it achieves the same thing and is a bit cleaner: https://github.com/bitpay/cordova-plugin-qrscanner/pull/272

markterrill commented 4 years ago

Whatever. Just get it fixed.

Sent from my iPhone

On 2 Jul 2019, at 17:50, Alex Steinberg notifications@github.com<mailto:notifications@github.com> 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.

markterrill commented 4 years ago

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 notifications@github.com<mailto:notifications@github.com> 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.

ghost commented 4 years ago

Hello,

Please merge this

miquelferrerllompart commented 4 years ago

Please, can you merge this?

cape-dev commented 4 years ago

When is this getting merged?

cyptus commented 4 years ago

could we get this merged, please?

miquelferrerllompart commented 4 years ago

Yes please, is a small issue and crash our CI flow

cmgustavo commented 4 years ago

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 (cordova-lib@8.1.1)
   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
jallen-dev commented 4 years ago

cordova-ios@5.0.0 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" />
Towerism commented 4 years ago

This and #272 have been sitting open for over a month. Please merge one of them.

LuisEGR commented 4 years ago

If someone need a temporal solution, you can use this:

npm install cordova-plugin-qrscanner-dual

This is fixed.

manuhdzf commented 4 years ago

@cmgustavo it works for me, im using that:

ionic 4 "cordova-plugin-qrscanner": "3.0.1",

and adding the lines in config.xml:

markterrill commented 4 years ago

Who is the maintainer here?

Seems this repo is dead.

jj449 commented 4 years ago

cordova-ios@5.0.0 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 !

cyptus commented 4 years ago

@cmgustavo could you have a look into this?

Who is the maintainer here?

Seems this repo is dead.

danielzen commented 4 years ago

@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://git@github.com/danielzen/cordova-plugin-qrscanner

Hope it works for others as well...

toshihidetagami commented 4 years ago

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.

markterrill commented 4 years ago

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

markterrill commented 4 years ago

I don't know swift that well. Can you IFDEF stuff in and out based on platform/swift version like you can in C?

toshihidetagami commented 4 years ago

Hi @markterrill ! I think you are right. But sorry, I am not a maintainer so I can't merge this.

Binkie86 commented 2 years ago

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 (cordova-lib@9.0.1)

   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