From d8053452d9d2ab8c9f54957839e16698c6273687 Mon Sep 17 00:00:00 2001 From: queue-it Date: Wed, 4 May 2022 12:35:14 +0000 Subject: [PATCH] Preparing release 3.0.13 --- QueueITLib/QueueConsts.h | 2 +- QueueITLib/QueueITWKViewController.h | 2 +- QueueITLib/QueueITWKViewController.m | 36 +++++++++++++++++----------- QueueITLibrary.podspec | 4 ++-- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/QueueITLib/QueueConsts.h b/QueueITLib/QueueConsts.h index 2bf12b3..f88c2d4 100644 --- a/QueueITLib/QueueConsts.h +++ b/QueueITLib/QueueConsts.h @@ -3,6 +3,6 @@ #define QueueCloseUrl @"queueit://close" #define QueueRestartSessionUrl @"queueit://restartSession" -#define SDKVersion @"iOS-3.0.12"; +#define SDKVersion @"iOS-3.0.13"; #endif diff --git a/QueueITLib/QueueITWKViewController.h b/QueueITLib/QueueITWKViewController.h index dff2d37..8d575d7 100644 --- a/QueueITLib/QueueITWKViewController.h +++ b/QueueITLib/QueueITWKViewController.h @@ -20,4 +20,4 @@ - (BOOL) isBlockedUrl:(nonnull NSURL*) destinationUrl; -@end \ No newline at end of file +@end diff --git a/QueueITLib/QueueITWKViewController.m b/QueueITLib/QueueITWKViewController.m index 3456241..8fc3604 100644 --- a/QueueITLib/QueueITWKViewController.m +++ b/QueueITLib/QueueITWKViewController.m @@ -84,30 +84,38 @@ - (BOOL)handleSpecialUrls:(NSURL*) url - (void)viewDidLoad { [super viewDidLoad]; - - WKPreferences* preferences = [[WKPreferences alloc]init]; - preferences.javaScriptEnabled = YES; - WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc]init]; - config.preferences = preferences; - WKWebView* view = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height) configuration:config]; - view.navigationDelegate = self; - self.webView = view; - [self.webView setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth]; } - (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; - - self.spinner = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; +} + +-(void)viewWillLayoutSubviews{ + [super viewWillLayoutSubviews]; + self.spinner = [[UIActivityIndicatorView alloc]initWithFrame:self.view.bounds]; [self.spinner setColor:[UIColor grayColor]]; [self.spinner startAnimating]; + WKPreferences* preferences = [[WKPreferences alloc]init]; + preferences.javaScriptEnabled = YES; + WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc]init]; + config.preferences = preferences; + WKWebView* webview = [[WKWebView alloc]initWithFrame:self.view.bounds configuration:config]; + webview.navigationDelegate = self; + [webview setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth]; + // Make webview transparent + webview.opaque = NO; + webview.backgroundColor = [UIColor clearColor]; + self.webView = webview; + [self.view addSubview:self.webView]; [self.webView addSubview:self.spinner]; - NSURL *urlAddress = [NSURL URLWithString:self.queueUrl]; - NSURLRequest *request = [NSURLRequest requestWithURL:urlAddress]; - [self.webView loadRequest:request]; + [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.queueUrl]]]; +} + +-(void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:animated]; } - (void)viewDidDisappear:(BOOL)animated diff --git a/QueueITLibrary.podspec b/QueueITLibrary.podspec index 82aa796..6933344 100644 --- a/QueueITLibrary.podspec +++ b/QueueITLibrary.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "QueueITLibrary" -s.version = "3.0.12" +s.version = "3.0.13" s.summary = "Library for integrating Queue-it into an iOS app using web uI" s.homepage = "https://github.com/queueit/ios-webui-sdk" s.license = 'MIT' s.authors = { 'Queue-It' => 'https://queue-it.com' } s.platform = :ios, '9.3' -s.source = { :git => 'https://github.com/queueit/ios-webui-sdk.git', :tag => '3.0.12' } +s.source = { :git => 'https://github.com/queueit/ios-webui-sdk.git', :tag => '3.0.13' } s.requires_arc = true s.source_files = "QueueITLib/*.{h,m}" end