Skip to content

Commit 87856fe

Browse files
Merge pull request #22 from OutSystems/development
RMET-4216 ::: adding allowsBackForwardNavigationGestures for WKWebView on iOS
2 parents 9c4133b + f917f44 commit 87856fe

File tree

8 files changed

+102
-76
lines changed

8 files changed

+102
-76
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 2.0.1
8+
9+
### Features
10+
11+
- Added support for back and forward swipe navigation gestures in `WKWebView` via the `allowsBackForwardNavigationGestures` option. (for openInWebView option only) (https://outsystemsrd.atlassian.net/browse/RMET-4216).
12+
713
## 2.0.0
814

915
### Features

Gemfile.lock

Lines changed: 80 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,62 @@ GEM
55
base64
66
nkf
77
rexml
8-
activesupport (7.1.3.4)
8+
activesupport (8.0.2)
99
base64
10+
benchmark (>= 0.3)
1011
bigdecimal
11-
concurrent-ruby (~> 1.0, >= 1.0.2)
12+
concurrent-ruby (~> 1.0, >= 1.3.1)
1213
connection_pool (>= 2.2.5)
1314
drb
1415
i18n (>= 1.6, < 2)
16+
logger (>= 1.4.2)
1517
minitest (>= 5.1)
16-
mutex_m
17-
tzinfo (~> 2.0)
18+
securerandom (>= 0.3)
19+
tzinfo (~> 2.0, >= 2.0.5)
20+
uri (>= 0.13.1)
1821
addressable (2.8.7)
1922
public_suffix (>= 2.0.2, < 7.0)
2023
artifactory (3.0.17)
2124
atomos (0.1.3)
22-
aws-eventstream (1.3.0)
23-
aws-partitions (1.957.0)
24-
aws-sdk-core (3.201.2)
25+
aws-eventstream (1.4.0)
26+
aws-partitions (1.1116.0)
27+
aws-sdk-core (3.225.2)
2528
aws-eventstream (~> 1, >= 1.3.0)
26-
aws-partitions (~> 1, >= 1.651.0)
27-
aws-sigv4 (~> 1.8)
29+
aws-partitions (~> 1, >= 1.992.0)
30+
aws-sigv4 (~> 1.9)
31+
base64
2832
jmespath (~> 1, >= 1.6.1)
29-
aws-sdk-kms (1.88.0)
30-
aws-sdk-core (~> 3, >= 3.201.0)
33+
logger
34+
aws-sdk-kms (1.104.0)
35+
aws-sdk-core (~> 3, >= 3.225.0)
3136
aws-sigv4 (~> 1.5)
32-
aws-sdk-s3 (1.156.0)
33-
aws-sdk-core (~> 3, >= 3.201.0)
37+
aws-sdk-s3 (1.189.1)
38+
aws-sdk-core (~> 3, >= 3.225.0)
3439
aws-sdk-kms (~> 1)
3540
aws-sigv4 (~> 1.5)
36-
aws-sigv4 (1.8.0)
41+
aws-sigv4 (1.12.1)
3742
aws-eventstream (~> 1, >= 1.0.2)
3843
babosa (1.0.4)
39-
base64 (0.2.0)
40-
bigdecimal (3.1.8)
44+
base64 (0.3.0)
45+
benchmark (0.4.1)
46+
bigdecimal (3.2.2)
4147
claide (1.1.0)
4248
clamp (1.3.2)
4349
colored (1.2)
4450
colored2 (3.1.2)
4551
commander (4.6.0)
4652
highline (~> 2.0.0)
47-
concurrent-ruby (1.3.3)
48-
connection_pool (2.4.1)
53+
concurrent-ruby (1.3.5)
54+
connection_pool (2.5.3)
4955
declarative (0.0.20)
50-
digest-crc (0.6.5)
56+
digest-crc (0.7.0)
5157
rake (>= 12.0.0, < 14.0.0)
5258
domain_name (0.6.20240107)
5359
dotenv (2.8.1)
54-
drb (2.2.1)
60+
drb (2.2.3)
5561
emoji_regex (3.2.3)
56-
excon (0.111.0)
57-
faraday (1.10.3)
62+
excon (0.112.0)
63+
faraday (1.10.4)
5864
faraday-em_http (~> 1.0)
5965
faraday-em_synchrony (~> 1.0)
6066
faraday-excon (~> 1.1)
@@ -73,17 +79,17 @@ GEM
7379
faraday-em_synchrony (1.0.0)
7480
faraday-excon (1.1.0)
7581
faraday-httpclient (1.0.1)
76-
faraday-multipart (1.0.4)
77-
multipart-post (~> 2)
78-
faraday-net_http (1.0.1)
82+
faraday-multipart (1.1.0)
83+
multipart-post (~> 2.0)
84+
faraday-net_http (1.0.2)
7985
faraday-net_http_persistent (1.2.0)
8086
faraday-patron (1.0.0)
8187
faraday-rack (1.0.0)
8288
faraday-retry (1.0.3)
83-
faraday_middleware (1.2.0)
89+
faraday_middleware (1.2.1)
8490
faraday (~> 1.0)
85-
fastimage (2.3.1)
86-
fastlane (2.221.1)
91+
fastimage (2.4.0)
92+
fastlane (2.228.0)
8793
CFPropertyList (>= 2.3, < 4.0.0)
8894
addressable (>= 2.8, < 3.0.0)
8995
artifactory (~> 3.0)
@@ -99,6 +105,7 @@ GEM
99105
faraday-cookie_jar (~> 0.0.6)
100106
faraday_middleware (~> 1.0)
101107
fastimage (>= 2.1.0, < 3.0.0)
108+
fastlane-sirp (>= 1.0.0)
102109
gh_inspector (>= 1.1.2, < 2.0.0)
103110
google-apis-androidpublisher_v3 (~> 0.3)
104111
google-apis-playcustomapp_v1 (~> 0.1)
@@ -122,8 +129,10 @@ GEM
122129
tty-spinner (>= 0.8.0, < 1.0.0)
123130
word_wrap (~> 1.0.0)
124131
xcodeproj (>= 1.13.0, < 2.0.0)
125-
xcpretty (~> 0.3.0)
132+
xcpretty (~> 0.4.1)
126133
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
134+
fastlane-sirp (1.0.0)
135+
sysrandom (~> 1.0)
127136
gh_inspector (1.1.3)
128137
google-apis-androidpublisher_v3 (0.54.0)
129138
google-apis-core (>= 0.11.0, < 2.a)
@@ -141,12 +150,12 @@ GEM
141150
google-apis-core (>= 0.11.0, < 2.a)
142151
google-apis-storage_v1 (0.31.0)
143152
google-apis-core (>= 0.11.0, < 2.a)
144-
google-cloud-core (1.7.0)
153+
google-cloud-core (1.8.0)
145154
google-cloud-env (>= 1.0, < 3.a)
146155
google-cloud-errors (~> 1.0)
147156
google-cloud-env (1.6.0)
148157
faraday (>= 0.17.3, < 3.0)
149-
google-cloud-errors (1.4.0)
158+
google-cloud-errors (1.5.0)
150159
google-cloud-storage (1.47.0)
151160
addressable (~> 2.8)
152161
digest-crc (~> 0.4)
@@ -162,68 +171,72 @@ GEM
162171
os (>= 0.9, < 2.0)
163172
signet (>= 0.16, < 2.a)
164173
highline (2.0.3)
165-
http-cookie (1.0.6)
174+
http-cookie (1.0.8)
166175
domain_name (~> 0.5)
167-
httpclient (2.8.3)
168-
i18n (1.14.5)
176+
httpclient (2.9.0)
177+
mutex_m
178+
i18n (1.14.7)
169179
concurrent-ruby (~> 1.0)
170180
jmespath (1.6.2)
171-
json (2.7.2)
172-
jwt (2.8.2)
181+
json (2.12.2)
182+
jwt (2.10.1)
173183
base64
184+
logger (1.7.0)
174185
mini_magick (4.13.2)
175186
mini_mime (1.1.5)
176-
minitest (5.24.1)
187+
mini_portile2 (2.8.9)
188+
minitest (5.25.5)
177189
multi_json (1.15.0)
178190
multipart-post (2.4.1)
179-
mutex_m (0.2.0)
180-
nanaimo (0.3.0)
181-
naturally (2.2.1)
191+
mutex_m (0.3.0)
192+
nanaimo (0.4.0)
193+
naturally (2.3.0)
182194
nkf (0.2.0)
183-
nokogiri (1.16.6-aarch64-linux)
195+
nokogiri (1.18.8)
196+
mini_portile2 (~> 2.8.2)
184197
racc (~> 1.4)
185-
nokogiri (1.16.6-arm-linux)
198+
nokogiri (1.18.8-aarch64-linux-gnu)
186199
racc (~> 1.4)
187-
nokogiri (1.16.6-arm64-darwin)
200+
nokogiri (1.18.8-arm-linux-gnu)
188201
racc (~> 1.4)
189-
nokogiri (1.16.6-x86-linux)
202+
nokogiri (1.18.8-arm64-darwin)
190203
racc (~> 1.4)
191-
nokogiri (1.16.6-x86_64-darwin)
204+
nokogiri (1.18.8-x86_64-darwin)
192205
racc (~> 1.4)
193-
nokogiri (1.16.6-x86_64-linux)
206+
nokogiri (1.18.8-x86_64-linux-gnu)
194207
racc (~> 1.4)
195-
optparse (0.5.0)
208+
optparse (0.6.0)
196209
os (1.1.4)
197-
plist (3.7.1)
198-
public_suffix (6.0.0)
199-
racc (1.8.0)
200-
rake (13.2.1)
210+
plist (3.7.2)
211+
public_suffix (6.0.2)
212+
racc (1.8.1)
213+
rake (13.3.0)
201214
representable (3.2.0)
202215
declarative (< 0.1.0)
203216
trailblazer-option (>= 0.1.1, < 0.2.0)
204217
uber (< 0.2.0)
205218
retriable (3.1.2)
206-
rexml (3.2.9)
207-
strscan
208-
rouge (2.0.7)
219+
rexml (3.4.1)
220+
rouge (3.28.0)
209221
ruby2_keywords (0.0.5)
210-
rubyzip (2.3.2)
222+
rubyzip (2.4.1)
223+
securerandom (0.4.1)
211224
security (0.1.5)
212-
signet (0.19.0)
225+
signet (0.20.0)
213226
addressable (~> 2.8)
214227
faraday (>= 0.17.5, < 3.a)
215228
jwt (>= 1.5, < 3.0)
216229
multi_json (~> 1.10)
217230
simctl (1.6.10)
218231
CFPropertyList
219232
naturally
220-
slather (2.8.2)
233+
slather (2.8.5)
221234
CFPropertyList (>= 2.2, < 4)
222235
activesupport
223236
clamp (~> 1.3)
224237
nokogiri (>= 1.14.3)
225-
xcodeproj (~> 1.21)
226-
strscan (3.1.0)
238+
xcodeproj (~> 1.27)
239+
sysrandom (1.0.5)
227240
terminal-notifier (2.0.0)
228241
terminal-table (3.0.2)
229242
unicode-display_width (>= 1.1.1, < 3)
@@ -235,17 +248,18 @@ GEM
235248
tzinfo (2.0.6)
236249
concurrent-ruby (~> 1.0)
237250
uber (0.1.0)
238-
unicode-display_width (2.5.0)
251+
unicode-display_width (2.6.0)
252+
uri (1.0.3)
239253
word_wrap (1.0.0)
240-
xcodeproj (1.24.0)
254+
xcodeproj (1.27.0)
241255
CFPropertyList (>= 2.3.3, < 4.0)
242256
atomos (~> 0.1.3)
243257
claide (>= 1.0.2, < 2.0)
244258
colored2 (~> 3.1)
245-
nanaimo (~> 0.3.0)
246-
rexml (~> 3.2.4)
247-
xcpretty (0.3.0)
248-
rouge (~> 2.0.7)
259+
nanaimo (~> 0.4.0)
260+
rexml (>= 3.3.6, < 4.0)
261+
xcpretty (0.4.1)
262+
rouge (~> 3.28.0)
249263
xcpretty-travis-formatter (1.0.1)
250264
xcpretty (~> 0.2, >= 0.0.7)
251265

@@ -262,4 +276,4 @@ DEPENDENCIES
262276
slather
263277

264278
BUNDLED WITH
265-
2.5.10
279+
2.4.19

OSInAppBrowserLib.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'OSInAppBrowserLib'
3-
spec.version = '2.0.0'
3+
spec.version = '2.0.1'
44

55
spec.summary = 'The `OSInAppBrowserLib` is a library that provides a web browser view to load a web page within a Mobile Application.'
66
spec.description = <<-DESC

OSInAppBrowserLib.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
GCC_WARN_UNUSED_VARIABLE = YES;
469469
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
470470
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
471-
MARKETING_VERSION = 2.0.0;
471+
MARKETING_VERSION = 2.0.1;
472472
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
473473
MTL_FAST_MATH = YES;
474474
ONLY_ACTIVE_ARCH = YES;
@@ -530,7 +530,7 @@
530530
GCC_WARN_UNUSED_VARIABLE = YES;
531531
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
532532
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
533-
MARKETING_VERSION = 2.0.0;
533+
MARKETING_VERSION = 2.0.1;
534534
MTL_ENABLE_DEBUG_INFO = NO;
535535
MTL_FAST_MATH = YES;
536536
SDKROOT = iphoneos;
@@ -563,7 +563,7 @@
563563
"@executable_path/Frameworks",
564564
"@loader_path/Frameworks",
565565
);
566-
MARKETING_VERSION = 2.0.0;
566+
MARKETING_VERSION = 2.0.1;
567567
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
568568
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
569569
PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.inappbrowser.OSInAppBrowserLib;
@@ -597,7 +597,7 @@
597597
"@executable_path/Frameworks",
598598
"@loader_path/Frameworks",
599599
);
600-
MARKETING_VERSION = 2.0.0;
600+
MARKETING_VERSION = 2.0.1;
601601
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
602602
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
603603
PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.inappbrowser.OSInAppBrowserLib;
@@ -618,7 +618,7 @@
618618
CURRENT_PROJECT_VERSION = 2;
619619
GENERATE_INFOPLIST_FILE = YES;
620620
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
621-
MARKETING_VERSION = 2.0.0;
621+
MARKETING_VERSION = 2.0.1;
622622
PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.inappbrowser.OSInAppBrowserLibTests;
623623
PRODUCT_NAME = "$(TARGET_NAME)";
624624
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -640,7 +640,7 @@
640640
CURRENT_PROJECT_VERSION = 2;
641641
GENERATE_INFOPLIST_FILE = YES;
642642
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
643-
MARKETING_VERSION = 2.0.0;
643+
MARKETING_VERSION = 2.0.1;
644644
PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.inappbrowser.OSInAppBrowserLibTests;
645645
PRODUCT_NAME = "$(TARGET_NAME)";
646646
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

OSInAppBrowserLib.zip

86.8 KB
Binary file not shown.

OSInAppBrowserLib/Models/Options/OSIABWebViewOptions.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public class OSIABWebViewOptions: OSIABOptions {
3030
let surpressIncrementalRendering: Bool
3131
/// Sets a custom user agent for the WebView.
3232
let customUserAgent: String?
33+
/// Indicates if swipe gestures for navigating backward and forward in the WebView history are enabled.
34+
let allowsBackForwardNavigationGestures: Bool
3335

3436
/// Constructor method.
3537
/// - Parameters:
@@ -49,6 +51,7 @@ public class OSIABWebViewOptions: OSIABOptions {
4951
/// - viewStyle: The view style to present. `defaultValue` is provided in case of no value.
5052
/// - animationEffect: The animation effect for the presentation appearance and dismissal. `defaultValue` is provided in case of no value.
5153
/// - customUserAgent: Sets a custom user agent for the WebView.`
54+
/// - allowsBackForwardNavigationGestures: Indicates if swipe gestures for navigating backward and forward in the WebView history are enabled.
5255
public init(
5356
showURL: Bool = true,
5457
showToolbar: Bool = true,
@@ -65,7 +68,8 @@ public class OSIABWebViewOptions: OSIABOptions {
6568
surpressIncrementalRendering: Bool = false,
6669
viewStyle: OSIABViewStyle = .defaultValue,
6770
animationEffect: OSIABAnimationEffect = .defaultValue,
68-
customUserAgent: String? = nil
71+
customUserAgent: String? = nil,
72+
allowsBackForwardNavigationGestures: Bool = true,
6973
) {
7074
self.showURL = showURL
7175
self.showToolbar = showToolbar
@@ -81,6 +85,7 @@ public class OSIABWebViewOptions: OSIABOptions {
8185
self.allowInLineMediaPlayback = allowInLineMediaPlayback
8286
self.surpressIncrementalRendering = surpressIncrementalRendering
8387
self.customUserAgent = customUserAgent
88+
self.allowsBackForwardNavigationGestures = allowsBackForwardNavigationGestures
8489
super.init(viewStyle: viewStyle, animationEffect: animationEffect)
8590
}
8691
}

OSInAppBrowserLib/RouterAdapters/OSIABWebViewRouterAdapter.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class OSIABWebViewRouterAdapter: NSObject, OSIABRouter {
3939
self.options.toConfigurationModel().toWebViewConfiguration(),
4040
self.options.allowOverScroll,
4141
self.options.customUserAgent,
42+
self.options.allowsBackForwardNavigationGestures,
4243
uiModel: self.options.toUIModel(),
4344
callbackHandler: self.callbackHandler
4445
)

0 commit comments

Comments
 (0)