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

Remove UIWebView and update from upstream repository #7

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0313148
Updated ExampleProject to new interface.
dfmuir Oct 21, 2014
5ba2800
Now supports launching external apps. For security, a UIAlertView ask…
dfmuir Oct 27, 2014
95c9ffc
add page title in share text
Nov 18, 2014
cd3126d
Added a delegate method for understanding when the browser is about t…
Jan 30, 2015
6d49d3b
Adding custom activities array
front9tech Mar 29, 2015
c5ed5b2
Merge pull request #1 from front9tech/front9tech-patch-1
front9tech Mar 29, 2015
ad02faf
Adding custom activities array
front9tech Mar 29, 2015
05603e1
Merge pull request #2 from front9tech/front9tech-patch-2
front9tech Mar 29, 2015
551a43f
Now supports launching external apps. For security, a UIAlertView ask…
dfmuir Oct 27, 2014
164e827
Now supports safe external app links from WKWebView and UIWebView
dfmuir May 10, 2015
5e04df3
Updated podspec to 1.0.3
dfmuir May 10, 2015
b0400ee
Updated podspec to 1.2.0
dfmuir May 10, 2015
8fba0ff
Updated podspec to 1.2.0
dfmuir May 10, 2015
1d57667
Updated podspec to 1.2.0
dfmuir May 10, 2015
e9e5832
Fixed issue where tintColor and barTintColor might have no effect.
dfmuir May 10, 2015
9f1c45f
Merge pull request #15 from EgoAleSum/closedelegate
dfmuir May 10, 2015
810b995
Merge branch 'master' of github.com:dfmuir/KINWebBrowser
dfmuir May 10, 2015
407f561
Merge pull request #13 from sakebook/share_url_title
dfmuir May 10, 2015
8bc0262
Merge branch 'master' of github.com:dfmuir/KINWebBrowser
dfmuir May 10, 2015
3b3d8e6
Added support for custom activities
dfmuir May 10, 2015
2a0a9e7
Updated podspec to 1.2.1
dfmuir May 10, 2015
54fac36
Updated podspec to 1.2.1
dfmuir May 10, 2015
6a5d144
Merge branch 'master' of github.com:dfmuir/KINWebBrowser
dfmuir May 10, 2015
ceff063
Updated podspec to 1.2.2
dfmuir May 10, 2015
2032a04
Changed initialization to better support subclassing at suggestion of…
dfmuir May 10, 2015
2386cbf
Updated podspec to 1.2.3
dfmuir May 10, 2015
fb5fd16
Replaced deprecated interface idiom macro with modern code.
dfmuir May 17, 2015
0014c1f
Replaced deprecated interface idiom macro with modern code.
dfmuir May 17, 2015
ce8253f
Merge branch 'master' of github.com:dfmuir/KINWebBrowser
dfmuir May 17, 2015
08951f9
update dependency to support frameworks
toto Aug 28, 2015
6e130cf
take images out of bundles
toto Aug 30, 2015
b0793e4
Merge pull request #35 from toto/master
dfmuir Sep 4, 2015
304ee69
Added ability to load HTML string.
dfmuir Sep 4, 2015
1cee6e6
Added ability to load NSURLRequest.
dfmuir Sep 4, 2015
9d61980
Fixed crash issue for UIActivityViewController when page fails to load.
dfmuir Sep 4, 2015
1792bd4
Reverted podfile from development configuration.
dfmuir Sep 4, 2015
9db6402
Updated podspec to version 1.3.0
dfmuir Sep 4, 2015
b18a051
Updated podspec to version 1.3.0
dfmuir Sep 4, 2015
eba71ba
supported interface orientations returns UIInterfaceOrientationMask i…
Sep 9, 2015
d745756
Merge pull request #36 from tiagomartinho/master
dfmuir Oct 1, 2015
8cf6fb2
Updated podspec to 1.3.1
dfmuir Oct 1, 2015
520f7f5
Fix Bug
Oct 12, 2015
975578f
made the actionButton property public so we can access it when we nee…
PhilippeRiegert Oct 20, 2015
54e87bb
Merge pull request #41 from phyllipe/master
dfmuir Nov 5, 2015
b8f26ff
Merge pull request #40 from developforapple/master
dfmuir Nov 5, 2015
5ec2b3e
Cleaned up pull requests.
dfmuir Nov 5, 2015
2b749eb
Updated ARChromeAcitivity to the most recent version.
dfmuir Nov 5, 2015
ecf9142
Correct the spelling of CocoaPods in README
ReadmeCritic Feb 11, 2016
81a4b53
Merge pull request #50 from ReadmeCritic/master
dfmuir Feb 12, 2016
3403195
Use [KINWebBrowserViewController class] instead of [self class].
mattia May 31, 2016
89ff0fc
Merge pull request #57 from mattia/fix-subclass
dfmuir Apr 6, 2017
f039087
feat: updated example project to ios 8.0 minimum-version
matrad Oct 5, 2020
25f8fff
feat: removed deprected UIWebView fixes #69
matrad Oct 5, 2020
97f3fca
Update KINWebBrowserViewController.h
matrad Oct 5, 2020
cc7aa47
feat: removed deprecated UIWebView fixes #69
matrad Oct 5, 2020
11f724f
feat: removed deprecated UIWebView fixes dfmuir#69
matrad Oct 12, 2020
ba7cdbe
Merge branch 'master' of https://github.com/dfmuir/KINWebBrowser into…
aka47 Mar 9, 2022
35f2ac4
Merge branch 'master' of https://github.com/matrad/KINWebBrowser into…
aka47 Mar 9, 2022
e777e8a
fix merge conflict gone wrong
aka47 Mar 9, 2022
87432b5
fix another broken method after merge
aka47 Mar 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ExampleProject/KINWebBrowserExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 3BBECF1C18A1E58D00A2499D;
Expand Down Expand Up @@ -427,6 +428,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "KINWebBrowserExample/KINWebBrowserExample-Prefix.pch";
INFOPLIST_FILE = "KINWebBrowserExample/KINWebBrowserExample-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -441,6 +443,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "KINWebBrowserExample/KINWebBrowserExample-Prefix.pch";
INFOPLIST_FILE = "KINWebBrowserExample/KINWebBrowserExample-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,97 @@
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ @interface KINWebBrowserExampleViewController ()

@end

static NSString *const defaultAddress = @"http://www.apple.com/";
static NSString *const defaultAddress = @"https://www.apple.com";

@implementation KINWebBrowserExampleViewController

Expand Down Expand Up @@ -87,6 +87,11 @@ - (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFailToLoadURL:(N
NSLog(@"Failed To Load URL : %@ With Error: %@", URL, error);
}

- (void)webBrowserViewControllerWillDismiss:(KINWebBrowserViewController*)viewController {
NSLog(@"View Controller will dismiss: %@", viewController);

}


#pragma mark - IBActions

Expand Down
5 changes: 3 additions & 2 deletions ExampleProject/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source 'https://github.com/CocoaPods/Specs.git'

xcodeproj 'KINWebBrowserExample.xcodeproj'
platform :ios, :deployment_target => '7.0'
platform :ios, :deployment_target => '8.0'

pod 'KINWebBrowser'

pod 'KINWebBrowser', '~> 1.1'
15 changes: 9 additions & 6 deletions KINWebBrowser.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
Pod::Spec.new do |s|

s.name = "KINWebBrowser"

s.version = "1.1.0"
s.version = "1.3.3"
s.summary = "A web browser module for your apps."
s.description = <<-DESC
KINWebBrowser is a web browser module for your apps. Powered by WKWebView on iOS 8. Backwards compatible with iOS 7 using UIWebView. KINWebBrowser offers the simplest way to add a web browser to your apps.
KINWebBrowser is a web browser module for your apps. Powered by WKWebView on iOS 8. KINWebBrowser offers the simplest way to add a web browser to your apps.
DESC

s.homepage = "https://github.com/dfmuir/KINWebBrowser"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "David F. Muir V" => "[email protected]" }
s.platform = :ios, '7.0'
s.platform = :ios, '8.0'
s.source = { :git => "https://github.com/dfmuir/KINWebBrowser.git", :tag => s.version.to_s }
s.source_files = 'KINWebBrowser', 'KINWebBrowser/**/*.{h,m}'
s.resources = "Assets/*.png"
s.requires_arc = true
s.frameworks = 'WebKit'

end
s.weak_framework = 'WebKit'

s.dependency 'TUSafariActivity', '1.0.4'
s.dependency 'ARChromeActivity', '1.0.5'

end
48 changes: 29 additions & 19 deletions KINWebBrowser/KINWebBrowserViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
@class KINWebBrowserViewController;

/*

UINavigationController+KINWebBrowserWrapper category enables access to casted KINWebBroswerViewController when set as rootViewController of UINavigationController

*/
@interface UINavigationController(KINWebBrowser)

Expand All @@ -54,18 +54,17 @@
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didStartLoadingURL:(NSURL *)URL;
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFinishLoadingURL:(NSURL *)URL;
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFailToLoadURL:(NSURL *)URL error:(NSError *)error;
- (BOOL)webBrowser:(KINWebBrowserViewController *)webBrowser shouldStartLoadWithRequest:(NSURLRequest *)request;
- (void)willDismissWebBrowser:(KINWebBrowserViewController *)webBrowser;
- (void)webBrowserViewControllerWillDismiss:(KINWebBrowserViewController*)viewController;
@end


/*

KINWebBrowserViewController is designed to be used inside of a UINavigationController.
For convenience, two sets of static initializers are available.

*/
@interface KINWebBrowserViewController : UIViewController <WKNavigationDelegate, WKUIDelegate, UIWebViewDelegate>
@interface KINWebBrowserViewController : UIViewController <WKNavigationDelegate, WKUIDelegate>

#pragma mark - Public Properties

Expand All @@ -77,52 +76,63 @@
// The web views
// Depending on the version of iOS, one of these will be set
@property (nonatomic, strong) WKWebView *wkWebView;
@property (nonatomic, strong) UIWebView *uiWebView;

- (id)initWithConfiguration:(WKWebViewConfiguration *)configuration NS_AVAILABLE_IOS(8_0);
- (id)initWithConfiguration:(WKWebViewConfiguration *)configuration;

#pragma mark - Static Initializers

/*
Initialize a basic KINWebBrowserViewController instance for push onto navigation stack

Ideal for use with UINavigationController pushViewController:animated: or initWithRootViewController:

Optionally specify KINWebBrowser options or WKWebConfiguration
*/

+ (KINWebBrowserViewController *)webBrowser;
+ (KINWebBrowserViewController *)webBrowserWithConfiguration:(WKWebViewConfiguration *)configuration NS_AVAILABLE_IOS(8_0);
+ (KINWebBrowserViewController *)webBrowserWithConfiguration:(WKWebViewConfiguration *)configuration;

/*
Initialize a UINavigationController with a KINWebBrowserViewController for modal presentation.

Ideal for use with presentViewController:animated:

Optionally specify KINWebBrowser options or WKWebConfiguration
*/

+ (UINavigationController *)navigationControllerWithWebBrowser;
+ (UINavigationController *)navigationControllerWithWebBrowserWithConfiguration:(WKWebViewConfiguration *)configuration NS_AVAILABLE_IOS(8_0);

+ (UINavigationController *)navigationControllerWithWebBrowserWithConfiguration:(WKWebViewConfiguration *)configuration;


@property (nonatomic, strong) UIBarButtonItem *actionButton;
@property (nonatomic, strong) UIColor *tintColor;
@property (nonatomic, strong) UIColor *barTintColor;
@property (nonatomic, assign) BOOL actionButtonHidden;
@property (nonatomic, assign) BOOL showsURLInNavigationBar;
@property (nonatomic, assign) BOOL showsPageTitleInNavigationBar;

//Allow for custom activities in the browser by populating this optional array
@property (nonatomic, strong) NSArray *customActivityItems;

#pragma mark - Public Interface

// Load a NSURL to webView

// Load a NSURLURLRequest to web view
// Can be called any time after initialization
- (void)loadRequest:(NSURLRequest *)request;

// Load a NSURL to web view
// Can be called any time after initialization
- (void)loadURL:(NSURL *)URL;

// Loads a URL as NSString to webView
// Loads a URL as NSString to web view
// Can be called any time after initialization
- (void)loadURLString:(NSString *)URLString;
- (void)doneButtonPressed:(id)sender;

@end

// Loads an string containing HTML to web view
// Can be called any time after initialization
- (void)loadHTMLString:(NSString *)HTMLString;

@end
Loading