commit
303a8d2e31
|
@ -179,7 +179,7 @@
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
DevelopmentTeam = PFP8UV45Y6;
|
DevelopmentTeam = PFP8UV45Y6;
|
||||||
LastSwiftMigration = 0910;
|
LastSwiftMigration = 1100;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -188,6 +188,7 @@
|
||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
|
English,
|
||||||
en,
|
en,
|
||||||
Base,
|
Base,
|
||||||
);
|
);
|
||||||
|
@ -447,7 +448,7 @@
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||||
SWIFT_VERSION = 4.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
|
@ -475,7 +476,7 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||||
SWIFT_VERSION = 4.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Flutter
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
|
|
|
@ -172,8 +172,8 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU
|
||||||
}
|
}
|
||||||
|
|
||||||
func prepareConstraints () {
|
func prepareConstraints () {
|
||||||
containerWebView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.containerWebView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: self.view, attribute: NSLayoutAttribute.bottom, multiplier: 1, constant: 0)
|
containerWebView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.containerWebView, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
|
||||||
containerWebView_TopFullScreenConstraint = NSLayoutConstraint(item: self.containerWebView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: self.view, attribute: NSLayoutAttribute.top, multiplier: 1, constant: 0)
|
containerWebView_TopFullScreenConstraint = NSLayoutConstraint(item: self.containerWebView, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
|
||||||
|
|
||||||
webView.translatesAutoresizingMaskIntoConstraints = false
|
webView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
let height = NSLayoutConstraint(item: webView, attribute: .height, relatedBy: .equal, toItem: containerWebView, attribute: .height, multiplier: 1, constant: 0)
|
let height = NSLayoutConstraint(item: webView, attribute: .height, relatedBy: .equal, toItem: containerWebView, attribute: .height, multiplier: 1, constant: 0)
|
||||||
|
@ -183,8 +183,8 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU
|
||||||
let bottomContraint = NSLayoutConstraint(item: webView, attribute: .bottomMargin, relatedBy: .equal, toItem: containerWebView, attribute: .bottomMargin, multiplier: 1, constant: 0)
|
let bottomContraint = NSLayoutConstraint(item: webView, attribute: .bottomMargin, relatedBy: .equal, toItem: containerWebView, attribute: .bottomMargin, multiplier: 1, constant: 0)
|
||||||
containerWebView.addConstraints([height, width, leftConstraint, rightConstraint, bottomContraint])
|
containerWebView.addConstraints([height, width, leftConstraint, rightConstraint, bottomContraint])
|
||||||
|
|
||||||
webView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.webView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: self.containerWebView, attribute: NSLayoutAttribute.bottom, multiplier: 1, constant: 0)
|
webView_BottomFullScreenConstraint = NSLayoutConstraint(item: self.webView, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.containerWebView, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
|
||||||
webView_TopFullScreenConstraint = NSLayoutConstraint(item: self.webView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: self.containerWebView, attribute: NSLayoutAttribute.top, multiplier: 1, constant: 0)
|
webView_TopFullScreenConstraint = NSLayoutConstraint(item: self.webView, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.containerWebView, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func prepareWebView() {
|
func prepareWebView() {
|
||||||
|
@ -254,7 +254,7 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU
|
||||||
}
|
}
|
||||||
|
|
||||||
func setWebViewFrame(_ frame: CGRect) {
|
func setWebViewFrame(_ frame: CGRect) {
|
||||||
print("Setting the WebView's frame to \(NSStringFromCGRect(frame))")
|
print("Setting the WebView's frame to \(NSCoder.string(for: frame))")
|
||||||
webView.frame = frame
|
webView.frame = frame
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,13 +274,13 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU
|
||||||
|
|
||||||
if (weakSelf?.responds(to: #selector(getter: self.presentingViewController)))! {
|
if (weakSelf?.responds(to: #selector(getter: self.presentingViewController)))! {
|
||||||
weakSelf?.presentingViewController?.dismiss(animated: true, completion: {() -> Void in
|
weakSelf?.presentingViewController?.dismiss(animated: true, completion: {() -> Void in
|
||||||
self.tmpWindow?.windowLevel = 0.0
|
self.tmpWindow?.windowLevel = UIWindow.Level(rawValue: 0.0)
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
weakSelf?.parent?.dismiss(animated: true, completion: {() -> Void in
|
weakSelf?.parent?.dismiss(animated: true, completion: {() -> Void in
|
||||||
self.tmpWindow?.windowLevel = 0.0
|
self.tmpWindow?.windowLevel = UIWindow.Level(rawValue: 0.0)
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,7 +240,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
|
||||||
takeSnapshot(with: nil, completionHandler: {(image, error) -> Void in
|
takeSnapshot(with: nil, completionHandler: {(image, error) -> Void in
|
||||||
var imageData: Data? = nil
|
var imageData: Data? = nil
|
||||||
if let screenshot = image {
|
if let screenshot = image {
|
||||||
imageData = UIImagePNGRepresentation(screenshot)!
|
imageData = screenshot.pngData()!
|
||||||
}
|
}
|
||||||
completionHandler(imageData)
|
completionHandler(imageData)
|
||||||
})
|
})
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SafariViewController: SFSafariViewController, SFSafariViewControllerDelega
|
||||||
dismiss(animated: true)
|
dismiss(animated: true)
|
||||||
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(400), execute: {() -> Void in
|
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(400), execute: {() -> Void in
|
||||||
self.tmpWindow?.windowLevel = 0.0
|
self.tmpWindow?.windowLevel = UIWindow.Level(rawValue: 0.0)
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
|
|
||||||
if (self.statusDelegate != nil) {
|
if (self.statusDelegate != nil) {
|
||||||
|
|
|
@ -350,7 +350,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
let tmpController = UIViewController()
|
let tmpController = UIViewController()
|
||||||
let baseWindowLevel = UIApplication.shared.keyWindow?.windowLevel
|
let baseWindowLevel = UIApplication.shared.keyWindow?.windowLevel
|
||||||
self.tmpWindow?.rootViewController = tmpController
|
self.tmpWindow?.rootViewController = tmpController
|
||||||
self.tmpWindow?.windowLevel = UIWindowLevel(baseWindowLevel! + 1)
|
self.tmpWindow?.windowLevel = UIWindow.Level(baseWindowLevel!.rawValue + 1)
|
||||||
self.tmpWindow?.makeKeyAndVisible()
|
self.tmpWindow?.makeKeyAndVisible()
|
||||||
|
|
||||||
let browserOptions: InAppBrowserOptions
|
let browserOptions: InAppBrowserOptions
|
||||||
|
@ -435,7 +435,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
// UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: self.previousStatusBarStyle)!
|
// UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: self.previousStatusBarStyle)!
|
||||||
// }
|
// }
|
||||||
webViewController.presentingViewController?.dismiss(animated: false, completion: {() -> Void in
|
webViewController.presentingViewController?.dismiss(animated: false, completion: {() -> Void in
|
||||||
self.tmpWindow?.windowLevel = 0.0
|
self.tmpWindow?.windowLevel = UIWindow.Level(rawValue: 0.0)
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
let tmpController = UIViewController()
|
let tmpController = UIViewController()
|
||||||
let baseWindowLevel = UIApplication.shared.keyWindow?.windowLevel
|
let baseWindowLevel = UIApplication.shared.keyWindow?.windowLevel
|
||||||
self.tmpWindow?.rootViewController = tmpController
|
self.tmpWindow?.rootViewController = tmpController
|
||||||
self.tmpWindow?.windowLevel = UIWindowLevel(baseWindowLevel! + 1)
|
self.tmpWindow?.windowLevel = UIWindow.Level(baseWindowLevel!.rawValue + 1)
|
||||||
self.tmpWindow?.makeKeyAndVisible()
|
self.tmpWindow?.makeKeyAndVisible()
|
||||||
|
|
||||||
let browserOptions: InAppBrowserOptions
|
let browserOptions: InAppBrowserOptions
|
||||||
|
@ -499,7 +499,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
webViewController.webView.loadData(data: data, mimeType: mimeType, encoding: encoding, baseUrl: baseUrl)
|
webViewController.webView.loadData(data: data, mimeType: mimeType, encoding: encoding, baseUrl: baseUrl)
|
||||||
})
|
})
|
||||||
webViewController.presentingViewController?.dismiss(animated: false, completion: {() -> Void in
|
webViewController.presentingViewController?.dismiss(animated: false, completion: {() -> Void in
|
||||||
self.tmpWindow?.windowLevel = 0.0
|
self.tmpWindow?.windowLevel = UIWindow.Level(rawValue: 0.0)
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if #available(iOS 10.0, *) {
|
if #available(iOS 10.0, *) {
|
||||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
UIApplication.shared.open(url, options: convertToUIApplicationOpenExternalURLOptionsKeyDictionary([:]), completionHandler: nil)
|
||||||
} else {
|
} else {
|
||||||
UIApplication.shared.openURL(url)
|
UIApplication.shared.openURL(url)
|
||||||
}
|
}
|
||||||
|
@ -536,7 +536,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
DispatchQueue.main.async(execute: {() -> Void in
|
DispatchQueue.main.async(execute: {() -> Void in
|
||||||
if webViewController != nil {
|
if webViewController != nil {
|
||||||
let baseWindowLevel = UIApplication.shared.keyWindow?.windowLevel
|
let baseWindowLevel = UIApplication.shared.keyWindow?.windowLevel
|
||||||
self.tmpWindow?.windowLevel = UIWindowLevel(baseWindowLevel! + 1)
|
self.tmpWindow?.windowLevel = UIWindow.Level(baseWindowLevel!.rawValue + 1)
|
||||||
self.tmpWindow?.makeKeyAndVisible()
|
self.tmpWindow?.makeKeyAndVisible()
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
self.tmpWindow?.rootViewController?.present(webViewController!, animated: true, completion: nil)
|
self.tmpWindow?.rootViewController?.present(webViewController!, animated: true, completion: nil)
|
||||||
|
@ -558,7 +558,7 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
DispatchQueue.main.async(execute: {() -> Void in
|
DispatchQueue.main.async(execute: {() -> Void in
|
||||||
if webViewController != nil {
|
if webViewController != nil {
|
||||||
webViewController?.presentingViewController?.dismiss(animated: true, completion: {() -> Void in
|
webViewController?.presentingViewController?.dismiss(animated: true, completion: {() -> Void in
|
||||||
self.tmpWindow?.windowLevel = 0.0
|
self.tmpWindow?.windowLevel = UIWindow.Level(rawValue: 0.0)
|
||||||
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
UIApplication.shared.delegate?.window??.makeKeyAndVisible()
|
||||||
if self.previousStatusBarStyle != -1 {
|
if self.previousStatusBarStyle != -1 {
|
||||||
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: self.previousStatusBarStyle)!
|
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: self.previousStatusBarStyle)!
|
||||||
|
@ -749,3 +749,8 @@ public class SwiftFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Helper function inserted by Swift 4.2 migrator.
|
||||||
|
fileprivate func convertToUIApplicationOpenExternalURLOptionsKeyDictionary(_ input: [String: Any]) -> [UIApplication.OpenExternalURLOptionsKey: Any] {
|
||||||
|
return Dictionary(uniqueKeysWithValues: input.map { key, value in (UIApplication.OpenExternalURLOptionsKey(rawValue: key), value)})
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue