AmolGangadhare / flutter_barcode_scanner

Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS
https://pub.dev/packages/flutter_barcode_scanner
MIT License
381 stars 501 forks source link

iOS build failed #64

Closed test4511 closed 4 years ago

test4511 commented 4 years ago

Describe the bug I want build ios release but it shows error from flutter_barcode_scanner. The way to reproduce it is by using flutter build -ios --release

Building com.xxxxx for device (ios-release)...

Automatically signing iOS for device deployment using specified development team in Xcode project: N7CVA637YZ

Running Xcode build...                                                  

Xcode build done.                                            3.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    error: Unexpected duplicate tasks:
    1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_off.png'
    to
    '/Users/raynne/Documents/Development/Developments_SourceCode_20191007/kepong/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_off.png'
    2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_off.png'
    to
    '/Users/raynne/Documents/Development/Developments_SourceCode_20191007/kepong/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_off.png'
    error: Unexpected duplicate tasks:
    1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_on.png'
    to
    '/Users/raynne/Documents/Development/Developments_SourceCode_20191007/kepong/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_on.png'
    2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_on.png'
    to
    '/Users/raynne/Documents/Development/Developments_SourceCode_20191007/kepong/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_on.png'
    note: Using new build system
    note: Planning build
    note: Constructing build description

Encountered error while building for device.

New Error Log After searching I saw some people stating that they are able to fixed it by changing their deployment target to 11.0. The way to reproduce it is changing my deployment target from 8.0 to 11.0.

Building  com.xxxxx for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: N7CVA637YZ
Running pod install...                                              2.2s
Running Xcode build...                                                  

Xcode build done.                                            5.0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewController.swift:52:46:
    warning: conditional downcast from 'String?' to 'String' does nothing
                let data = (initialData!["data"] as? String)!
                            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewController.swift:53:54:
    warning: conditional downcast from 'String?' to 'String' does nothing
                let mimeType = (initialData!["mimeType"] as? String)!
                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewController.swift:54:54:
    warning: conditional downcast from 'String?' to 'String' does nothing
                let encoding = (initialData!["encoding"] as? String)!
                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewController.swift:55:52:
    warning: conditional downcast from 'String?' to 'String' does nothing
                let baseUrl = (initialData!["baseUrl"] as? String)!
                               ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewController.swift:27:13:
    warning: initialization of immutable value 'initialOptions' was never used; consider replacing with assignment to '_' or removing it
            let initialOptions = (args["initialOptions"] as? [String: Any])!
            ~~~~^~~~~~~~~~~~~~
            _
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/FlutterWebViewController.swift:221:41
    : warning: result of call to 'parse(options:)' is unused
                        inAppWebViewOptions.parse(options: inAppWebViewOptionsMap)
                                            ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    75:114: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
            containerWebView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.containerWebView, attribute: NSLayoutAttribute.bottom, relatedBy:
            NSLayoutRelation.equal, toItem: self.view, attribute: NSLayoutAttribute.bottom, multiplier: 1, constant: 0)
                                                                                                                     ^~~~~~~~~~~~~~~~~
                                                                                                                     NSLayoutConstraint.Attribute
    UIKit.NSLayoutAttribute:2:18: note: 'NSLayoutAttribute' was obsoleted in Swift 4.2
    public typealias NSLayoutAttribute = NSLayoutConstraint.Attribute
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    76:111: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
            containerWebView_TopFullScreenConstraint = NSLayoutConstraint(item: self.containerWebView, attribute: NSLayoutAttribute.top, relatedBy:
            NSLayoutRelation.equal, toItem: self.view, attribute: NSLayoutAttribute.top, multiplier: 1, constant: 0)
                                                                                                                  ^~~~~~~~~~~~~~~~~
                                                                                                                  NSLayoutConstraint.Attribute
    UIKit.NSLayoutAttribute:2:18: note: 'NSLayoutAttribute' was obsoleted in Swift 4.2
    public typealias NSLayoutAttribute = NSLayoutConstraint.Attribute
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    79:47: warning: coercion of implicitly unwrappable value of type 'InAppWebView?' to 'Any' does not unwrap optional
            let height = NSLayoutConstraint(item: webView, attribute: .height, relatedBy: .equal, toItem: containerWebView, attribute: .height, multiplier: 1,
            constant: 0)
                                                  ^~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:9
    3:9: note: implicitly unwrapped property 'webView' declared here
        var webView: InAppWebView!
            ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    79:47: note: provide a default value to avoid this warning
            let height = NSLayoutConstraint(item: webView, attribute: .height, relatedBy: .equal, toItem: containerWebView, attribute: .height, multiplier: 1,
            constant: 0)
                                                  ^~~~~~~
                                                          ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    79:47: note: force-unwrap the value to avoid this warning
            let height = NSLayoutConstraint(item: webView, attribute: .height, relatedBy: .equal, toItem: containerWebView, attribute: .height, multiplier: 1,
            constant: 0)
                                                  ^~~~~~~
                                                         !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    79:47: note: explicitly cast to 'Any' with 'as Any' to silence this warning
            let height = NSLayoutConstraint(item: webView, attribute: .height, relatedBy: .equal, toItem: containerWebView, attribute: .height, multiplier: 1,
            constant: 0)
                                                  ^~~~~~~
                                                          as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    80:46: warning: coercion of implicitly unwrappable value of type 'InAppWebView?' to 'Any' does not unwrap optional
            let width = NSLayoutConstraint(item: webView, attribute: .width, relatedBy: .equal, toItem: containerWebView, attribute: .width, multiplier: 1,
            constant: 0)
                                                 ^~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:9
    3:9: note: implicitly unwrapped property 'webView' declared here
        var webView: InAppWebView!
            ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    80:46: note: provide a default value to avoid this warning
            let width = NSLayoutConstraint(item: webView, attribute: .width, relatedBy: .equal, toItem: containerWebView, attribute: .width, multiplier: 1,
            constant: 0)
                                                 ^~~~~~~
                                                         ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    80:46: note: force-unwrap the value to avoid this warning
            let width = NSLayoutConstraint(item: webView, attribute: .width, relatedBy: .equal, toItem: containerWebView, attribute: .width, multiplier: 1,
            constant: 0)
                                                 ^~~~~~~
                                                        !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    80:46: note: explicitly cast to 'Any' with 'as Any' to silence this warning
            let width = NSLayoutConstraint(item: webView, attribute: .width, relatedBy: .equal, toItem: containerWebView, attribute: .width, multiplier: 1,
            constant: 0)
                                                 ^~~~~~~
                                                         as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    81:55: warning: coercion of implicitly unwrappable value of type 'InAppWebView?' to 'Any' does not unwrap optional
            let leftConstraint = NSLayoutConstraint(item: webView, attribute: .leftMargin, relatedBy: .equal, toItem: containerWebView, attribute: .leftMargin,
            multiplier: 1, constant: 0)
                                                          ^~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:9
    3:9: note: implicitly unwrapped property 'webView' declared here
        var webView: InAppWebView!
            ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    81:55: note: provide a default value to avoid this warning
            let leftConstraint = NSLayoutConstraint(item: webView, attribute: .leftMargin, relatedBy: .equal, toItem: containerWebView, attribute: .leftMargin,
            multiplier: 1, constant: 0)
                                                          ^~~~~~~
                                                                  ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    81:55: note: force-unwrap the value to avoid this warning
            let leftConstraint = NSLayoutConstraint(item: webView, attribute: .leftMargin, relatedBy: .equal, toItem: containerWebView, attribute: .leftMargin,
            multiplier: 1, constant: 0)
                                                          ^~~~~~~
                                                                 !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    81:55: note: explicitly cast to 'Any' with 'as Any' to silence this warning
            let leftConstraint = NSLayoutConstraint(item: webView, attribute: .leftMargin, relatedBy: .equal, toItem: containerWebView, attribute: .leftMargin,
            multiplier: 1, constant: 0)
                                                          ^~~~~~~
                                                                  as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    82:56: warning: coercion of implicitly unwrappable value of type 'InAppWebView?' to 'Any' does not unwrap optional
            let rightConstraint = NSLayoutConstraint(item: webView, attribute: .rightMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .rightMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:9
    3:9: note: implicitly unwrapped property 'webView' declared here
        var webView: InAppWebView!
            ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    82:56: note: provide a default value to avoid this warning
            let rightConstraint = NSLayoutConstraint(item: webView, attribute: .rightMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .rightMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
                                                                   ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    82:56: note: force-unwrap the value to avoid this warning
            let rightConstraint = NSLayoutConstraint(item: webView, attribute: .rightMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .rightMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
                                                                  !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    82:56: note: explicitly cast to 'Any' with 'as Any' to silence this warning
            let rightConstraint = NSLayoutConstraint(item: webView, attribute: .rightMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .rightMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
                                                                   as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    83:56: warning: coercion of implicitly unwrappable value of type 'InAppWebView?' to 'Any' does not unwrap optional
            let bottomContraint = NSLayoutConstraint(item: webView, attribute: .bottomMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .bottomMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:9
    3:9: note: implicitly unwrapped property 'webView' declared here
        var webView: InAppWebView!
            ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    83:56: note: provide a default value to avoid this warning
            let bottomContraint = NSLayoutConstraint(item: webView, attribute: .bottomMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .bottomMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
                                                                   ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    83:56: note: force-unwrap the value to avoid this warning
            let bottomContraint = NSLayoutConstraint(item: webView, attribute: .bottomMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .bottomMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
                                                                  !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    83:56: note: explicitly cast to 'Any' with 'as Any' to silence this warning
            let bottomContraint = NSLayoutConstraint(item: webView, attribute: .bottomMargin, relatedBy: .equal, toItem: containerWebView, attribute:
            .bottomMargin, multiplier: 1, constant: 0)
                                                           ^~~~~~~
                                                                   as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    86:96: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
            webView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.webView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal,
            toItem: self.containerWebView, attribute: NSLayoutAttribute.bottom, multiplier: 1, constant: 0)
                                                                                                   ^~~~~~~~~~~~~~~~~
                                                                                                   NSLayoutConstraint.Attribute
    UIKit.NSLayoutAttribute:2:18: note: 'NSLayoutAttribute' was obsoleted in Swift 4.2
    public typealias NSLayoutAttribute = NSLayoutConstraint.Attribute
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:1
    87:93: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
            webView_TopFullScreenConstraint = NSLayoutConstraint(item: self.webView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem:
            self.containerWebView, attribute: NSLayoutAttribute.top, multiplier: 1, constant: 0)
                                                                                                ^~~~~~~~~~~~~~~~~
                                                                                                NSLayoutConstraint.Attribute
    UIKit.NSLayoutAttribute:2:18: note: 'NSLayoutAttribute' was obsoleted in Swift 4.2
    public typealias NSLayoutAttribute = NSLayoutConstraint.Attribute
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:2
    57:49: error: 'NSStringFromCGRect' has been replaced by 'NSCoder.string(for:)'
            print("Setting the WebView's frame to \(NSStringFromCGRect(frame))")
                                                    ^~~~~~~~~~~~~~~~~~
                                                    NSCoder.string     for: 
    UIKit.NSStringFromCGRect:2:13: note: 'NSStringFromCGRect' was obsoleted in Swift 3
    public func NSStringFromCGRect(_ rect: CGRect) -> String
                ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:2
    79:51: error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                        self.tmpWindow?.windowLevel = 0.0
                                                      ^~~
                                                      UIWindow.Level(rawValue:  )
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:2
    88:51: error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                        self.tmpWindow?.windowLevel = 0.0
                                                      ^~~
                                                      UIWindow.Level(rawValue:  )
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppBrowserWebViewController.swift:3
    77:32: warning: result of call to 'parse(options:)' is unused
            newInAppWebViewOptions.parse(options: newOptionsMap)
                                   ^    ~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:243:33: error:
    'UIImagePNGRepresentation' has been replaced by instance method 'UIImage.pngData()'
                        imageData = UIImagePNGRepresentation(screenshot)!
                                    ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
                                    screenshot.pngData       
    UIKit.UIImagePNGRepresentation:2:13: note: 'UIImagePNGRepresentation' was obsoleted in Swift 3
    public func UIImagePNGRepresentation(_ image: UIImage) -> Data?
                ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:759:27: warning:
    expression implicitly coerced from 'String?' to 'Any'
                        print((result as! FlutterError).message)
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:759:53: note:
    provide a default value to avoid this warning
                        print((result as! FlutterError).message)
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                                ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:759:53: note:
    force-unwrap the value to avoid this warning
                        print((result as! FlutterError).message)
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                               !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:759:53: note:
    explicitly cast to 'Any' with 'as Any' to silence this warning
                        print((result as! FlutterError).message)
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                                as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:817:31: warning:
    expression implicitly coerced from 'Error?' to 'Any'
                            print(error)
                                  ^~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:817:31: note:
    provide a default value to avoid this warning
                            print(error)
                                  ^~~~~
                                        ?? <#default value#>
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:817:31: note:
    force-unwrap the value to avoid this warning
                            print(error)
                                  ^~~~~
                                       !
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/InAppWebView.swift:817:31: note:
    explicitly cast to 'Any' with 'as Any' to silence this warning
                            print(error)
                                  ^~~~~
                                        as Any
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SafariViewController.swift:46:43:
    error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                self.tmpWindow?.windowLevel = 0.0
                                              ^~~
                                              UIWindow.Level(rawValue:  )
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:62:13:
    warning: result of 'MyCookieManager' initializer is unused
                MyCookieManager(registrar: registrar)
                ^              ~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:228:45:
    warning: result of call to 'parse(options:)' is unused
                            inAppBrowserOptions.parse(options: inAppBrowserOptionsMap)
                                                ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:353:39:
    error: 'UIWindowLevel' has been renamed to 'UIWindow.Level'
            self.tmpWindow?.windowLevel = UIWindowLevel(baseWindowLevel! + 1)
                                          ^~~~~~~~~~~~~
                                          UIWindow.Level
    UIKit.UIWindowLevel:2:18: note: 'UIWindowLevel' was obsoleted in Swift 4.2
    public typealias UIWindowLevel = UIWindow.Level
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:362:31:
    warning: result of call to 'parse(options:)' is unused
                    safariOptions.parse(options: options)
                                  ^    ~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:400:32:
    warning: result of call to 'parse(options:)' is unused
                    browserOptions.parse(options: optionsFallback!)
                                   ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:403:32:
    warning: result of call to 'parse(options:)' is unused
                    webViewOptions.parse(options: optionsFallback!)
                                   ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:408:28:
    warning: result of call to 'parse(options:)' is unused
                browserOptions.parse(options: options)
                               ^    ~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:411:28:
    warning: result of call to 'parse(options:)' is unused
                webViewOptions.parse(options: options)
                               ^    ~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:417:94:
    warning: forced cast from 'InAppBrowserWebViewController??' to 'InAppBrowserWebViewController' only unwraps optionals; did you mean to use '!!'?
            let webViewController: InAppBrowserWebViewController = self.webViewControllers[uuid] as! InAppBrowserWebViewController
                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                !! 
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:438:47:
    error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                    self.tmpWindow?.windowLevel = 0.0
                                                  ^~~
                                                  UIWindow.Level(rawValue:  )
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:469:39:
    error: 'UIWindowLevel' has been renamed to 'UIWindow.Level'
            self.tmpWindow?.windowLevel = UIWindowLevel(baseWindowLevel! + 1)
                                          ^~~~~~~~~~~~~
                                          UIWindow.Level
    UIKit.UIWindowLevel:2:18: note: 'UIWindowLevel' was obsoleted in Swift 4.2
    public typealias UIWindowLevel = UIWindow.Level
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:476:24:
    warning: result of call to 'parse(options:)' is unused
            browserOptions.parse(options: options)
                           ^    ~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:479:24:
    warning: result of call to 'parse(options:)' is unused
            webViewOptions.parse(options: options)
                           ^    ~~~~~~~~~~~~~~~~~~
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:484:94:
    warning: forced cast from 'InAppBrowserWebViewController??' to 'InAppBrowserWebViewController' only unwraps optionals; did you mean to use '!!'?
            let webViewController: InAppBrowserWebViewController = self.webViewControllers[uuid] as! InAppBrowserWebViewController
                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                !! 
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:502:47:
    error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                    self.tmpWindow?.windowLevel = 0.0
                                                  ^~~
                                                  UIWindow.Level(rawValue:  )
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:539:55:
    error: 'UIWindowLevel' has been renamed to 'UIWindow.Level'
                            self.tmpWindow?.windowLevel = UIWindowLevel(baseWindowLevel! + 1)
                                                          ^~~~~~~~~~~~~
                                                          UIWindow.Level
    UIKit.UIWindowLevel:2:18: note: 'UIWindowLevel' was obsoleted in Swift 4.2
    public typealias UIWindowLevel = UIWindow.Level
                     ^
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:561:59:
    error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                                self.tmpWindow?.windowLevel = 0.0
                                                              ^~~
                                                              UIWindow.Level(rawValue:  )
    /Users/raynne/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.1/ios/Classes/SwiftFlutterPlugin.swift:679:16:
    warning: value 'webViewController' was defined but never used; consider replacing with boolean test
            if let webViewController = self.webViewControllers[uuid] {
               ~~~~^~~~~~~~~~~~~~~~~~~~
                                                                     != nil
    Command CompileSwift failed with a nonzero exit code
    note: Using new build system
    note: Planning build
    note: Constructing build description

Encountered error while building for device.
AmolGangadhare commented 4 years ago

Hi, Thanks for reporting the issue.

This issue has already been resolved and queued in the upcoming release.

Please refer this for instant solution https://github.com/AmolGangadhare/flutter_barcode_scanner/issues/37#issuecomment-559088480

Now about the second error log, it seems to be another plugin's issue. Please revert any changes you made to make this work and try the solution in the link.

If possible please acknowledge this if this works for you.

test4511 commented 4 years ago

Hi I try the second error log because your solution at comment #37 is not working for me

AmolGangadhare commented 4 years ago

In this, we need minimum deployment target 10, were you trying it on 8?

test4511 commented 4 years ago

I changed to deployment target 10 and also change it to legacy system. I also change the source file class like comment #37 but still same error occur.

AmolGangadhare commented 4 years ago

I'm not able to reproduce this. Can you provide a list of packages (pubspec.yaml) you are using in your project?

nicolasvahidzein commented 4 years ago

i'm having the same issue, change the pod file like said in issue #37 but still no luck.

nicolasvahidzein commented 4 years ago

what is even stranger is that i can build from xcode no problem but the bug happens when i try to run from vscode.

AmolGangadhare commented 4 years ago

@nicolasvahidzein

As per your last comment, I can understand that build is failing when using vs code. In your case, this issue may be specific to the flutter extension. In general, try to build ios part always from Xcode not for this plugin but for all flutter projects, it will be always prefered to do it from Xcode.

Please do let me know any findings from your side.

Thanks

AmolGangadhare commented 4 years ago

@test4511

Any updates?

As I said in your second provided log, I can see that there is an issue where webview is used, this seems to be another plugin's issue. In this plugin, we do not use webview.

nicolasvahidzein commented 4 years ago

First let me congratulate you on your terrific package.

Secondly, i was able to find helpful advice on this repo about the errors and they have gone away, now it's relating to something else. We can close this issue for now. Thank you!!

AmolGangadhare commented 4 years ago

@nicolasvahidzein

Thank you so much for your appreciation. It always encourage me to do better n better.

If you face any issue, feel free to report it.

Thanks

AmolGangadhare commented 4 years ago

V1.0.0 has been released, can you try it on the latest and confirm the same?

AmolGangadhare commented 4 years ago

Closing this issue, please feel free to reopen is the issue persists