Skip to content

Commit

Permalink
pulled release from 4.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed Oct 7, 2023
1 parent 60c4bdb commit 0f23573
Show file tree
Hide file tree
Showing 155 changed files with 3,730 additions and 815 deletions.
26 changes: 15 additions & 11 deletions AppboyKit/ABKModalWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ - (void)viewDidLoad {
[super viewDidLoad];

UIViewController *webViewController = [[UIViewController alloc] init];
webViewController.edgesForExtendedLayout = UIRectEdgeNone;

self.webView = [self getWebView];
webViewController.view = self.webView;
#if !TARGET_OS_TV
if (@available(iOS 15.0, *)) {
self.view.backgroundColor = UIColor.systemGroupedBackgroundColor;
}
#endif

[self setupProgressBarWithViewController:webViewController];

Expand All @@ -27,7 +30,6 @@ - (void)viewDidLoad {
[self setViewControllers:@[webViewController]];

[self.webView loadRequest:[NSURLRequest requestWithURL:self.url]];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

- (void)observeValueForKeyPath:(NSString *)keyPath
Expand Down Expand Up @@ -64,7 +66,9 @@ - (void)dealloc {
*
*/
- (WKWebView *)getWebView {
WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectZero];
WKWebViewConfiguration *webViewConfiguration = [[WKWebViewConfiguration alloc] init];
webViewConfiguration.allowsInlineMediaPlayback = YES;
WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:webViewConfiguration];
webView.navigationDelegate = self;
return webView;
}
Expand Down Expand Up @@ -120,8 +124,9 @@ - (void)closeButtonPressed:(id)sender {

#pragma mark - WKNavigationDelegate methods

- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
- (void)webView:(WKWebView *)webView
decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
NSString *urlString = [[navigationAction.request.mainDocumentURL absoluteString] lowercaseString];
NSArray *stringComponents = [urlString componentsSeparatedByString:@":"];
if ([stringComponents[1] hasPrefix:@"//itunes.apple.com"] ||
Expand All @@ -137,15 +142,14 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati
decisionHandler(WKNavigationActionPolicyAllow);
}

- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
self.progressBar.alpha = 0.0;
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}

- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation
withError:(NSError *)error{
- (void)webView:(WKWebView *)webView
didFailProvisionalNavigation:(WKNavigation *)navigation
withError:(NSError *)error {
self.progressBar.alpha = 0.0;
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

// Display localized "No Connection" message
UILabel *label = [[UILabel alloc] init];
Expand Down
Binary file modified AppboyKit/Appboy.bundle/Info.plist
Binary file not shown.
Binary file added AppboyKit/Appboy.bundle/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0f23573

Please sign in to comment.