Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build in iOS #103

Closed
rrarey02 opened this issue May 29, 2019 · 13 comments
Closed

Cannot build in iOS #103

rrarey02 opened this issue May 29, 2019 · 13 comments

Comments

@rrarey02
Copy link

I am using this plugin in Android and it works great, but I cannot get my app to build in iOS. I receive a lot of errors.

I've created my Flutter project with the Swift dependencies, updated my Podfile to use frameworks, specify the SWIFT_VERSION, and done everything else I can think of. Errors persist.

Any help is greatly appreciated!

Flutter doctor:
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-US)
• Flutter version 1.5.4-hotfix.2 at /flutter
• Framework revision 7a4c33425d (4 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/r/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• ios-deploy 1.9.4
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] Connected device (1 available)
• iPhone Xʀ • 9A4E48A2-2726-481D-A07C-7C7235E4754C • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

• No issues found!

flutter run output:
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/FlutterWebViewController.swift:34:17: warning: result of call to 'parse(options:)' is unused
options.parse(options: initialOptions)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/FlutterWebViewController.swift:50:46: warning: conditional downcast from 'String?' to 'String' does nothing
let data = (initialData!["data"] as? String)!
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

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

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

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

/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/FlutterWebViewController.swift:219:41: warning: result of call to 'parse(options:)' is unused
                    inAppWebViewOptions.parse(options: inAppWebViewOptionsMap)
                                        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=== BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:174:96: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
        webView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.webView, 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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:175:93: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
        webView_TopFullScreenConstraint = NSLayoutConstraint(item: self.webView, 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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:243: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:243: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:265:51: error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                    self.tmpWindow?.windowLevel = 0.0
                                                  ^~~
                                                  UIWindow.Level(rawValue:  )
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:274:51: error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                    self.tmpWindow?.windowLevel = 0.0
                                                  ^~~
                                                  UIWindow.Level(rawValue:  )
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:363:32: warning: result of call to 'parse(options:)' is unused
        newInAppWebViewOptions.parse(options: newOptionsMap)
                               ^    ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:239: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:239: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:27: warning: expression implicitly coerced from 'String?' to 'Any'
                    print((result as! FlutterError).message)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:53: note: provide a default value to avoid this warning
                    print((result as! FlutterError).message)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                            ?? <#default value#>
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:53: note: force-unwrap the value to avoid this warning
                    print((result as! FlutterError).message)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                           !
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:53: note: explicitly cast to 'Any' with 'as Any' to silence this warning
                    print((result as! FlutterError).message)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                            as Any
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: warning: expression implicitly coerced from 'Error?' to 'Any'
                        print(error)
                              ^~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: note: provide a default value to avoid this warning
                        print(error)
                              ^~~~~
                                    ?? <#default value#>
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: note: force-unwrap the value to avoid this warning
                        print(error)
                              ^~~~~
                                   !
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: note: explicitly cast to 'Any' with 'as Any' to silence this warning
                        print(error)
                              ^~~~~
                                    as Any
=== BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:174:96: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
        webView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.webView, 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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:175:93: error: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute'
        webView_TopFullScreenConstraint = NSLayoutConstraint(item: self.webView, 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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:243: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:243: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:265:51: error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                    self.tmpWindow?.windowLevel = 0.0
                                                  ^~~
                                                  UIWindow.Level(rawValue:  )
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:274:51: error: cannot assign value of type 'Double' to type 'UIWindow.Level'
                    self.tmpWindow?.windowLevel = 0.0
                                                  ^~~
                                                  UIWindow.Level(rawValue:  )
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppBrowserWebViewController.swift:363:32: warning: result of call to 'parse(options:)' is unused
        newInAppWebViewOptions.parse(options: newOptionsMap)
                               ^    ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:239: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:239: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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:27: warning: expression implicitly coerced from 'String?' to 'Any'
                    print((result as! FlutterError).message)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:53: note: provide a default value to avoid this warning
                    print((result as! FlutterError).message)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                            ?? <#default value#>
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:53: note: force-unwrap the value to avoid this warning
                    print((result as! FlutterError).message)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                           !
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:755:53: note: explicitly cast to 'Any' with 'as Any' to silence this warning
                    print((result as! FlutterError).message)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                            as Any
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: warning: expression implicitly coerced from 'Error?' to 'Any'
                        print(error)
                              ^~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: note: provide a default value to avoid this warning
                        print(error)
                              ^~~~~
                                    ?? <#default value#>
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: note: force-unwrap the value to avoid this warning
                        print(error)
                              ^~~~~
                                   !
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/InAppWebView.swift:813:31: note: explicitly cast to 'Any' with 'as Any' to silence this warning
                        print(error)
                              ^~~~~
                                    as Any
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:62:13: warning: result of 'MyCookieManager' initializer is unused
            MyCookieManager(registrar: registrar)
            ^              ~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:228:45: warning: result of call to 'parse(options:)' is unused
                        inAppBrowserOptions.parse(options: inAppBrowserOptionsMap)
                                            ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:362:31: warning: result of call to 'parse(options:)' is unused
                safariOptions.parse(options: options)
                              ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:400:32: warning: result of call to 'parse(options:)' is unused
                browserOptions.parse(options: optionsFallback!)
                               ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:403:32: warning: result of call to 'parse(options:)' is unused
                webViewOptions.parse(options: optionsFallback!)
                               ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:408:28: warning: result of call to 'parse(options:)' is unused
            browserOptions.parse(options: options)
                           ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:411:28: warning: result of call to 'parse(options:)' is unused
            webViewOptions.parse(options: options)
                           ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:476:24: warning: result of call to 'parse(options:)' is unused
        browserOptions.parse(options: options)
                       ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:479:24: warning: result of call to 'parse(options:)' is unused
        webViewOptions.parse(options: options)
                       ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:62:13: warning: result of 'MyCookieManager' initializer is unused
            MyCookieManager(registrar: registrar)
            ^              ~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:228:45: warning: result of call to 'parse(options:)' is unused
                        inAppBrowserOptions.parse(options: inAppBrowserOptionsMap)
                                            ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:362:31: warning: result of call to 'parse(options:)' is unused
                safariOptions.parse(options: options)
                              ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:400:32: warning: result of call to 'parse(options:)' is unused
                browserOptions.parse(options: optionsFallback!)
                               ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:403:32: warning: result of call to 'parse(options:)' is unused
                webViewOptions.parse(options: optionsFallback!)
                               ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:408:28: warning: result of call to 'parse(options:)' is unused
            browserOptions.parse(options: options)
                           ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:411:28: warning: result of call to 'parse(options:)' is unused
            webViewOptions.parse(options: options)
                           ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:476:24: warning: result of call to 'parse(options:)' is unused
        browserOptions.parse(options: options)
                       ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/ios/Classes/SwiftFlutterPlugin.swift:479:24: warning: result of call to 'parse(options:)' is unused
        webViewOptions.parse(options: options)
                       ^    ~~~~~~~~~~~~~~~~~~
/Users/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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/r/.pub-cache/hosted/pub.dartlang.org/flutter_inappbrowser-1.2.0/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] {
           ~~~~^~~~~~~~~~~~~~~~~~~~
@pichillilorenzo
Copy link
Owner

Did you specify SWIFT_VERSION to 4.0, right? However, I think I need to update my code to Swift 4.2

@rrarey02
Copy link
Author

Ugh. I did try 4.0 but I must have been experiencing error message fatigue. Sorry about that. After trying that version again and looking more closely at the errors I see it was another plugin causing problems there. This plugin appears to be building fine now after resolving that other plugin's issues.

However now while using it I am running into another issue which has already been reported: https://github.com/pichillilorenzo/flutter_inappbrowser/issues/78#issue-430487861

This issue can be closed. Thanks!

@AlexV525
Copy link
Contributor

@rrarey02 Hi man, how did you solve this at last, which plugin you have been resolved to fix this issue? I'm facing this issue too.

@rrarey02
Copy link
Author

@rrarey02 Hi man, how did you solve this at last, which plugin you have been resolved to fix this issue? I'm facing this issue too.

@AlexVincent525 - I am still using flutter_inappbrowser. The SWIFT_VERSION issue was a problem with the url_launcher plugin, if I recall correctly. So I upgraded the url_launcher plugin and then my app would build. At the time there was still an iOS bug in flutter_inappbrowser that would cause the app to crash, but that was fixed in v1.2.1. Everything is working for me now.

@AlexV525
Copy link
Contributor

@AlexVincent525 - I am still using flutter_inappbrowser. The SWIFT_VERSION issue was a problem with the url_launcher plugin, if I recall correctly. So I upgraded the url_launcher plugin and then my app would build. At the time there was still an iOS bug in flutter_inappbrowser that would cause the app to crash, but that was fixed in v1.2.1. Everything is working for me now.

@rrarey02 I found another solution for this issue, and i'm using flutter_inappbrowser too with v1.2.1, my conflict was with multi_image_picker, which is they are using different version of swift, makes thoes APIs conflicted, so I specified swift version for each of them, and thing works fine now.

@kihonq
Copy link

kihonq commented Aug 1, 2019

@AlexVincent525 - I am still using flutter_inappbrowser. The SWIFT_VERSION issue was a problem with the url_launcher plugin, if I recall correctly. So I upgraded the url_launcher plugin and then my app would build. At the time there was still an iOS bug in flutter_inappbrowser that would cause the app to crash, but that was fixed in v1.2.1. Everything is working for me now.

@rrarey02 I found another solution for this issue, and i'm using flutter_inappbrowser too with v1.2.1, my conflict was with multi_image_picker, which is they are using different version of swift, makes thoes APIs conflicted, so I specified swift version for each of them, and thing works fine now.

Hi Alex,
How do you determine and redefine the swift version inside each pods?

@AlexV525
Copy link
Contributor

AlexV525 commented Aug 1, 2019

@qeehong Hi, I don't have macOS environment now, so I can't provide more information about how I done this, but what I can remember is it's located in something related to pod configuration itself.

@hrsma2i
Copy link

hrsma2i commented Oct 20, 2019

@AlexVincent525 Hi, I can specify Swift version only for flutter_inappbrowser along with this way. https://stackoverflow.com/questions/40501440/how-to-set-the-legacy-swift-version-for-each-pod-in-podfile-xcode-9-0-swift-3-2

In the Podfile,

target 'Runner' do
  use_frameworks!  # required by simple_permission
  ...
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      #----edited-----
      if target.name == 'flutter_inappbrowser'
        config.build_settings['SWIFT_VERSION'] = '4.0'
      end
      #----edited-----
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

@AlexV525
Copy link
Contributor

@hrsma2i Thanks for providing a better solution 😄 , and this repo hasn't been maintain for a while, I've just switch to other package.

@hrsma2i
Copy link

hrsma2i commented Oct 20, 2019

@AlexVincent525 Thanks for your advice! I'm finding in-app browser packages for Flutter and tried webview_flutter and flutter_webview_plugin, but in both the keyboard doesn't appear. Do you know better packages?

@AlexV525
Copy link
Contributor

@hrsma2i For now those packages both displayed keyboard normally. You can upgrade your flutter version to latest stable and try again. The flutter_webview_plugin support all android versions displaying keyboard, but webview_flutter might just support from sdk 23 or 24 to higher I guess? It's been written in the document.

@hrsma2i
Copy link

hrsma2i commented Oct 20, 2019

@AlexVincent525 Thank you. Maybe flutter_webview_plugin doesn't support iOS now.
fluttercommunity/flutter_webview_plugin#281

But I'll use flutter_webview_plugin, contributing it.

This was referenced Jul 6, 2020
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants