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

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

Open markterrill opened this issue 5 years ago • 22 comments

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

markterrill avatar Jul 02 '19 01:07 markterrill

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

alex-steinberg avatar Jul 02 '19 07:07 alex-steinberg

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.

markterrill avatar Jul 02 '19 10:07 markterrill

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.

markterrill avatar Jul 02 '19 10:07 markterrill

Hello,

Please merge this

ghost avatar Jul 12 '19 08:07 ghost

Please, can you merge this?

miquelferrerllompart avatar Jul 23 '19 09:07 miquelferrerllompart

When is this getting merged?

cape-dev avatar Jul 26 '19 08:07 cape-dev

could we get this merged, please?

cyptus avatar Aug 05 '19 09:08 cyptus

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

miquelferrerllompart avatar Aug 05 '19 09:08 miquelferrerllompart

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

cmgustavo avatar Aug 09 '19 13:08 cmgustavo

[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" />

jallen-dev avatar Aug 15 '19 01:08 jallen-dev

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

Towerism avatar Aug 23 '19 21:08 Towerism

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

npm install cordova-plugin-qrscanner-dual

This is fixed.

LuisEGR avatar Sep 20 '19 01:09 LuisEGR

@cmgustavo it works for me, im using that:

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

and adding the lines in config.xml:

manuhdzf avatar Sep 30 '19 16:09 manuhdzf

Who is the maintainer here?

Seems this repo is dead.

markterrill avatar Dec 12 '19 01:12 markterrill

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

jj449 avatar Jan 20 '20 09:01 jj449

@cmgustavo could you have a look into this?

Who is the maintainer here?

Seems this repo is dead.

cyptus avatar Jan 20 '20 09:01 cyptus

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

danielzen avatar Mar 28 '20 21:03 danielzen

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 avatar Apr 18 '20 10:04 toshihidetagami

@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 avatar Apr 28 '20 05:04 markterrill

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

markterrill avatar Apr 28 '20 05:04 markterrill

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

toshihidetagami avatar May 01 '20 08:05 toshihidetagami

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

Binkie86 avatar Jan 08 '22 07:01 Binkie86