diff --git a/packages/url-launcher/CHANGELOG.md b/packages/url-launcher/CHANGELOG.md index 1ac030646138..5f0179d1db6e 100644 --- a/packages/url-launcher/CHANGELOG.md +++ b/packages/url-launcher/CHANGELOG.md @@ -1,8 +1,12 @@ -## [0.3.6] - 2017-05-9 +## [0.4.0] - 2017-05-09 + +* Upgrade to new plugin registration. + +## [0.3.6] - 2017-05-09 * Fix workaround for failing dynamic check in Xcode 7/sdk version 9. -## [0.3.5] - 2017-05-8 +## [0.3.5] - 2017-05-08 * Workaround for failing dynamic check in Xcode 7/sdk version 9. diff --git a/packages/url-launcher/android/src/main/java/io/flutter/plugins/url_launcher/UrlLauncherPlugin.java b/packages/url-launcher/android/src/main/java/io/flutter/plugins/url_launcher/UrlLauncherPlugin.java index 347a6f68af33..ee1d04552609 100644 --- a/packages/url-launcher/android/src/main/java/io/flutter/plugins/url_launcher/UrlLauncherPlugin.java +++ b/packages/url-launcher/android/src/main/java/io/flutter/plugins/url_launcher/UrlLauncherPlugin.java @@ -4,6 +4,7 @@ package io.flutter.plugins.url_launcher; +import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; @@ -13,21 +14,22 @@ 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; /** * UrlLauncherPlugin */ public class UrlLauncherPlugin implements MethodCallHandler { - private FlutterActivity activity; + private final Activity activity; - public static UrlLauncherPlugin register(FlutterActivity activity) { - return new UrlLauncherPlugin(activity); + public static void registerWith(Registrar registrar) { + MethodChannel channel = new MethodChannel(registrar.messenger(), "plugins.flutter.io/url_launcher"); + UrlLauncherPlugin instance = new UrlLauncherPlugin(registrar.activity()); + channel.setMethodCallHandler(instance); } - private UrlLauncherPlugin(FlutterActivity activity) { + private UrlLauncherPlugin(Activity activity) { this.activity = activity; - new MethodChannel( - activity.getFlutterView(), "plugins.flutter.io/url_launcher").setMethodCallHandler(this); } @Override diff --git a/packages/url-launcher/example/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java b/packages/url-launcher/example/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java deleted file mode 100644 index 846c01bc50c7..000000000000 --- a/packages/url-launcher/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.url_launcher.UrlLauncherPlugin; - -/** - * Generated file. Do not edit. - */ - -public class PluginRegistry { - public UrlLauncherPlugin url_launcher; - - public void registerAll(FlutterActivity activity) { - url_launcher = UrlLauncherPlugin.register(activity); - } -} diff --git a/packages/url-launcher/example/android/app/src/main/java/io/flutter/plugins/url_launcher_example/MainActivity.java b/packages/url-launcher/example/android/app/src/main/java/io/flutter/plugins/url_launcher_example/MainActivity.java index a02468f4d55c..539bb5c263b1 100644 --- a/packages/url-launcher/example/android/app/src/main/java/io/flutter/plugins/url_launcher_example/MainActivity.java +++ b/packages/url-launcher/example/android/app/src/main/java/io/flutter/plugins/url_launcher_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/url-launcher/example/ios/Pods/Pods.xcodeproj/project.pbxproj b/packages/url-launcher/example/ios/Pods/Pods.xcodeproj/project.pbxproj index b703a6beec2d..c4739f55efee 100644 --- a/packages/url-launcher/example/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/packages/url-launcher/example/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -11,8 +11,8 @@ 1B0ACC20E310CA80EFB60BF34C9B4184 /* Pods-Runner-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E631AC9676BE84AEB52F7D6520E4684 /* Pods-Runner-dummy.m */; }; 4415323DEF18C14449AA182F7811169E /* Pods-Runner-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 800A16960E73EBAF012C139238277358 /* Pods-Runner-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 568F29DDF606A6C38F8DF8EED181E02A /* url_launcher-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D33EE0AFDF865FC57DE4AFE8D4A1FE2D /* url_launcher-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 74DD29F300E0CBE5C7ECCD118B18AFF1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - 7C942C0895A8904C17777BD7F7929526 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; + 663E44A9BF4C53FD2D4A4F02B7F0D9A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + 967876A1A0C83097787048AD18F04818 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; B675652788D552B0B818758E03B07B16 /* UrlLauncherPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5EC4C1C7345C1568EA4391116B5FA5 /* UrlLauncherPlugin.m */; }; EE31ED9F7764675F7D27B13E08EE4351 /* url_launcher-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 93FBA44B61BC2932F585020591D983DE /* url_launcher-dummy.m */; }; /* End PBXBuildFile section */ @@ -39,6 +39,7 @@ 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 = ""; }; 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; }; 800A16960E73EBAF012C139238277358 /* Pods-Runner-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Runner-umbrella.h"; sourceTree = ""; }; 820303DDBFB04D47450E66B28FF32086 /* Pods-Runner-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Runner-acknowledgements.plist"; sourceTree = ""; }; 8629EEB906A7D06D81A6ED5F5D9991FF /* url_launcher-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "url_launcher-prefix.pch"; sourceTree = ""; }; @@ -48,7 +49,6 @@ B8CE98FF8B1978EDB8B54B7B3FE5E630 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; 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; }; D33EE0AFDF865FC57DE4AFE8D4A1FE2D /* url_launcher-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "url_launcher-umbrella.h"; sourceTree = ""; }; DBB19A6417A00E2709A4CC67BC499435 /* UrlLauncherPlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = UrlLauncherPlugin.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -58,7 +58,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 74DD29F300E0CBE5C7ECCD118B18AFF1 /* Foundation.framework in Frameworks */, + 967876A1A0C83097787048AD18F04818 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -66,7 +66,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7C942C0895A8904C17777BD7F7929526 /* Foundation.framework in Frameworks */, + 663E44A9BF4C53FD2D4A4F02B7F0D9A8 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -81,14 +81,6 @@ name = Frameworks; sourceTree = ""; }; - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { - isa = PBXGroup; - children = ( - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; 7D45BA6CBE8EEF5E46C6761CCDF60B06 /* Development Pods */ = { isa = PBXGroup; children = ( @@ -163,11 +155,19 @@ BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, + D35AF013A5F0BAD4F32504907A52519E /* iOS */, ); name = Frameworks; sourceTree = ""; }; + D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + isa = PBXGroup; + children = ( + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; ECC1486D1F14EC5BA692C079D9D06161 /* Pods-Runner */ = { isa = PBXGroup; children = ( @@ -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,46 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { + 0989144F8C410B45C5C00543AF71C158 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4FDED4BA7D4F5DF30B2103FF868343B2 /* url_launcher.xcconfig */; 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; + 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"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_BITCODE = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/url_launcher/url_launcher-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/url_launcher/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/url_launcher/url_launcher.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = url_launcher; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 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 +357,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,53 +388,17 @@ }; name = Release; }; - 636307A6B7F8E252AC1E06AA604003DB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 60BA499A645871628CFA2E5806E78269 /* Pods-Runner.release.xcconfig */; - buildSettings = { - ARCHS = arm64; - "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"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - 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"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.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; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 66B9050C99E4D2D621D4C7E6F1944502 /* Release */ = { + 7DDB0DA1033E261BAA72E5EC6C1A5E59 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 4FDED4BA7D4F5DF30B2103FF868343B2 /* url_launcher.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; @@ -454,7 +412,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/url_launcher/url_launcher.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = url_launcher; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -462,18 +420,19 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - A564194CEC4B461A6AF96769F7734845 /* Debug */ = { + BA98121C783BFE6132DD346F4C940736 /* 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; @@ -487,7 +446,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)"; @@ -499,13 +458,62 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; + name = Release; + }; + 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; }; - D5E30FCB1F1B03C78FBACDDD90DBAD54 /* Debug */ = { + D162CA9634C33A17281145635858A456 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FDED4BA7D4F5DF30B2103FF868343B2 /* url_launcher.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*]" = ""; @@ -518,14 +526,18 @@ ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/url_launcher/url_launcher-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/url_launcher/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/url_launcher/url_launcher.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = url_launcher; + 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"; @@ -540,8 +552,8 @@ 0891B12D581C721AC818AE5D4579653D /* Build configuration list for PBXNativeTarget "Pods-Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( - A564194CEC4B461A6AF96769F7734845 /* Debug */, - 636307A6B7F8E252AC1E06AA604003DB /* Release */, + D162CA9634C33A17281145635858A456 /* Debug */, + BA98121C783BFE6132DD346F4C940736 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -549,8 +561,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, - 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, + C104F7F091290C3D1E248192F07FE689 /* Debug */, + 34FE9531DA9AF2820790339988D5FF41 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -558,8 +570,8 @@ F05C16B9697C2B600BE94E2DDC00B339 /* Build configuration list for PBXNativeTarget "url_launcher" */ = { isa = XCConfigurationList; buildConfigurations = ( - D5E30FCB1F1B03C78FBACDDD90DBAD54 /* Debug */, - 66B9050C99E4D2D621D4C7E6F1944502 /* Release */, + 7DDB0DA1033E261BAA72E5EC6C1A5E59 /* Debug */, + 0989144F8C410B45C5C00543AF71C158 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh b/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh index 4602c68ab68b..aed060f041a1 100755 --- a/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh +++ b/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh @@ -21,6 +21,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 3) TARGET_DEVICE_ARGS="--target-device tv" ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; diff --git a/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig b/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig index 283f6a71cf3a..0f9885288294 100644 --- a/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig +++ b/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig @@ -6,4 +6,5 @@ OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/url_launcher/ OTHER_LDFLAGS = $(inherited) -framework "Flutter" -framework "url_launcher" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig b/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig index 283f6a71cf3a..0f9885288294 100644 --- a/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig +++ b/packages/url-launcher/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig @@ -6,4 +6,5 @@ OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/url_launcher/ OTHER_LDFLAGS = $(inherited) -framework "Flutter" -framework "url_launcher" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/packages/url-launcher/example/ios/Runner.xcodeproj/project.pbxproj b/packages/url-launcher/example/ios/Runner.xcodeproj/project.pbxproj index 6f4df9329953..827b5cd8c357 100644 --- a/packages/url-launcher/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/url-launcher/example/ios/Runner.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* PluginRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* PluginRegistry.m */; }; + 2D92223F1EC1DA93007564B0 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D92223E1EC1DA93007564B0 /* 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, ); }; }; @@ -40,8 +40,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 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 = ""; }; + 2D92223D1EC1DA93007564B0 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GeneratedPluginRegistrant.h; path = Runner/GeneratedPluginRegistrant.h; sourceTree = ""; }; + 2D92223E1EC1DA93007564B0 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GeneratedPluginRegistrant.m; path = Runner/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 = ""; }; 492679C758E3D9A1BD31B1FB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -98,6 +98,8 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( + 2D92223D1EC1DA93007564B0 /* GeneratedPluginRegistrant.h */, + 2D92223E1EC1DA93007564B0 /* GeneratedPluginRegistrant.m */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, @@ -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 */, + 2D92223F1EC1DA93007564B0 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/packages/url-launcher/example/ios/Runner/AppDelegate.m b/packages/url-launcher/example/ios/Runner/AppDelegate.m index d28a600e9926..8448ede57375 100644 --- a/packages/url-launcher/example/ios/Runner/AppDelegate.m +++ b/packages/url-launcher/example/ios/Runner/AppDelegate.m @@ -1,15 +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]; + [GeneratedPluginRegistrant registerWithRegistry:self]; + [super application:application didFinishLaunchingWithOptions:launchOptions]; return YES; } diff --git a/packages/url-launcher/example/ios/Runner/GeneratedPluginRegistrant.h b/packages/url-launcher/example/ios/Runner/GeneratedPluginRegistrant.h new file mode 100644 index 000000000000..1a02b748de10 --- /dev/null +++ b/packages/url-launcher/example/ios/Runner/GeneratedPluginRegistrant.h @@ -0,0 +1,16 @@ +// +// Generated file. Do not edit. +// + +#ifndef GeneratedPluginRegistrant_h +#define GeneratedPluginRegistrant_h + +#import + +#import "UrlLauncherPlugin.h" + +@interface GeneratedPluginRegistrant : NSObject ++ (void)registerWithRegistry:(NSObject*)registry; +@end + +#endif /* GeneratedPluginRegistrant_h */ diff --git a/packages/url-launcher/example/ios/Runner/GeneratedPluginRegistrant.m b/packages/url-launcher/example/ios/Runner/GeneratedPluginRegistrant.m new file mode 100644 index 000000000000..6f31e9af4c9f --- /dev/null +++ b/packages/url-launcher/example/ios/Runner/GeneratedPluginRegistrant.m @@ -0,0 +1,13 @@ +// +// Generated file. Do not edit. +// + +#import "GeneratedPluginRegistrant.h" + +@implementation GeneratedPluginRegistrant + ++ (void)registerWithRegistry:(NSObject*)registry { + [UrlLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"UrlLauncherPlugin"]]; +} + +@end diff --git a/packages/url-launcher/example/ios/Runner/PluginRegistry.h b/packages/url-launcher/example/ios/Runner/PluginRegistry.h deleted file mode 100644 index 34a617456822..000000000000 --- a/packages/url-launcher/example/ios/Runner/PluginRegistry.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Generated file. Do not edit. -// - -#ifndef PluginRegistry_h -#define PluginRegistry_h - -#import - -#import "UrlLauncherPlugin.h" - -@interface PluginRegistry : NSObject - -@property (readonly, nonatomic) UrlLauncherPlugin *url_launcher; - -- (instancetype)initWithController:(FlutterViewController *)controller; - -@end - -#endif /* PluginRegistry_h */ diff --git a/packages/url-launcher/example/ios/Runner/PluginRegistry.m b/packages/url-launcher/example/ios/Runner/PluginRegistry.m deleted file mode 100644 index 1bb042ddd608..000000000000 --- a/packages/url-launcher/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]) { - _url_launcher = [[UrlLauncherPlugin alloc] initWithController:controller]; - } - return self; -} - -@end diff --git a/packages/url-launcher/ios/Classes/UrlLauncherPlugin.h b/packages/url-launcher/ios/Classes/UrlLauncherPlugin.h index 0dc931f3cf28..b703394aba30 100644 --- a/packages/url-launcher/ios/Classes/UrlLauncherPlugin.h +++ b/packages/url-launcher/ios/Classes/UrlLauncherPlugin.h @@ -4,6 +4,5 @@ #import -@interface UrlLauncherPlugin : NSObject -- initWithController:(FlutterViewController *)controller; +@interface UrlLauncherPlugin : NSObject @end diff --git a/packages/url-launcher/ios/Classes/UrlLauncherPlugin.m b/packages/url-launcher/ios/Classes/UrlLauncherPlugin.m index 41b73f164866..31027f92ec75 100644 --- a/packages/url-launcher/ios/Classes/UrlLauncherPlugin.m +++ b/packages/url-launcher/ios/Classes/UrlLauncherPlugin.m @@ -4,15 +4,11 @@ #import "UrlLauncherPlugin.h" -@implementation UrlLauncherPlugin { -} - -- (instancetype)initWithController:(FlutterViewController*)controller { - self = [super init]; - if (self) { +@implementation UrlLauncherPlugin ++ (void)registerWithRegistrar:(NSObject *)registrar { FlutterMethodChannel* channel = [FlutterMethodChannel methodChannelWithName:@"plugins.flutter.io/url_launcher" - binaryMessenger:controller]; + binaryMessenger:registrar.messenger]; [channel setMethodCallHandler:^(FlutterMethodCall *call, FlutterResult result) { NSString* url = call.arguments; @@ -25,16 +21,14 @@ - (instancetype)initWithController:(FlutterViewController*)controller { } }]; } - return self; -} -- (BOOL)canLaunchURL:(NSString*)urlString { ++ (BOOL)canLaunchURL:(NSString*)urlString { NSURL* url = [NSURL URLWithString:urlString]; UIApplication* application = [UIApplication sharedApplication]; return [application canOpenURL:url]; } -- (void)launchURL:(NSString*)urlString result:(FlutterResult)result { ++ (void)launchURL:(NSString*)urlString result:(FlutterResult)result { NSURL* url = [NSURL URLWithString:urlString]; UIApplication* application = [UIApplication sharedApplication]; @@ -49,7 +43,7 @@ - (void)launchURL:(NSString*)urlString result:(FlutterResult)result { #endif } -- (void)sendResult:(BOOL)success result:(FlutterResult)result url:(NSURL*)url { ++ (void)sendResult:(BOOL)success result:(FlutterResult)result url:(NSURL*)url { if (success) { result(nil); } else { diff --git a/packages/url-launcher/pubspec.yaml b/packages/url-launcher/pubspec.yaml index f4de62aba06a..772b11ca698b 100644 --- a/packages/url-launcher/pubspec.yaml +++ b/packages/url-launcher/pubspec.yaml @@ -1,6 +1,6 @@ name: url_launcher -version: 0.3.6 +version: 0.4.0 description: A Flutter plugin for launching a URL author: Flutter Team homepage: https://github.com/flutter/plugins