Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
953e220
Flutter implementation
LuisThein Jul 26, 2019
9478588
Added Android implementation + updated example
LuisThein Jul 26, 2019
45e915d
iOS implementation
LuisThein Jul 26, 2019
ae81a98
Added Widget Test
LuisThein Jul 26, 2019
de27c90
Added unit tests for User Agent
LuisThein Jul 26, 2019
cbcc808
Updated CHANGELOG.md
LuisThein Jul 27, 2019
4141cf2
Merge branch 'master' into feature/set_user_agent
LuisThein Jul 27, 2019
d54e0bc
Fixed format error in FlutterwebView.m
LuisThein Jul 27, 2019
86d44ca
Fixed another format error
LuisThein Jul 27, 2019
7959989
Merge branch 'master' into feature/set_user_agent
LuisThein Aug 2, 2019
7b26a41
Changed files according to pull request review
LuisThein Aug 5, 2019
7fed032
Minor changes
LuisThein Aug 5, 2019
c5cc6a7
Updated dartdoc for WebView.userAgent
LuisThein Aug 5, 2019
c99c8f2
Merged branch master into feature/set_user_agent
LuisThein Aug 8, 2019
c931307
Resolved nerge conflicts.
LuisThein Aug 10, 2019
7976151
Use a WebSetting<T> type to allow representing absence of a null value.
amirh Aug 14, 2019
4c0d2f3
review fixes
amirh Aug 14, 2019
de4d1df
Merge branch 'master' into feature/set_user_agent
amirh Aug 14, 2019
5be86ef
bump version
amirh Aug 14, 2019
5887b33
Merge branch 'master' into feature/set_user_agent
amirh Aug 14, 2019
bf8b74c
remove extra blank line from changelog
amirh Aug 14, 2019
ebe699d
Removed getUserAgent
LuisThein Aug 15, 2019
ee693fd
Merge branch 'feature/set_user_agent' of https://github.com/LuisThein…
LuisThein Aug 15, 2019
641537b
Fixed formatting issue
LuisThein Aug 15, 2019
db3cfb9
Fixed _getUserAgent in webview.dart
LuisThein Aug 15, 2019
974c16e
Reverted unrelated reformatting
LuisThein Aug 16, 2019
c13245a
Resolved merge conflicts.
LuisThein Aug 16, 2019
3282117
Fixed another formatting issue.
LuisThein Aug 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed another format error
  • Loading branch information
LuisThein authored Jul 27, 2019
commit 86d44caef2db5e6b3b9fb29a0c375d43ba6b669e
14 changes: 7 additions & 7 deletions packages/webview_flutter/ios/Classes/FlutterWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ - (NSString*)applySettings:(NSDictionary<NSString*, id>*)settings {
} else if ([key isEqualToString:@"debuggingEnabled"]) {
// no-op debugging is always enabled on iOS.
} else if ([key isEqualToString:@"userAgent"]) {
NSString* userAgent = settings[key];
[self updateUserAgent:[userAgent isEqual:[NSNull null]] ? nil : userAgent];
NSString* userAgent = settings[key];
[self updateUserAgent:[userAgent isEqual:[NSNull null]] ? nil : userAgent];
} else {
[unknownKeys addObject:key];
}
Expand Down Expand Up @@ -344,11 +344,11 @@ - (void)onGetUserAgent:(FlutterMethodCall*)call result:(FlutterResult)result {
}

- (void)updateUserAgent:(NSString*)userAgent {
if (@available(iOS 9.0, *)) {
[_webView setCustomUserAgent:userAgent];
} else {
NSLog(@"Updating UserAgent is not supported for Flutter WebViews prior to iOS 9.");
}
if (@available(iOS 9.0, *)) {
[_webView setCustomUserAgent:userAgent];
} else {
NSLog(@"Updating UserAgent is not supported for Flutter WebViews prior to iOS 9.");
}
}

@end