From 2d3366efaeb22da12d65012520fc0cfdf1b90866 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Wed, 13 May 2020 15:00:15 -0400 Subject: [PATCH 01/26] fix issue where texture is not updated on a seek if the video is paused --- .../video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.m | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.m b/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.m index 0917e8ef303b..b56af1334a9e 100644 --- a/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.m +++ b/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.m @@ -550,6 +550,7 @@ - (FLTPositionMessage*)position:(FLTTextureMessage*)input error:(FlutterError**) - (void)seekTo:(FLTPositionMessage*)input error:(FlutterError**)error { FLTVideoPlayer* player = _players[input.textureId]; [player seekTo:[input.position intValue]]; + [_registry textureFrameAvailable:input.textureId.intValue]; } - (void)pause:(FLTTextureMessage*)input error:(FlutterError**)error { From 2f876ff21c626213e2e2c38cc9eb473ea90c1da4 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Wed, 13 May 2020 15:55:43 -0400 Subject: [PATCH 02/26] update changelog and pubspec --- packages/video_player/video_player/CHANGELOG.md | 4 ++++ packages/video_player/video_player/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/video_player/video_player/CHANGELOG.md b/packages/video_player/video_player/CHANGELOG.md index 128d05b065d6..c9060b7f5b2b 100644 --- a/packages/video_player/video_player/CHANGELOG.md +++ b/packages/video_player/video_player/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.10+1 + +* iOS: Update texture on `seekTo`. + ## 0.10.10 * Migrated to [pigeon](https://pub.dev/packages/pigeon). diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index d99e6380cb5f..fb242089493f 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -4,7 +4,7 @@ description: Flutter plugin for displaying inline video with other Flutter # 0.10.y+z is compatible with 1.0.0, if you land a breaking change bump # the version to 2.0.0. # See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0 -version: 0.10.10 +version: 0.10.10+1 homepage: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player flutter: From b0571439cedb8c612faeaef115f7e221d9404f6a Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 17:23:09 -0400 Subject: [PATCH 03/26] early idea for managing location permissions in connectivity plugin --- .../Classes/FLTConnectivityLocationHandler.h | 4 + .../Classes/FLTConnectivityLocationHandler.m | 2 + .../ios/Classes/FLTConnectivityPlugin.m | 90 ++++++++++--------- 3 files changed, 55 insertions(+), 41 deletions(-) diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h index 1731d56fe782..32aeed2f4b27 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h @@ -4,6 +4,8 @@ #import #import +#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS + NS_ASSUME_NONNULL_BEGIN @class FLTConnectivityLocationDelegate; @@ -20,3 +22,5 @@ typedef void (^FLTConnectivityLocationCompletion)(CLAuthorizationStatus); @end NS_ASSUME_NONNULL_END + +#endif diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m index bbb93aea6a5b..0f7c0568146d 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS #import "FLTConnectivityLocationHandler.h" @interface FLTConnectivityLocationHandler () @@ -56,3 +57,4 @@ - (void)locationManager:(CLLocationManager *)manager } @end +#endif diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m index 526bee25d561..43c65b22f4cc 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m @@ -16,7 +16,9 @@ @interface FLTConnectivityPlugin () +#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS @property(strong, nonatomic) FLTConnectivityLocationHandler* locationHandler; +#endif @end @@ -52,45 +54,6 @@ - (NSString*)findNetworkInfo:(NSString*)key { return info; } -- (NSString*)getWifiName { - return [self findNetworkInfo:@"SSID"]; -} - -- (NSString*)getBSSID { - return [self findNetworkInfo:@"BSSID"]; -} - -- (NSString*)getWifiIP { - NSString* address = @"error"; - struct ifaddrs* interfaces = NULL; - struct ifaddrs* temp_addr = NULL; - int success = 0; - - // retrieve the current interfaces - returns 0 on success - success = getifaddrs(&interfaces); - if (success == 0) { - // Loop through linked list of interfaces - temp_addr = interfaces; - while (temp_addr != NULL) { - if (temp_addr->ifa_addr->sa_family == AF_INET) { - // Check if interface is en0 which is the wifi connection on the iPhone - if ([[NSString stringWithUTF8String:temp_addr->ifa_name] isEqualToString:@"en0"]) { - // Get NSString from C String - address = [NSString - stringWithUTF8String:inet_ntoa(((struct sockaddr_in*)temp_addr->ifa_addr)->sin_addr)]; - } - } - - temp_addr = temp_addr->ifa_next; - } - } - - // Free memory - freeifaddrs(interfaces); - - return address; -} - - (NSString*)statusFromReachability:(Reachability*)reachability { NetworkStatus status = [reachability currentReachabilityStatus]; switch (status) { @@ -111,7 +74,9 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { // and the code // gets more involved. So for now, this will do. result([self statusFromReachability:[Reachability reachabilityForInternetConnection]]); - } else if ([call.method isEqualToString:@"wifiName"]) { + } +#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS + else if ([call.method isEqualToString:@"wifiName"]) { result([self getWifiName]); } else if ([call.method isEqualToString:@"wifiBSSID"]) { result([self getBSSID]); @@ -129,7 +94,9 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { completion:^(CLAuthorizationStatus status) { result([weakSelf convertCLAuthorizationStatusToString:status]); }]; - } else { + } +#endif + else { result(FlutterMethodNotImplemented); } } @@ -139,6 +106,46 @@ - (void)onReachabilityDidChange:(NSNotification*)notification { _eventSink([self statusFromReachability:curReach]); } +#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +- (NSString*)getWifiName { + return [self findNetworkInfo:@"SSID"]; +} + +- (NSString*)getBSSID { + return [self findNetworkInfo:@"BSSID"]; +} + +- (NSString*)getWifiIP { + NSString* address = @"error"; + struct ifaddrs* interfaces = NULL; + struct ifaddrs* temp_addr = NULL; + int success = 0; + + // retrieve the current interfaces - returns 0 on success + success = getifaddrs(&interfaces); + if (success == 0) { + // Loop through linked list of interfaces + temp_addr = interfaces; + while (temp_addr != NULL) { + if (temp_addr->ifa_addr->sa_family == AF_INET) { + // Check if interface is en0 which is the wifi connection on the iPhone + if ([[NSString stringWithUTF8String:temp_addr->ifa_name] isEqualToString:@"en0"]) { + // Get NSString from C String + address = [NSString + stringWithUTF8String:inet_ntoa(((struct sockaddr_in*)temp_addr->ifa_addr)->sin_addr)]; + } + } + + temp_addr = temp_addr->ifa_next; + } + } + + // Free memory + freeifaddrs(interfaces); + + return address; +} + - (NSString*)convertCLAuthorizationStatusToString:(CLAuthorizationStatus)status { switch (status) { case kCLAuthorizationStatusNotDetermined: { @@ -166,6 +173,7 @@ - (FLTConnectivityLocationHandler*)locationHandler { } return _locationHandler; } +#endif #pragma mark FlutterStreamHandler impl From ffe59ed830140769447e2f1801eaa089fbab7627 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 19:03:47 -0400 Subject: [PATCH 04/26] updated example to handle missing plugin exceptions --- packages/connectivity/connectivity/example/lib/main.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/connectivity/connectivity/example/lib/main.dart b/packages/connectivity/connectivity/example/lib/main.dart index 4ad30972679a..030f365fe667 100644 --- a/packages/connectivity/connectivity/example/lib/main.dart +++ b/packages/connectivity/connectivity/example/lib/main.dart @@ -122,6 +122,9 @@ class _MyHomePageState extends State { } on PlatformException catch (e) { print(e.toString()); wifiName = "Failed to get Wifi Name"; + } on MissingPluginException catch (e) { + print(e.toString()); + wifiName = "Location permissions not enabled"; } try { @@ -144,6 +147,9 @@ class _MyHomePageState extends State { } on PlatformException catch (e) { print(e.toString()); wifiBSSID = "Failed to get Wifi BSSID"; + } on MissingPluginException catch (e) { + print(e.toString()); + wifiBSSID = "Location permissions not enabled"; } try { @@ -151,6 +157,9 @@ class _MyHomePageState extends State { } on PlatformException catch (e) { print(e.toString()); wifiIP = "Failed to get Wifi IP"; + } on MissingPluginException catch (e) { + print(e.toString()); + wifiIP = "Location permissions not enabled"; } setState(() { From 521f4ea93feea498b073893a4cb38f8c03cdd447 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 19:24:01 -0400 Subject: [PATCH 05/26] added update for README --- packages/connectivity/connectivity/README.md | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/connectivity/connectivity/README.md b/packages/connectivity/connectivity/README.md index f51be070d8f5..e69e201927c2 100644 --- a/packages/connectivity/connectivity/README.md +++ b/packages/connectivity/connectivity/README.md @@ -103,6 +103,33 @@ To request location authorization, make sure to add the following keys to your _ * `NSLocationAlwaysAndWhenInUseUsageDescription` - describe why the app needs access to the user’s location information all the time (foreground and background). This is called _Privacy - Location Always and When In Use Usage Description_ in the visual editor. * `NSLocationWhenInUseUsageDescription` - describe why the app needs access to the user’s location information when the app is running in the foreground. This is called _Privacy - Location When In Use Usage Description_ in the visual editor. +### iOS - Disabling code that access sensitive data + +If you don't wish to set `NSLocationAlwaysAndWhenInUseUsageDescription` and `NSLocationWhenInUseUsageDescription` on iOS, you also have the option to disable the code that uses these permissions. This may be useful if you don't wish to specify permissions that you have no intention of using and only want to use the plugin for checking the connection status of the device. + +To do so, add the following to your `Podfile`: +``` +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + ... # Here are some configurations automatically generated by flutter + + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + 'CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS=0' + ] + end + end +end +``` + +Note that by disabling these blocks of code the following plugin methods will no longer be accessible on iOS, and will throw a `MissingPluginException`: +- `getLocationServiceAuthorization` +- `getWifiBSSID` +- `getWifiIP` +- `getWifiName` +- `requestLocationServiceAuthorization` + ## Getting Started For help getting started with Flutter, view our online From 599cc9f7db98b150e32ff5ed13c94748451c99a7 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 19:35:37 -0400 Subject: [PATCH 06/26] added back ability to access wifi ip, and updated README --- packages/connectivity/connectivity/README.md | 5 ++-- .../ios/Classes/FLTConnectivityPlugin.m | 24 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/packages/connectivity/connectivity/README.md b/packages/connectivity/connectivity/README.md index e69e201927c2..e8a990a91020 100644 --- a/packages/connectivity/connectivity/README.md +++ b/packages/connectivity/connectivity/README.md @@ -103,7 +103,7 @@ To request location authorization, make sure to add the following keys to your _ * `NSLocationAlwaysAndWhenInUseUsageDescription` - describe why the app needs access to the user’s location information all the time (foreground and background). This is called _Privacy - Location Always and When In Use Usage Description_ in the visual editor. * `NSLocationWhenInUseUsageDescription` - describe why the app needs access to the user’s location information when the app is running in the foreground. This is called _Privacy - Location When In Use Usage Description_ in the visual editor. -### iOS - Disabling code that access sensitive data +### iOS - Disabling code that accesses sensitive data If you don't wish to set `NSLocationAlwaysAndWhenInUseUsageDescription` and `NSLocationWhenInUseUsageDescription` on iOS, you also have the option to disable the code that uses these permissions. This may be useful if you don't wish to specify permissions that you have no intention of using and only want to use the plugin for checking the connection status of the device. @@ -125,10 +125,9 @@ end Note that by disabling these blocks of code the following plugin methods will no longer be accessible on iOS, and will throw a `MissingPluginException`: - `getLocationServiceAuthorization` +- `requestLocationServiceAuthorization` - `getWifiBSSID` -- `getWifiIP` - `getWifiName` -- `requestLocationServiceAuthorization` ## Getting Started diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m index 43c65b22f4cc..af8165095c92 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m @@ -74,14 +74,14 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { // and the code // gets more involved. So for now, this will do. result([self statusFromReachability:[Reachability reachabilityForInternetConnection]]); - } + } else if ([call.method isEqualToString:@"wifiIPAddress"]) { + result([self getWifiIP]); + } #if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS else if ([call.method isEqualToString:@"wifiName"]) { result([self getWifiName]); } else if ([call.method isEqualToString:@"wifiBSSID"]) { result([self getBSSID]); - } else if ([call.method isEqualToString:@"wifiIPAddress"]) { - result([self getWifiIP]); } else if ([call.method isEqualToString:@"getLocationServiceAuthorization"]) { result([self convertCLAuthorizationStatusToString:[FLTConnectivityLocationHandler locationAuthorizationStatus]]); @@ -106,15 +106,6 @@ - (void)onReachabilityDidChange:(NSNotification*)notification { _eventSink([self statusFromReachability:curReach]); } -#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS -- (NSString*)getWifiName { - return [self findNetworkInfo:@"SSID"]; -} - -- (NSString*)getBSSID { - return [self findNetworkInfo:@"BSSID"]; -} - - (NSString*)getWifiIP { NSString* address = @"error"; struct ifaddrs* interfaces = NULL; @@ -146,6 +137,15 @@ - (NSString*)getWifiIP { return address; } +#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +- (NSString*)getWifiName { + return [self findNetworkInfo:@"SSID"]; +} + +- (NSString*)getBSSID { + return [self findNetworkInfo:@"BSSID"]; +} + - (NSString*)convertCLAuthorizationStatusToString:(CLAuthorizationStatus)status { switch (status) { case kCLAuthorizationStatusNotDetermined: { From 93cd68c4a196c1286479f968c69e5e72e976f892 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 20:03:35 -0400 Subject: [PATCH 07/26] using `ifndef` to disable the code --- packages/connectivity/connectivity/README.md | 5 +++-- .../ios/Classes/FLTConnectivityLocationHandler.h | 2 +- .../ios/Classes/FLTConnectivityLocationHandler.m | 2 +- .../connectivity/ios/Classes/FLTConnectivityPlugin.m | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/connectivity/connectivity/README.md b/packages/connectivity/connectivity/README.md index e8a990a91020..f56268f17abd 100644 --- a/packages/connectivity/connectivity/README.md +++ b/packages/connectivity/connectivity/README.md @@ -116,14 +116,15 @@ post_install do |installer| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', - 'CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS=0' + 'DISABLE_CONNECTIVITY_LOCATION_CODE=0' ] end end end ``` +To re-enable that code, you should remove the `'DISABLE_CONNECTIVITY_LOCATION_CODE=0'` and insure `pod install` is run again. -Note that by disabling these blocks of code the following plugin methods will no longer be accessible on iOS, and will throw a `MissingPluginException`: +*Note that by disabling these blocks of code the following plugin methods will no longer be accessible on iOS, and will throw a `MissingPluginException`:* - `getLocationServiceAuthorization` - `requestLocationServiceAuthorization` - `getWifiBSSID` diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h index 32aeed2f4b27..205f3abbee58 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.h @@ -4,7 +4,7 @@ #import #import -#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +#ifndef DISABLE_CONNECTIVITY_LOCATION_CODE NS_ASSUME_NONNULL_BEGIN diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m index 0f7c0568146d..670d3e4a6a27 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityLocationHandler.m @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +#ifndef DISABLE_CONNECTIVITY_LOCATION_CODE #import "FLTConnectivityLocationHandler.h" @interface FLTConnectivityLocationHandler () diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m index af8165095c92..9ce2254e190d 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m @@ -16,7 +16,7 @@ @interface FLTConnectivityPlugin () -#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +#ifndef DISABLE_CONNECTIVITY_LOCATION_CODE @property(strong, nonatomic) FLTConnectivityLocationHandler* locationHandler; #endif @@ -77,7 +77,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { } else if ([call.method isEqualToString:@"wifiIPAddress"]) { result([self getWifiIP]); } -#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +#ifndef DISABLE_CONNECTIVITY_LOCATION_CODE else if ([call.method isEqualToString:@"wifiName"]) { result([self getWifiName]); } else if ([call.method isEqualToString:@"wifiBSSID"]) { @@ -137,7 +137,7 @@ - (NSString*)getWifiIP { return address; } -#if CONNECTIVITY_NEEDS_LOCATION_PERMISSIONS +#ifndef DISABLE_CONNECTIVITY_LOCATION_CODE - (NSString*)getWifiName { return [self findNetworkInfo:@"SSID"]; } From 9ece2486fe8b0598a5b28c65bdc169e77a89d981 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 20:04:59 -0400 Subject: [PATCH 08/26] update readme --- packages/connectivity/connectivity/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/connectivity/connectivity/README.md b/packages/connectivity/connectivity/README.md index f56268f17abd..85b3c23df38a 100644 --- a/packages/connectivity/connectivity/README.md +++ b/packages/connectivity/connectivity/README.md @@ -116,13 +116,13 @@ post_install do |installer| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', - 'DISABLE_CONNECTIVITY_LOCATION_CODE=0' + 'DISABLE_CONNECTIVITY_LOCATION_CODE=1' ] end end end ``` -To re-enable that code, you should remove the `'DISABLE_CONNECTIVITY_LOCATION_CODE=0'` and insure `pod install` is run again. +To re-enable that code, you should remove the `'DISABLE_CONNECTIVITY_LOCATION_CODE=1'` and insure `pod install` is run again. *Note that by disabling these blocks of code the following plugin methods will no longer be accessible on iOS, and will throw a `MissingPluginException`:* - `getLocationServiceAuthorization` From 1c4b0a5b1f3b04e477c990e15afcba8729da939e Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 20:38:31 -0400 Subject: [PATCH 09/26] updated changelog and pubspec info --- packages/connectivity/connectivity/CHANGELOG.md | 4 ++++ packages/connectivity/connectivity/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/connectivity/connectivity/CHANGELOG.md b/packages/connectivity/connectivity/CHANGELOG.md index 9325f1a7868f..22bc5366dc5e 100644 --- a/packages/connectivity/connectivity/CHANGELOG.md +++ b/packages/connectivity/connectivity/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.9 + +* Added an optional way to disable code that accesses sensitive location information on iOS. + ## 0.4.8+6 * Update lower bound of dart dependency to 2.1.0. diff --git a/packages/connectivity/connectivity/pubspec.yaml b/packages/connectivity/connectivity/pubspec.yaml index 9aaa2620f82c..0b87fdae6e10 100644 --- a/packages/connectivity/connectivity/pubspec.yaml +++ b/packages/connectivity/connectivity/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/c # 0.4.y+z is compatible with 1.0.0, if you land a breaking change bump # the version to 2.0.0. # See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0 -version: 0.4.8+6 +version: 0.4.9 flutter: plugin: From 40854268bd120cc119abcd3bdb6dbd7569507ec7 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 22:30:48 -0400 Subject: [PATCH 10/26] fix formatting for iOS file --- .../connectivity/ios/Classes/FLTConnectivityPlugin.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m index 9ce2254e190d..33b678d3a637 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m @@ -76,7 +76,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { result([self statusFromReachability:[Reachability reachabilityForInternetConnection]]); } else if ([call.method isEqualToString:@"wifiIPAddress"]) { result([self getWifiIP]); - } + } #ifndef DISABLE_CONNECTIVITY_LOCATION_CODE else if ([call.method isEqualToString:@"wifiName"]) { result([self getWifiName]); @@ -163,7 +163,9 @@ - (NSString*)convertCLAuthorizationStatusToString:(CLAuthorizationStatus)status case kCLAuthorizationStatusAuthorizedWhenInUse: { return @"authorizedWhenInUse"; } - default: { return @"unknown"; } + default: { + return @"unknown"; + } } } From 8eac416aeef40969eab61d9624b72071dca7472c Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 19 May 2020 22:38:13 -0400 Subject: [PATCH 11/26] formatting again --- .../connectivity/ios/Classes/FLTConnectivityPlugin.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m index 33b678d3a637..5710b902c590 100644 --- a/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m +++ b/packages/connectivity/connectivity/ios/Classes/FLTConnectivityPlugin.m @@ -163,9 +163,7 @@ - (NSString*)convertCLAuthorizationStatusToString:(CLAuthorizationStatus)status case kCLAuthorizationStatusAuthorizedWhenInUse: { return @"authorizedWhenInUse"; } - default: { - return @"unknown"; - } + default: { return @"unknown"; } } } From 3e7406dc847d83ce724e7287c07103ef7ca63932 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 28 Jul 2020 10:34:07 -0400 Subject: [PATCH 12/26] trigger ci From 52867c1ebb90b08eec34f58189e13e36023cfedb Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Thu, 27 Aug 2020 23:26:16 -0400 Subject: [PATCH 13/26] trigger ci From 107810913d0cc00dc9a14fbcf69ce24cf54d4954 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Fri, 28 Aug 2020 18:14:48 -0400 Subject: [PATCH 14/26] trigger ci From bd14a52a5d365b880d51c1abdc35af79a773e1fa Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Tue, 1 Dec 2020 11:47:02 -0500 Subject: [PATCH 15/26] revert changes made to wifi location handler --- .../ios/Classes/FLTWifiInfoLocationHandler.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/wifi_info_flutter/wifi_info_flutter/ios/Classes/FLTWifiInfoLocationHandler.h b/packages/wifi_info_flutter/wifi_info_flutter/ios/Classes/FLTWifiInfoLocationHandler.h index ee42c5666be6..7cfe42df6079 100644 --- a/packages/wifi_info_flutter/wifi_info_flutter/ios/Classes/FLTWifiInfoLocationHandler.h +++ b/packages/wifi_info_flutter/wifi_info_flutter/ios/Classes/FLTWifiInfoLocationHandler.h @@ -5,8 +5,6 @@ #import #import -#ifndef DISABLE_CONNECTIVITY_LOCATION_CODE - NS_ASSUME_NONNULL_BEGIN @class FLTWifiInfoLocationDelegate; @@ -23,5 +21,3 @@ typedef void (^FLTWifiInfoLocationCompletion)(CLAuthorizationStatus); @end NS_ASSUME_NONNULL_END - -#endif From 857eee4deff9f27b6be5d625902e89e80d9a4ed2 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Thu, 3 Dec 2020 10:53:42 -0500 Subject: [PATCH 16/26] trigger ci From 26ab0b6ce3cc06e68269cf9a1042732a978875e2 Mon Sep 17 00:00:00 2001 From: KevinTheGray Date: Thu, 27 May 2021 14:21:03 -0400 Subject: [PATCH 17/26] Update pubspec.yaml --- packages/video_player/video_player/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index 0587dd4892b7..8f98b0702fab 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.1.4 +version: 2.1.5 environment: sdk: ">=2.12.0 <3.0.0" From db781019772c0fdcf10c10ca926b6f0e46b6ff04 Mon Sep 17 00:00:00 2001 From: KevinTheGray Date: Tue, 1 Jun 2021 09:53:05 -0400 Subject: [PATCH 18/26] Update pubspec.yaml --- packages/video_player/video_player/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index 8f98b0702fab..ed78213cbc2b 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.1.5 +version: 2.1.6 environment: sdk: ">=2.12.0 <3.0.0" From 22f84a3384b2400f8168485a1ffb607c8801d6b9 Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Fri, 6 Aug 2021 21:45:58 -0400 Subject: [PATCH 19/26] add test --- .../video_player/example/ios/Podfile | 1 + .../ios/RunnerTests/VideoPlayerTests.m | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/packages/video_player/video_player/example/ios/Podfile b/packages/video_player/video_player/example/ios/Podfile index 3924e59aa0f9..fe37427f8a74 100644 --- a/packages/video_player/video_player/example/ios/Podfile +++ b/packages/video_player/video_player/example/ios/Podfile @@ -31,6 +31,7 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths + pod 'OCMock', '3.5' end end diff --git a/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m index 890866f34952..a0f8e976a8d2 100644 --- a/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m +++ b/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m @@ -5,6 +5,8 @@ @import video_player; @import XCTest; +#import + @interface VideoPlayerTests : XCTestCase @end @@ -15,4 +17,22 @@ - (void)testPlugin { XCTAssertNotNil(plugin); } +- (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registry = (NSObject*) [[UIApplication sharedApplication] delegate]; + NSObject *registrar = [registry registrarForPlugin: @"TEST_FLTVideoPlayerPlugin"]; + NSObject *partialRegistrar = OCMPartialMock(registrar); + OCMStub([partialRegistrar textures]).andReturn(mockTextureRegistry); + [FLTVideoPlayerPlugin registerWithRegistrar:partialRegistrar]; + FLTVideoPlayerPlugin *videoPlayerPlugin = + (FLTVideoPlayerPlugin*)[registry valuePublishedByPlugin:@"TEST_FLTVideoPlayerPlugin"]; + FLTPositionMessage *message = [[FLTPositionMessage alloc] init]; + message.textureId = @101; + message.position = @0; + FlutterError *error; + [videoPlayerPlugin seekTo:message error:&error]; + OCMVerify([mockTextureRegistry textureFrameAvailable:message.textureId.intValue]); +} + @end From 4b596eb75747c5549f367220652eafa620af344e Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Fri, 6 Aug 2021 21:47:36 -0400 Subject: [PATCH 20/26] formatting --- .../example/ios/RunnerTests/VideoPlayerTests.m | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m index a0f8e976a8d2..a2442c02ccee 100644 --- a/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m +++ b/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m @@ -13,20 +13,23 @@ @interface VideoPlayerTests : XCTestCase @implementation VideoPlayerTests - (void)testPlugin { - FLTVideoPlayerPlugin* plugin = [[FLTVideoPlayerPlugin alloc] init]; + FLTVideoPlayerPlugin *plugin = [[FLTVideoPlayerPlugin alloc] init]; XCTAssertNotNil(plugin); } - (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registry = (NSObject*) [[UIApplication sharedApplication] delegate]; - NSObject *registrar = [registry registrarForPlugin: @"TEST_FLTVideoPlayerPlugin"]; + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registry = + (NSObject *)[[UIApplication sharedApplication] delegate]; + NSObject *registrar = + [registry registrarForPlugin:@"TEST_FLTVideoPlayerPlugin"]; NSObject *partialRegistrar = OCMPartialMock(registrar); OCMStub([partialRegistrar textures]).andReturn(mockTextureRegistry); [FLTVideoPlayerPlugin registerWithRegistrar:partialRegistrar]; FLTVideoPlayerPlugin *videoPlayerPlugin = - (FLTVideoPlayerPlugin*)[registry valuePublishedByPlugin:@"TEST_FLTVideoPlayerPlugin"]; + (FLTVideoPlayerPlugin *)[registry + valuePublishedByPlugin:@"TEST_FLTVideoPlayerPlugin"]; FLTPositionMessage *message = [[FLTPositionMessage alloc] init]; message.textureId = @101; message.position = @0; From 7441a22c095445380de3fcdaabd96efea9d7655b Mon Sep 17 00:00:00 2001 From: KevinTheGray Date: Sun, 22 Aug 2021 17:41:30 -0400 Subject: [PATCH 21/26] Update CHANGELOG.md --- packages/video_player/video_player/CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/video_player/video_player/CHANGELOG.md b/packages/video_player/video_player/CHANGELOG.md index b672775197ea..a35e111248d1 100644 --- a/packages/video_player/video_player/CHANGELOG.md +++ b/packages/video_player/video_player/CHANGELOG.md @@ -1,9 +1,6 @@ ## 2.1.15 * iOS: Update texture on `seekTo`. - -## NEXT - * Updated Android lint settings. ## 2.1.14 From d60955faf9b2acb34a30ebb89635cf97da6210b3 Mon Sep 17 00:00:00 2001 From: KevinTheGray Date: Wed, 15 Sep 2021 14:59:47 -0400 Subject: [PATCH 22/26] Update pubspec.yaml update pubspec version --- packages/video_player/video_player/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index 658357b8fbb1..2fa5d663d3c7 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.2.1 +version: 2.2.2 environment: sdk: ">=2.12.0 <3.0.0" From d090e03d046052214ecf2356c376b67171af9892 Mon Sep 17 00:00:00 2001 From: KevinTheGray Date: Mon, 20 Sep 2021 10:46:37 -0400 Subject: [PATCH 23/26] Update pubspec.yaml --- packages/video_player/video_player/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index 926add50f43c..7e50e71884ea 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.2.4 +version: 2.2.5 environment: sdk: ">=2.14.0 <3.0.0" From dd18f6d836d5e36137dd063376bf2af8daf05e83 Mon Sep 17 00:00:00 2001 From: KevinTheGray Date: Thu, 23 Sep 2021 12:49:51 -0400 Subject: [PATCH 24/26] Update pubspec.yaml --- packages/video_player/video_player/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index a6ee2d594656..c002ed859f2c 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.2.5 +version: 2.2.6 environment: sdk: ">=2.14.0 <3.0.0" From 977ec0975d54dffaa62c8c4e15988f71cc0d238b Mon Sep 17 00:00:00 2001 From: Kevin Gray Date: Mon, 8 Nov 2021 00:29:30 -0500 Subject: [PATCH 25/26] make initWithRegistrar public and use it in test --- .../video_player/example/ios/RunnerTests/VideoPlayerTests.m | 4 ++-- .../video_player/ios/Classes/FLTVideoPlayerPlugin.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m index a2442c02ccee..deea83350bce 100644 --- a/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m +++ b/packages/video_player/video_player/example/ios/RunnerTests/VideoPlayerTests.m @@ -28,8 +28,8 @@ - (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { OCMStub([partialRegistrar textures]).andReturn(mockTextureRegistry); [FLTVideoPlayerPlugin registerWithRegistrar:partialRegistrar]; FLTVideoPlayerPlugin *videoPlayerPlugin = - (FLTVideoPlayerPlugin *)[registry - valuePublishedByPlugin:@"TEST_FLTVideoPlayerPlugin"]; + (FLTVideoPlayerPlugin *)[[FLTVideoPlayerPlugin alloc] + initWithRegistrar:partialRegistrar]; FLTPositionMessage *message = [[FLTPositionMessage alloc] init]; message.textureId = @101; message.position = @0; diff --git a/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.h b/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.h index 6c9d91468d6b..2514aee71f10 100644 --- a/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.h +++ b/packages/video_player/video_player/ios/Classes/FLTVideoPlayerPlugin.h @@ -5,4 +5,5 @@ #import @interface FLTVideoPlayerPlugin : NSObject +- (instancetype)initWithRegistrar:(NSObject*)registrar; @end From 09b04cfdef4119a5dd58bdaa2ce37b1007b5f696 Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Tue, 21 Dec 2021 21:32:47 +0000 Subject: [PATCH 26/26] Address PR feedback --- packages/video_player/video_player/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player/CHANGELOG.md b/packages/video_player/video_player/CHANGELOG.md index 204abb6b5eb4..435484ba6e33 100644 --- a/packages/video_player/video_player/CHANGELOG.md +++ b/packages/video_player/video_player/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.2.10 -* iOS: Update texture on `seekTo`. +* iOS: Updates texture on `seekTo`. ## 2.2.9