Skip to content

Commit

Permalink
create pod lib
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilveirah committed Jan 28, 2019
1 parent 2013768 commit 2e816b9
Show file tree
Hide file tree
Showing 92 changed files with 2,000 additions and 5,614 deletions.
Empty file added Assets/.gitkeep
Empty file.
Empty file added Classes/.gitkeep
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public typealias Callback = (ConsentWebView) -> Void
import UIKit
import WebKit
import JavaScriptCore
import Consent_String_SDK_Swift

/**
SourcePoint's Consent SDK is a WebView that loads SourcePoint's web consent managment tool
Expand Down Expand Up @@ -269,7 +268,7 @@ public class ConsentWebView: UIViewController, WKUIDelegate, WKNavigationDelegat
windowFeatures: WKWindowFeatures!) -> WKWebView! {
if navigationAction != nil && navigationAction!.request.url != nil {
if #available(iOS 10.0, *) {
UIApplication.shared.open(navigationAction!.request.url!, options: [:], completionHandler: nil)
UIApplication.shared.open(navigationAction!.request.url!, options: convertToUIApplicationOpenExternalURLOptionsKeyDictionary([:]), completionHandler: nil)
} else {
UIApplication.shared.openURL(navigationAction!.request.url!)
}
Expand Down Expand Up @@ -661,3 +660,8 @@ public class ConsentWebView: UIViewController, WKUIDelegate, WKNavigationDelegat
}
}


// 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)})
}
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions ConsentWebView.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Pod::Spec.new do |s|
s.name = 'ConsentWebView'
s.version = '0.1.0'
s.summary = 'SourcePoint\'s ConsentWebView to handle privacy consents.'
s.homepage = 'https://www.sourcepoint.com'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'SourcePoint' => '[email protected]' }
s.source = { :git => 'https://github.com/SourcePointUSA/ios-cmp-app.git', :tag => s.version.to_s }
s.ios.deployment_target = '9.0'
s.source_files = 'Classes/**/*'
end
Loading

0 comments on commit 2e816b9

Please sign in to comment.