diff --git a/packages/path-provider/CHANGELOG.md b/packages/path-provider/CHANGELOG.md index 0631a7dcf75e..e4e450272dc6 100644 --- a/packages/path-provider/CHANGELOG.md +++ b/packages/path-provider/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.2.0] - 2017-05-10 + +* Upgrade to new plugin registration. (https://groups.google.com/forum/#!topic/flutter-dev/zba1Ynf2OKM) + ## [0.1.3] - 2017-05-09 * Upgrade Android SDK Build Tools to 25.0.3. diff --git a/packages/path-provider/android/src/main/java/io/flutter/plugins/path_provider/PathProviderPlugin.java b/packages/path-provider/android/src/main/java/io/flutter/plugins/path_provider/PathProviderPlugin.java index 82b884ddf40f..1608d2d6f4f2 100644 --- a/packages/path-provider/android/src/main/java/io/flutter/plugins/path_provider/PathProviderPlugin.java +++ b/packages/path-provider/android/src/main/java/io/flutter/plugins/path_provider/PathProviderPlugin.java @@ -4,25 +4,29 @@ package io.flutter.plugins.path_provider; -import io.flutter.app.FlutterActivity; +import android.app.Activity; + import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.Result; import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.PluginRegistry.Registrar; import io.flutter.util.PathUtils; public class PathProviderPlugin implements MethodCallHandler { - private FlutterActivity activity; + private final Activity activity; + - public static PathProviderPlugin register(FlutterActivity activity) { - return new PathProviderPlugin(activity); + public static void registerWith(Registrar registrar) { + MethodChannel channel = + new MethodChannel(registrar.messenger(), "plugins.flutter.io/path_provider"); + PathProviderPlugin instance = new PathProviderPlugin(registrar.activity()); + channel.setMethodCallHandler(instance); } - private PathProviderPlugin(FlutterActivity activity) { + private PathProviderPlugin(Activity activity) { this.activity = activity; - new MethodChannel(activity.getFlutterView(), "plugins.flutter.io/path_provider"). - setMethodCallHandler(this); } @Override diff --git a/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java b/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java deleted file mode 100644 index af8f07400065..000000000000 --- a/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.flutter.plugins; - -import io.flutter.app.FlutterActivity; - -import io.flutter.plugins.path_provider.PathProviderPlugin; - -/** - * Generated file. Do not edit. - */ - -public class PluginRegistry { - public PathProviderPlugin path_provider; - - public void registerAll(FlutterActivity activity) { - path_provider = PathProviderPlugin.register(activity); - } -} diff --git a/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/path_provider_example/MainActivity.java b/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/path_provider_example/MainActivity.java index 88dd44c3804d..99aba64d9743 100644 --- a/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/path_provider_example/MainActivity.java +++ b/packages/path-provider/example/android/app/src/main/java/io/flutter/plugins/path_provider_example/MainActivity.java @@ -2,15 +2,13 @@ import android.os.Bundle; import io.flutter.app.FlutterActivity; -import io.flutter.plugins.PluginRegistry; +import io.flutter.plugins.GeneratedPluginRegistrant; public class MainActivity extends FlutterActivity { - PluginRegistry pluginRegistry; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - pluginRegistry = new PluginRegistry(); - pluginRegistry.registerAll(this); + GeneratedPluginRegistrant.registerWith(this); } } diff --git a/packages/path-provider/example/ios/Pods/Pods.xcodeproj/project.pbxproj b/packages/path-provider/example/ios/Pods/Pods.xcodeproj/project.pbxproj index 00f7b52e0942..38b8ac861a2d 100644 --- a/packages/path-provider/example/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/packages/path-provider/example/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -8,13 +8,13 @@ /* Begin PBXBuildFile section */ 12D3ECA0FDF9A749CEC89C05282EB5A4 /* Pods-Runner-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E631AC9676BE84AEB52F7D6520E4684 /* Pods-Runner-dummy.m */; }; - 2D0EF0869DC3409AEF4DCAD2D2DA1004 /* path_provider-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DF07219C09604ADBC06879CAE281BE48 /* path_provider-dummy.m */; }; + 2D0EF0869DC3409AEF4DCAD2D2DA1004 /* path_provider-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 40B0CF11528BB45B7C8F3C4464D6EA05 /* path_provider-dummy.m */; }; 34510C53CAC810E0E4307A3BC1400422 /* Pods-Runner-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 800A16960E73EBAF012C139238277358 /* Pods-Runner-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5A38444634826423930C21EF1161F253 /* PathProviderPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 564F5DE3140BF4951CDD28F482CCCFCE /* PathProviderPlugin.m */; }; - 623B374A403B41535326A59C0001CDE3 /* PathProviderPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = D60A070084D8F6CD01766D4661B9E927 /* PathProviderPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 71A5F5531D240D41341731D16C4D7CA5 /* path_provider-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 22C711D4E0C672344177F11F17344846 /* path_provider-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 916A0CF83F9B90421937B1FCBB784FA5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - B12DA244C115515D82F3C7CCF345AF46 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; + 3CED08B34AFB4B409EB5CA051A899D82 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + 5A38444634826423930C21EF1161F253 /* PathProviderPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = A413DE07857572BEC5087059B017EE87 /* PathProviderPlugin.m */; }; + 623B374A403B41535326A59C0001CDE3 /* PathProviderPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 98E93A26BAA4A29B374B0F5B7EA0B0FD /* PathProviderPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 71A5F5531D240D41341731D16C4D7CA5 /* path_provider-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A90696F08EF52A00849E5D67F934BDA /* path_provider-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D515B352F4847DFFFABEE5EBE4A0CB92 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -29,27 +29,27 @@ /* Begin PBXFileReference section */ 1026CF1DA26280B555007FE14EDFC956 /* path_provider.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = path_provider.framework; path = path_provider.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 10EE1B5C3E6CEE90C89AB43DF3F1C351 /* path_provider-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider-prefix.pch"; sourceTree = ""; }; + 10B74D5B222488560B76D93FB5268A2D /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Flutter.framework; sourceTree = ""; }; 1230911B0B1C1A5E00676A90606DE300 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1E631AC9676BE84AEB52F7D6520E4684 /* Pods-Runner-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Runner-dummy.m"; sourceTree = ""; }; - 22C711D4E0C672344177F11F17344846 /* path_provider-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider-umbrella.h"; sourceTree = ""; }; - 564F5DE3140BF4951CDD28F482CCCFCE /* PathProviderPlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PathProviderPlugin.m; sourceTree = ""; }; + 40B0CF11528BB45B7C8F3C4464D6EA05 /* path_provider-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "path_provider-dummy.m"; sourceTree = ""; }; 5EB571A3ABC7BF67A4642C216D6F0E21 /* Pods-Runner-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Runner-resources.sh"; sourceTree = ""; }; 60BA499A645871628CFA2E5806E78269 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 60CFA3DFCDBAC7963DF1480C931A8132 /* path_provider.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = path_provider.xcconfig; sourceTree = ""; }; 63BC99522783D0218755FDE8464650E4 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 7B579E7BA2A9552A42653E5F35A2A689 /* path_provider.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = path_provider.modulemap; sourceTree = ""; }; + 7B7644899149322537E00C78FA19389A /* path_provider-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider-prefix.pch"; sourceTree = ""; }; 800A16960E73EBAF012C139238277358 /* Pods-Runner-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Runner-umbrella.h"; sourceTree = ""; }; - 80D50C5DA528168417E6B6F849343B53 /* path_provider.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = path_provider.modulemap; sourceTree = ""; }; 820303DDBFB04D47450E66B28FF32086 /* Pods-Runner-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Runner-acknowledgements.plist"; sourceTree = ""; }; + 8C26FB6E520E4C8F20E1D705A9EC2F14 /* path_provider.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = path_provider.xcconfig; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 94B9AB26574C9177CCF577B355679FBB /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Flutter.framework; sourceTree = ""; }; + 98E93A26BAA4A29B374B0F5B7EA0B0FD /* PathProviderPlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PathProviderPlugin.h; sourceTree = ""; }; + 9A90696F08EF52A00849E5D67F934BDA /* path_provider-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider-umbrella.h"; sourceTree = ""; }; + A413DE07857572BEC5087059B017EE87 /* PathProviderPlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PathProviderPlugin.m; sourceTree = ""; }; B8331DA3DF79C3AB28033920E45C4B46 /* Pods-Runner-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Runner-frameworks.sh"; sourceTree = ""; }; BE191574A51A7A7D07FEEACB1323F4E5 /* Pods-Runner.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Runner.modulemap"; sourceTree = ""; }; CA0501A66E945611274FD9BED1573FA5 /* Pods-Runner-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Runner-acknowledgements.markdown"; sourceTree = ""; }; - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - D01E8BC915886FAC8F130A7CE46A8671 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D60A070084D8F6CD01766D4661B9E927 /* PathProviderPlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PathProviderPlugin.h; sourceTree = ""; }; - DF07219C09604ADBC06879CAE281BE48 /* path_provider-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "path_provider-dummy.m"; sourceTree = ""; }; + D07CCFAD2612B394CC158E92970CC2A8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F404C7A83DF4325827691D5A86584FA5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Runner.framework; path = "Pods-Runner.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -58,7 +58,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 916A0CF83F9B90421937B1FCBB784FA5 /* Foundation.framework in Frameworks */, + D515B352F4847DFFFABEE5EBE4A0CB92 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -66,23 +66,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B12DA244C115515D82F3C7CCF345AF46 /* Foundation.framework in Frameworks */, + 3CED08B34AFB4B409EB5CA051A899D82 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1C927379501FACB72785A89A26D979DC /* Classes */ = { - isa = PBXGroup; - children = ( - D60A070084D8F6CD01766D4661B9E927 /* PathProviderPlugin.h */, - 564F5DE3140BF4951CDD28F482CCCFCE /* PathProviderPlugin.m */, - ); - name = Classes; - path = Classes; - sourceTree = ""; - }; 2DE526D491B80AA65F8A8ADC05327CC8 /* Products */ = { isa = PBXGroup; children = ( @@ -92,40 +82,51 @@ name = Products; sourceTree = ""; }; - 7101FE4D13B1B9163B7C86904A410CEF /* Flutter */ = { + 335C34D865B87E3528AA8E78BE3D6675 /* Frameworks */ = { isa = PBXGroup; children = ( - A9E4D89779CFA8DA0AE1D2213FBE48DC /* Frameworks */, + 10B74D5B222488560B76D93FB5268A2D /* Flutter.framework */, ); - name = Flutter; - path = "/Users/zarah/flutter/bin/cache/artifacts/engine/ios-release"; - sourceTree = ""; + name = Frameworks; + sourceTree = ""; }; - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { + 666C57A1156137EC86C22C559EA9F028 /* Flutter */ = { isa = PBXGroup; children = ( - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, + 335C34D865B87E3528AA8E78BE3D6675 /* Frameworks */, ); - name = iOS; - sourceTree = ""; + name = Flutter; + path = /Users/zarah/flutter/bin/cache/artifacts/engine/ios; + sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - FE26AAB62CD3FB63DFC47CA35FC595F7 /* Development Pods */, + 9CDBE126E774089699B1215875DBE748 /* Development Pods */, BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 2DE526D491B80AA65F8A8ADC05327CC8 /* Products */, B88D6092221BFC46BA797811AC7C0DEC /* Targets Support Files */, ); sourceTree = ""; }; - A9E4D89779CFA8DA0AE1D2213FBE48DC /* Frameworks */ = { + 9A60E335C29E4AA3DCA231EBB9020096 /* Classes */ = { isa = PBXGroup; children = ( - 94B9AB26574C9177CCF577B355679FBB /* Flutter.framework */, + 98E93A26BAA4A29B374B0F5B7EA0B0FD /* PathProviderPlugin.h */, + A413DE07857572BEC5087059B017EE87 /* PathProviderPlugin.m */, ); - name = Frameworks; + name = Classes; + path = Classes; + sourceTree = ""; + }; + 9CDBE126E774089699B1215875DBE748 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 666C57A1156137EC86C22C559EA9F028 /* Flutter */, + D65AC03D53DFBAA18AA300104B3DA7D1 /* path_provider */, + ); + name = "Development Pods"; sourceTree = ""; }; B88D6092221BFC46BA797811AC7C0DEC /* Targets Support Files */ = { @@ -136,33 +137,41 @@ name = "Targets Support Files"; sourceTree = ""; }; + BC35633818DABF7E892A30E455C28DE0 /* Support Files */ = { + isa = PBXGroup; + children = ( + D07CCFAD2612B394CC158E92970CC2A8 /* Info.plist */, + 7B579E7BA2A9552A42653E5F35A2A689 /* path_provider.modulemap */, + 8C26FB6E520E4C8F20E1D705A9EC2F14 /* path_provider.xcconfig */, + 40B0CF11528BB45B7C8F3C4464D6EA05 /* path_provider-dummy.m */, + 7B7644899149322537E00C78FA19389A /* path_provider-prefix.pch */, + 9A90696F08EF52A00849E5D67F934BDA /* path_provider-umbrella.h */, + ); + name = "Support Files"; + path = "../example/ios/Pods/Target Support Files/path_provider"; + sourceTree = ""; + }; BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, + D35AF013A5F0BAD4F32504907A52519E /* iOS */, ); name = Frameworks; sourceTree = ""; }; - C3C72F2742945C22972F0308A566416B /* Support Files */ = { + D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { isa = PBXGroup; children = ( - D01E8BC915886FAC8F130A7CE46A8671 /* Info.plist */, - 80D50C5DA528168417E6B6F849343B53 /* path_provider.modulemap */, - 60CFA3DFCDBAC7963DF1480C931A8132 /* path_provider.xcconfig */, - DF07219C09604ADBC06879CAE281BE48 /* path_provider-dummy.m */, - 10EE1B5C3E6CEE90C89AB43DF3F1C351 /* path_provider-prefix.pch */, - 22C711D4E0C672344177F11F17344846 /* path_provider-umbrella.h */, + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, ); - name = "Support Files"; - path = "../example/ios/Pods/Target Support Files/path_provider"; + name = iOS; sourceTree = ""; }; - E29B57BA2AEE6AF7B99FE00338EFEF4F /* path_provider */ = { + D65AC03D53DFBAA18AA300104B3DA7D1 /* path_provider */ = { isa = PBXGroup; children = ( - 1C927379501FACB72785A89A26D979DC /* Classes */, - C3C72F2742945C22972F0308A566416B /* Support Files */, + 9A60E335C29E4AA3DCA231EBB9020096 /* Classes */, + BC35633818DABF7E892A30E455C28DE0 /* Support Files */, ); name = path_provider; path = "/Users/zarah/plugins/packages/path-provider/ios"; @@ -186,15 +195,6 @@ path = "Target Support Files/Pods-Runner"; sourceTree = ""; }; - FE26AAB62CD3FB63DFC47CA35FC595F7 /* Development Pods */ = { - isa = PBXGroup; - children = ( - 7101FE4D13B1B9163B7C86904A410CEF /* Flutter */, - E29B57BA2AEE6AF7B99FE00338EFEF4F /* path_provider */, - ); - name = "Development Pods"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -259,7 +259,7 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; + LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; @@ -310,55 +310,12 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 44CDBB6D11DE06DB64D6268622BDC47E /* Release */ = { + 34FE9531DA9AF2820790339988D5FF41 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -366,10 +323,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; @@ -394,11 +354,12 @@ }; name = Release; }; - 49F5850C8A206D267B64D453AF2D4E38 /* Debug */ = { + 3EAB5ACA26C74442B6A3E07B16C85EED /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 60CFA3DFCDBAC7963DF1480C931A8132 /* path_provider.xcconfig */; + baseConfigurationReference = 8C26FB6E520E4C8F20E1D705A9EC2F14 /* path_provider.xcconfig */; buildSettings = { ARCHS = arm64; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -427,16 +388,17 @@ }; name = Debug; }; - 5A23BDE486C46BFD719A38840A136BF8 /* Debug */ = { + 6F164B7A8CC4540EEC4673BFAB46C232 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 63BC99522783D0218755FDE8464650E4 /* Pods-Runner.debug.xcconfig */; + baseConfigurationReference = 60BA499A645871628CFA2E5806E78269 /* Pods-Runner.release.xcconfig */; buildSettings = { ARCHS = arm64; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -450,7 +412,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -462,13 +424,14 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - ABFD32077AA6B566F94076C5DEE0DB25 /* Release */ = { + 787283E096EE4994E54211D41037BC48 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 60BA499A645871628CFA2E5806E78269 /* Pods-Runner.release.xcconfig */; + baseConfigurationReference = 8C26FB6E520E4C8F20E1D705A9EC2F14 /* path_provider.xcconfig */; buildSettings = { ARCHS = arm64; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -481,18 +444,14 @@ ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Runner/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/path_provider/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; + MODULEMAP_FILE = "Target Support Files/path_provider/path_provider.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Runner; + PRODUCT_NAME = path_provider; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -501,16 +460,17 @@ }; name = Release; }; - B17AAD93E8EC1424BCAF0D5068CF3885 /* Release */ = { + 79C69D9F9725731C5F35BBCE0CCBD7C1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 60CFA3DFCDBAC7963DF1480C931A8132 /* path_provider.xcconfig */; + baseConfigurationReference = 63BC99522783D0218755FDE8464650E4 /* Pods-Runner.debug.xcconfig */; buildSettings = { ARCHS = arm64; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -518,21 +478,73 @@ ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/path_provider/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Runner/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/path_provider/path_provider.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = path_provider; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Runner; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; + }; + C104F7F091290C3D1E248192F07FE689 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; }; /* End XCBuildConfiguration section */ @@ -540,8 +552,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, - 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, + C104F7F091290C3D1E248192F07FE689 /* Debug */, + 34FE9531DA9AF2820790339988D5FF41 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -549,8 +561,8 @@ D539934C414E6965B703CB3D7B1F1BF6 /* Build configuration list for PBXNativeTarget "Pods-Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5A23BDE486C46BFD719A38840A136BF8 /* Debug */, - ABFD32077AA6B566F94076C5DEE0DB25 /* Release */, + 79C69D9F9725731C5F35BBCE0CCBD7C1 /* Debug */, + 6F164B7A8CC4540EEC4673BFAB46C232 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -558,8 +570,8 @@ E7632FE225D15541A9088338F29A3C3E /* Build configuration list for PBXNativeTarget "path_provider" */ = { isa = XCConfigurationList; buildConfigurations = ( - 49F5850C8A206D267B64D453AF2D4E38 /* Debug */, - B17AAD93E8EC1424BCAF0D5068CF3885 /* Release */, + 3EAB5ACA26C74442B6A3E07B16C85EED /* Debug */, + 787283E096EE4994E54211D41037BC48 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/packages/path-provider/example/ios/Runner.xcodeproj/project.pbxproj b/packages/path-provider/example/ios/Runner.xcodeproj/project.pbxproj index e41078014fd5..69afd4ee38f5 100644 --- a/packages/path-provider/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/path-provider/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,7 +8,7 @@ /* Begin PBXBuildFile section */ 0675671949C15323862C164B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06B796751C0435964931B69B /* Pods_Runner.framework */; }; - 1498D2341E8E89220040F4C2 /* PluginRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* PluginRegistry.m */; }; + 2D9222481EC32A19007564B0 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9222471EC32A19007564B0 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -41,8 +41,8 @@ /* Begin PBXFileReference section */ 06B796751C0435964931B69B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1498D2321E8E86230040F4C2 /* PluginRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PluginRegistry.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* PluginRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PluginRegistry.m; sourceTree = ""; }; + 2D9222461EC32A19007564B0 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 2D9222471EC32A19007564B0 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -117,6 +117,8 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( + 2D9222461EC32A19007564B0 /* GeneratedPluginRegistrant.h */, + 2D9222471EC32A19007564B0 /* GeneratedPluginRegistrant.m */, 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 97C146FA1CF9000F007C117D /* Main.storyboard */, @@ -124,8 +126,6 @@ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* PluginRegistry.h */, - 1498D2331E8E89220040F4C2 /* PluginRegistry.m */, ); path = Runner; sourceTree = ""; @@ -292,7 +292,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -304,7 +304,7 @@ files = ( 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* PluginRegistry.m in Sources */, + 2D9222481EC32A19007564B0 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/packages/path-provider/example/ios/Runner/AppDelegate.m b/packages/path-provider/example/ios/Runner/AppDelegate.m index d28a600e9926..5392c376a59b 100644 --- a/packages/path-provider/example/ios/Runner/AppDelegate.m +++ b/packages/path-provider/example/ios/Runner/AppDelegate.m @@ -1,16 +1,11 @@ #include "AppDelegate.h" -#include "PluginRegistry.h" +#include "GeneratedPluginRegistrant.h" -@implementation AppDelegate { - PluginRegistry *plugins; -} +@implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - FlutterViewController *flutterController = - (FlutterViewController *)self.window.rootViewController; - plugins = [[PluginRegistry alloc] initWithController:flutterController]; - return YES; + [GeneratedPluginRegistrant registerWithRegistry:self]; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; } @end diff --git a/packages/path-provider/example/ios/Runner/GeneratedPluginRegistrant.h b/packages/path-provider/example/ios/Runner/GeneratedPluginRegistrant.h new file mode 100644 index 000000000000..95587e433566 --- /dev/null +++ b/packages/path-provider/example/ios/Runner/GeneratedPluginRegistrant.h @@ -0,0 +1,16 @@ +// +// Generated file. Do not edit. +// + +#ifndef GeneratedPluginRegistrant_h +#define GeneratedPluginRegistrant_h + +#import + +#import "PathProviderPlugin.h" + +@interface GeneratedPluginRegistrant : NSObject ++ (void)registerWithRegistry:(NSObject*)registry; +@end + +#endif /* GeneratedPluginRegistrant_h */ diff --git a/packages/path-provider/example/ios/Runner/GeneratedPluginRegistrant.m b/packages/path-provider/example/ios/Runner/GeneratedPluginRegistrant.m new file mode 100644 index 000000000000..b1dc81b0058b --- /dev/null +++ b/packages/path-provider/example/ios/Runner/GeneratedPluginRegistrant.m @@ -0,0 +1,13 @@ +// +// Generated file. Do not edit. +// + +#import "GeneratedPluginRegistrant.h" + +@implementation GeneratedPluginRegistrant + ++ (void)registerWithRegistry:(NSObject*)registry { + [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; +} + +@end diff --git a/packages/path-provider/example/ios/Runner/PluginRegistry.h b/packages/path-provider/example/ios/Runner/PluginRegistry.h deleted file mode 100644 index 882e80fc7170..000000000000 --- a/packages/path-provider/example/ios/Runner/PluginRegistry.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Generated file. Do not edit. -// - -#ifndef PluginRegistry_h -#define PluginRegistry_h - -#import - -#import "PathProviderPlugin.h" - -@interface PluginRegistry : NSObject - -@property (readonly, nonatomic) PathProviderPlugin *path_provider; - -- (instancetype)initWithController:(FlutterViewController *)controller; - -@end - -#endif /* PluginRegistry_h */ diff --git a/packages/path-provider/example/ios/Runner/PluginRegistry.m b/packages/path-provider/example/ios/Runner/PluginRegistry.m deleted file mode 100644 index 1db90e13fc40..000000000000 --- a/packages/path-provider/example/ios/Runner/PluginRegistry.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// Generated file. Do not edit. -// - -#import "PluginRegistry.h" - -@implementation PluginRegistry - -- (instancetype)initWithController:(FlutterViewController *)controller { - if (self = [super init]) { - _path_provider = [[PathProviderPlugin alloc] initWithController:controller]; - } - return self; -} - -@end diff --git a/packages/path-provider/ios/Classes/PathProviderPlugin.h b/packages/path-provider/ios/Classes/PathProviderPlugin.h index ead27390953b..21f0669542fa 100644 --- a/packages/path-provider/ios/Classes/PathProviderPlugin.h +++ b/packages/path-provider/ios/Classes/PathProviderPlugin.h @@ -4,6 +4,5 @@ #import -@interface PathProviderPlugin : NSObject -- initWithController:(FlutterViewController *)controller; +@interface PathProviderPlugin : NSObject @end diff --git a/packages/path-provider/ios/Classes/PathProviderPlugin.m b/packages/path-provider/ios/Classes/PathProviderPlugin.m index 6238795c2e51..d0d1202df800 100644 --- a/packages/path-provider/ios/Classes/PathProviderPlugin.m +++ b/packages/path-provider/ios/Classes/PathProviderPlugin.m @@ -11,15 +11,12 @@ return paths.firstObject; } -@implementation PathProviderPlugin { -} +@implementation PathProviderPlugin -- (instancetype)initWithController:(FlutterViewController *)controller { - self = [super init]; - if (self) { ++ (void)registerWithRegistrar:(NSObject*)registrar { FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:@"plugins.flutter.io/path_provider" - binaryMessenger:controller]; + binaryMessenger:registrar.messenger]; [channel setMethodCallHandler:^(FlutterMethodCall *call, FlutterResult result) { if ([@"getTemporaryDirectory" isEqualToString:call.method]) { @@ -31,14 +28,12 @@ - (instancetype)initWithController:(FlutterViewController *)controller { } }]; } - return self; -} -- (NSString*)getTemporaryDirectory { ++ (NSString*)getTemporaryDirectory { return GetDirectoryOfType(NSCachesDirectory); } -- (NSString*)getApplicationDocumentsDirectory { ++ (NSString*)getApplicationDocumentsDirectory { return GetDirectoryOfType(NSDocumentDirectory); } diff --git a/packages/path-provider/pubspec.yaml b/packages/path-provider/pubspec.yaml index 79048227c26f..ca8449422c1a 100644 --- a/packages/path-provider/pubspec.yaml +++ b/packages/path-provider/pubspec.yaml @@ -1,6 +1,6 @@ name: path_provider -version: 0.1.3 +version: 0.2.0 description: A Flutter plugin for getting commonly used locations on the filesystem. author: Flutter Team homepage: https://github.com/flutter/plugins @@ -15,4 +15,4 @@ dependencies: sdk: flutter dev_dependencies: - test: \ No newline at end of file + test: