I am trying to use cordova-plugin-qrscanner with both Android and iOS. I can do a successful build with Android but with iOS I get:
The following build commands failed:
SwiftCompile normal arm64 Compiling\ QRScanner.swift /platforms/ios/Family_Medical_Diary/Plugins/cordova-plugin-qrscanner/QRScanner.swift (in target 'Family_Medical_Diary' from project 'Family_Medical_Diary')
CompileSwift normal arm64 /platforms/ios/Family_Medical_Diary/Plugins/cordova-plugin-qrscanner/QRScanner.swift (in target 'Family_Medical_Diary' from project 'Family_Medical_Diary')
(2 failures)
xcodebuild: Command failed with exit code 65
2023-02-12 23:33:36,944 -
/platforms/ios/Family_Medical_Diary/Plugins/cordova-plugin-qrscanner/QRScanner.swift:471:63:
error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
Check the log for more information.
You probably need a newer version of this plugin.
2023-02-12 23:33:36,945 - reset_keychain
2023-02-12 23:33:36,986 - Output:
2023-02-12 23:33:36,986 - Build failed 4889c57e-c5f9-4398-8d3a-316223918f24
2023-02-12 23:33:38,408 - Output: Package Current Wanted Latest Location Depended by
cordova-android 10.1.1 10.1.1 11.0.0 node_modules/cordova-android 4889c57e-c5f9-4398-8d3a-316223918f24
The plugin was last updated 4 years ago and has 150 open issues:
This is one of the open issues:
"Hi all. It is very unfortunate that this project has been abandoned.
Is someone maintaining a good solid fork with support for both platforms (iOS & Android), which we can help with?
Right now it seems everyone is forking and cooking their own fixes.
I appreciate your work to find a solution for QR scanning. I have incorporated the cordova-plugin-qrscanner-12. It seems that I get a error that is similar to the previous plugin.
Is there something else that I may need to change?
Thank you
The following build commands failed:
SwiftCompile normal arm64 Compiling\ QRScanner.swift /platforms/ios/Family_Medical_Diary/Plugins/cordova-plugin-qrscanner-12/QRScanner.swift (in target 'Family_Medical_Diary' from project 'Family_Medical_Diary')
CompileSwift normal arm64 /platforms/ios/Family_Medical_Diary/Plugins/cordova-plugin-qrscanner-12/QRScanner.swift (in target 'Family_Medical_Diary' from project 'Family_Medical_Diary')
(2 failures)
xcodebuild: Command failed with exit code 65
2023-02-17 08:49:13,687 -
/platforms/ios/Family_Medical_Diary/Plugins/cordova-plugin-qrscanner-12/QRScanner.swift:478:63:
error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
Check the log for more information.
You probably need a newer version of this plugin.
2023-02-17 08:49:13,687 - reset_keychain
2023-02-17 08:49:13,725 - Output:
2023-02-17 08:49:13,726 - Build failed 69db537f-85a5-4add-84ec-4870cbb8ab93
2023-02-17 08:49:15,108 - Output: Package Current Wanted Latest Location Depended by
cordova-android 10.1.1 10.1.1 11.0.0 node_modules/cordova-android 69db537f-85a5-4add-84ec-4870cbb8ab93
You should probably go to 11.0.0. Google will be blocking anything before that soon, and I believe cordova-plugin-qrscanner-12 also expects 11.0.0. (The 12 in the plugin’s name refers to Android 12, which needs engine 11)