Skip to content

Cannot build iOS app - 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString' #301

@adamayoung

Description

@adamayoung

I cannot build an iOS app with this plugin. I get the following errors:

                                                   ^
/Users/xxx/MyProject/platforms/ios/MyProject/Plugins/cordova-plugin-qrscanner/QRScanner.swift:471:63: error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
            guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {
                                                              ^~~~~~~~~~~~~~~~~~~~~
                                                              UIApplicationOpenSettingsURLString
UIKit.UIApplication:70:22: note: 'openSettingsURLString' was introduced in Swift 4.2
    public class let openSettingsURLString: String
                     ^
/Users/xxx/MyProject/platforms/ios/MyProject/Plugins/cordova-plugin-qrscanner/QRScanner.swift:484:74: error: 'openSettingsURLString' has been renamed to 'UIApplicationOpenSettingsURLString'
                UIApplication.shared.openURL(NSURL(string: UIApplication.openSettingsURLString)! as URL)
                                                                         ^~~~~~~~~~~~~~~~~~~~~
                                                                         UIApplicationOpenSettingsURLString
UIKit.UIApplication:70:22: note: 'openSettingsURLString' was introduced in Swift 4.2
    public class let openSettingsURLString: String
                     ^

** BUILD FAILED **


The following build commands failed:
        CompileSwift normal x86_64 /Users/xxx/MyProject/platforms/ios/MyProject/Plugins/cordova-plugin-qrscanner/QRScanner.swift
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
Command finished with error code 65: xcodebuild -workspace,MyProject.xcworkspace,-scheme, MyProject,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Users/xxx/MyProject/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/xxx/MyProject/platforms/ios/build/sharedpch,EMBEDDED_CONTENT_CONTAINS_SWIFT = YES,ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO,LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/Users/xxx/MyProject/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:321:20)
    at maybeClose (internal/child_process.js:1026:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
[ERROR] An error occurred while running subprocess cordova.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions