From f1d40b327af2de036b1311e790d460b93fe5e2a1 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Sat, 18 Mar 2017 13:35:43 -0700 Subject: [PATCH] Conform to platform protocol (#3485) The Android and iOS versions of this function had diverged. This patch makes the iOS version match the Android version (and what the framework expects). Fixes https://github.com/flutter/flutter/issues/8878 --- .../darwin/ios/framework/Source/FlutterPlatformPlugin.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm index 187cbf7c4..77a20e9ad 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm @@ -13,12 +13,12 @@ namespace { constexpr char kTextPlainFormat[] = "text/plain"; -NSDictionary* GetDirectoryOfType(NSSearchPathDirectory dir) { +NSString* GetDirectoryOfType(NSSearchPathDirectory dir) { NSArray* paths = NSSearchPathForDirectoriesInDomains(dir, NSUserDomainMask, YES); if (paths.count == 0) return nil; - return @{ @"path": paths.firstObject }; + return paths.firstObject; } } // namespaces @@ -191,11 +191,11 @@ using namespace shell; pasteboard.string = data[@"text"]; } -- (NSDictionary*)getPathProviderTemporaryDirectory { +- (NSString*)getPathProviderTemporaryDirectory { return GetDirectoryOfType(NSCachesDirectory); } -- (NSDictionary*)getPathProviderApplicationDocumentsDirectory { +- (NSString*)getPathProviderApplicationDocumentsDirectory { return GetDirectoryOfType(NSDocumentDirectory); } -- GitLab