Skip to content

Commit ad6c48a

Browse files
authored
Add FDL to M55 (#3724)
* Remove references to UIWebView from DynamicLinks to comply with Apple "ITMS-90809: Deprecated API Usage" (#3723) * Add FDL to M55
1 parent 36e9dc6 commit ad6c48a

File tree

4 files changed

+10
-44
lines changed

4 files changed

+10
-44
lines changed

Firebase/DynamicLinks/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v4.0.4
2+
- [changed] Removed iOS 7 WebView code causing App Store complaints. (#3722)
3+
14
# v4.0.3
25
- [added] Added support for custom domains for internal Google apps. (#3540)
36

Firebase/DynamicLinks/FIRDLJavaScriptExecutor.m

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ @implementation FIRDLJavaScriptExecutor {
5757
__weak id<FIRDLJavaScriptExecutorDelegate> _delegate;
5858
NSString *_script;
5959

60-
// Web views with which to run JavaScript.
61-
UIWebView *_uiWebView; // Used in iOS 7 only.
62-
WKWebView *_wkWebView; // Used in iOS 8+ only.
60+
// Web view with which to run JavaScript.
61+
WKWebView *_wkWebView;
6362
}
6463

6564
- (instancetype)initWithDelegate:(id<FIRDLJavaScriptExecutorDelegate>)delegate
@@ -82,17 +81,9 @@ - (void)start {
8281
NSString *htmlContent =
8382
[NSString stringWithFormat:@"<html><head><script>%@</script></head></html>", _script];
8483

85-
// Use WKWebView if available as it executes JavaScript more quickly, otherwise, fall back
86-
// on UIWebView.
87-
if ([WKWebView class]) {
88-
_wkWebView = [[WKWebView alloc] init];
89-
_wkWebView.navigationDelegate = self;
90-
[_wkWebView loadHTMLString:htmlContent baseURL:nil];
91-
} else {
92-
_uiWebView = [[UIWebView alloc] init];
93-
_uiWebView.delegate = self;
94-
[_uiWebView loadHTMLString:htmlContent baseURL:nil];
95-
}
84+
_wkWebView = [[WKWebView alloc] init];
85+
_wkWebView.navigationDelegate = self;
86+
[_wkWebView loadHTMLString:htmlContent baseURL:nil];
9687
}
9788

9889
- (void)handleExecutionResult:(NSString *)result {
@@ -109,8 +100,6 @@ - (void)handleExecutionError:(nullable NSError *)error {
109100
}
110101

111102
- (void)cleanup {
112-
_uiWebView.delegate = nil;
113-
_uiWebView = nil;
114103
_wkWebView.navigationDelegate = nil;
115104
_wkWebView = nil;
116105
}
@@ -150,33 +139,6 @@ - (void)webView:(WKWebView *)webView
150139
[self handleExecutionError:error];
151140
}
152141

153-
#pragma mark - UIWebViewDelegate
154-
155-
- (void)webViewDidFinishLoad:(UIWebView *)webView {
156-
// Make sure that the javascript was loaded successfully before calling the method.
157-
NSString *methodType =
158-
[webView stringByEvaluatingJavaScriptFromString:FIRDLTypeofFingerprintJSMethodNameString()];
159-
if (![methodType isEqualToString:@"function"]) {
160-
// Javascript was not loaded successfully.
161-
[self handleExecutionError:nil];
162-
return;
163-
}
164-
165-
// Get the result from javascript.
166-
NSString *result =
167-
[webView stringByEvaluatingJavaScriptFromString:GINFingerprintJSMethodString()];
168-
if ([result isKindOfClass:[NSString class]]) {
169-
[self handleExecutionResult:result];
170-
} else {
171-
[self handleExecutionError:nil];
172-
}
173-
}
174-
175-
- (void)webView:(UIWebView *)webView
176-
didFailLoadWithError:(FIRDL_NULLABLE_IOS9_NONNULLABLE_IOS10 NSError *)error {
177-
[self handleExecutionError:error];
178-
}
179-
180142
@end
181143

182144
NS_ASSUME_NONNULL_END

FirebaseDynamicLinks.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseDynamicLinks'
3-
s.version = '4.0.3'
3+
s.version = '4.0.4'
44
s.summary = 'Firebase DynamicLinks for iOS'
55

66
s.description = <<-DESC

Releases/Manifests/6.8.0.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"FirebaseABTesting":"3.1.1",
33
"FirebaseCore":"6.2.2",
4+
"FirebaseDynamicLinks":"4.0.4",
45
"FirebaseFirestore":"1.5.0",
56
"FirebaseInAppMessaging":"0.15.4",
67
"FirebaseInstanceID":"4.2.4",

0 commit comments

Comments
 (0)