Skip to content

Commit

Permalink
Merge pull request #150 from jquick-axway/TIMOB-28509
Browse files Browse the repository at this point in the history
fix(ios): include missing i386 and armv7 architectures
  • Loading branch information
garymathews authored Jul 22, 2021
2 parents 1f6e8ac + 9935fd6 commit 8a1cc9d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
24 changes: 17 additions & 7 deletions ios/Classes/TiWebdialogModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,19 @@ - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller
- (SFSafariViewController *)safariController:(NSString *)url withEntersReaderIfAvailable:(BOOL)entersReaderIfAvailable andBarCollapsingEnabled:(BOOL)barCollapsingEnabled
{
if (_safariController == nil) {
NSURL *safariURL = [NSURL URLWithString:[url stringByRemovingPercentEncoding]];
SFSafariViewControllerConfiguration *config = [[SFSafariViewControllerConfiguration alloc] init];
config.entersReaderIfAvailable = entersReaderIfAvailable;
config.barCollapsingEnabled = barCollapsingEnabled;
NSURL *safariURL = [NSURL URLWithString:[url stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if (@available(iOS 11.0, *)) {
SFSafariViewControllerConfiguration *config = [[SFSafariViewControllerConfiguration alloc] init];
config.entersReaderIfAvailable = entersReaderIfAvailable;
config.barCollapsingEnabled = barCollapsingEnabled;

_safariController = [[SFSafariViewController alloc] initWithURL:safariURL
configuration:config];
} else {
_safariController = [[SFSafariViewController alloc] initWithURL:safariURL
entersReaderIfAvailable:entersReaderIfAvailable];
}

_safariController = [[SFSafariViewController alloc] initWithURL:safariURL
configuration:config];
[_safariController setDelegate:self];
}

Expand Down Expand Up @@ -152,7 +158,11 @@ - (void)open:(id)args
}

if ([args objectForKey:@"dismissButtonStyle"]) {
[safari setDismissButtonStyle:[TiUtils intValue:@"dismissButtonStyle" properties:args def:SFSafariViewControllerDismissButtonStyleDone]];
if (@available(iOS 11.0, *)) {
[safari setDismissButtonStyle:[TiUtils intValue:@"dismissButtonStyle" properties:args def:SFSafariViewControllerDismissButtonStyleDone]];
} else {
NSLog(@"[ERROR] Ti.WebDialog: The dismissButtonStyle property is only available in iOS 11 and later");
}
}

[[TiApp app] showModalController:safari
Expand Down
4 changes: 2 additions & 2 deletions ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 3.0.0
version: 3.0.1
apiversion: 2
architectures: arm64 x86_64
architectures: armv7 arm64 i386 x86_64
description: titanium-web-dialog
author: Hans Knoechel
license: Apache 2.0
Expand Down
7 changes: 3 additions & 4 deletions ios/titanium-web-dialog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = (
"-DDEBUG",
Expand Down Expand Up @@ -289,7 +289,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
Expand Down Expand Up @@ -325,7 +325,6 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-DDEBUG",
Expand Down Expand Up @@ -364,7 +363,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = ti.webdialog;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@titanium-sdk/ti.webdialog",
"version": "4.0.0",
"version": "4.0.1",
"description": "Use the native `SFSafariViewController` (iOS) and `Chrome Pages` (Android) within Axway Titanium.",
"scripts": {
"commit": "git-cz",
Expand Down

0 comments on commit 8a1cc9d

Please sign in to comment.