Skip to content

Commit 8a1cc9d

Browse files
authored
Merge pull request #150 from jquick-axway/TIMOB-28509
fix(ios): include missing i386 and armv7 architectures
2 parents 1f6e8ac + 9935fd6 commit 8a1cc9d

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

ios/Classes/TiWebdialogModule.m

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller
6262
- (SFSafariViewController *)safariController:(NSString *)url withEntersReaderIfAvailable:(BOOL)entersReaderIfAvailable andBarCollapsingEnabled:(BOOL)barCollapsingEnabled
6363
{
6464
if (_safariController == nil) {
65-
NSURL *safariURL = [NSURL URLWithString:[url stringByRemovingPercentEncoding]];
66-
SFSafariViewControllerConfiguration *config = [[SFSafariViewControllerConfiguration alloc] init];
67-
config.entersReaderIfAvailable = entersReaderIfAvailable;
68-
config.barCollapsingEnabled = barCollapsingEnabled;
65+
NSURL *safariURL = [NSURL URLWithString:[url stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
66+
if (@available(iOS 11.0, *)) {
67+
SFSafariViewControllerConfiguration *config = [[SFSafariViewControllerConfiguration alloc] init];
68+
config.entersReaderIfAvailable = entersReaderIfAvailable;
69+
config.barCollapsingEnabled = barCollapsingEnabled;
70+
71+
_safariController = [[SFSafariViewController alloc] initWithURL:safariURL
72+
configuration:config];
73+
} else {
74+
_safariController = [[SFSafariViewController alloc] initWithURL:safariURL
75+
entersReaderIfAvailable:entersReaderIfAvailable];
76+
}
6977

70-
_safariController = [[SFSafariViewController alloc] initWithURL:safariURL
71-
configuration:config];
7278
[_safariController setDelegate:self];
7379
}
7480

@@ -152,7 +158,11 @@ - (void)open:(id)args
152158
}
153159

154160
if ([args objectForKey:@"dismissButtonStyle"]) {
155-
[safari setDismissButtonStyle:[TiUtils intValue:@"dismissButtonStyle" properties:args def:SFSafariViewControllerDismissButtonStyleDone]];
161+
if (@available(iOS 11.0, *)) {
162+
[safari setDismissButtonStyle:[TiUtils intValue:@"dismissButtonStyle" properties:args def:SFSafariViewControllerDismissButtonStyleDone]];
163+
} else {
164+
NSLog(@"[ERROR] Ti.WebDialog: The dismissButtonStyle property is only available in iOS 11 and later");
165+
}
156166
}
157167

158168
[[TiApp app] showModalController:safari

ios/manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 3.0.0
5+
version: 3.0.1
66
apiversion: 2
7-
architectures: arm64 x86_64
7+
architectures: armv7 arm64 i386 x86_64
88
description: titanium-web-dialog
99
author: Hans Knoechel
1010
license: Apache 2.0

ios/titanium-web-dialog.xcodeproj/project.pbxproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
GCC_WARN_UNUSED_VALUE = NO;
244244
GCC_WARN_UNUSED_VARIABLE = NO;
245245
INSTALL_PATH = /usr/local/lib;
246-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
246+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
247247
LIBRARY_SEARCH_PATHS = "";
248248
OTHER_CFLAGS = (
249249
"-DDEBUG",
@@ -289,7 +289,7 @@
289289
GCC_WARN_UNUSED_VALUE = NO;
290290
GCC_WARN_UNUSED_VARIABLE = NO;
291291
INSTALL_PATH = /usr/local/lib;
292-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
292+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
293293
LIBRARY_SEARCH_PATHS = "";
294294
OTHER_CFLAGS = "-DTI_POST_1_2";
295295
OTHER_LDFLAGS = "-ObjC";
@@ -325,7 +325,6 @@
325325
GCC_WARN_UNUSED_VALUE = NO;
326326
GCC_WARN_UNUSED_VARIABLE = NO;
327327
INSTALL_PATH = /usr/local/lib;
328-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
329328
ONLY_ACTIVE_ARCH = YES;
330329
OTHER_CFLAGS = (
331330
"-DDEBUG",
@@ -364,7 +363,7 @@
364363
GCC_WARN_UNUSED_VALUE = NO;
365364
GCC_WARN_UNUSED_VARIABLE = NO;
366365
INSTALL_PATH = /usr/local/lib;
367-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
366+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
368367
OTHER_CFLAGS = "-DTI_POST_1_2";
369368
OTHER_LDFLAGS = "-ObjC";
370369
PRODUCT_NAME = ti.webdialog;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@titanium-sdk/ti.webdialog",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Use the native `SFSafariViewController` (iOS) and `Chrome Pages` (Android) within Axway Titanium.",
55
"scripts": {
66
"commit": "git-cz",

0 commit comments

Comments
 (0)