diff --git a/examples/flutter_gallery/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java b/examples/flutter_gallery/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java
index 92f7a749c4..846c01bc50 100644
--- a/examples/flutter_gallery/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java
+++ b/examples/flutter_gallery/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java
@@ -2,13 +2,16 @@ 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/examples/flutter_gallery/flutter_gallery.iml b/examples/flutter_gallery/flutter_gallery.iml
index 9d5dae1954..7bf659c2e2 100644
--- a/examples/flutter_gallery/flutter_gallery.iml
+++ b/examples/flutter_gallery/flutter_gallery.iml
@@ -7,6 +7,8 @@
+
+
diff --git a/examples/flutter_gallery/ios/Podfile b/examples/flutter_gallery/ios/Podfile
new file mode 100644
index 0000000000..74b3de0649
--- /dev/null
+++ b/examples/flutter_gallery/ios/Podfile
@@ -0,0 +1,38 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
+ abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
+end
+
+target 'Runner' do
+ use_frameworks!
+
+ # Pods for Runner
+
+ # Flutter Pods
+ pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
+
+ if File.exists? '../.flutter-plugins'
+ flutter_root = File.expand_path('..')
+ File.foreach('../.flutter-plugins') { |line|
+ plugin = line.split(pattern='=')
+ if plugin.length == 2
+ name = plugin[0].strip()
+ path = plugin[1].strip()
+ resolved_path = File.expand_path("#{path}/ios", flutter_root)
+ pod name, :path => resolved_path
+ else
+ puts "Invalid plugin specification: #{line}"
+ end
+ }
+ end
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings['ENABLE_BITCODE'] = 'NO'
+ end
+ end
+end
diff --git a/examples/flutter_gallery/ios/Runner/PluginRegistry.h b/examples/flutter_gallery/ios/Runner/PluginRegistry.h
index df039db515..34a6174568 100644
--- a/examples/flutter_gallery/ios/Runner/PluginRegistry.h
+++ b/examples/flutter_gallery/ios/Runner/PluginRegistry.h
@@ -7,9 +7,11 @@
#import
+#import "UrlLauncherPlugin.h"
@interface PluginRegistry : NSObject
+@property (readonly, nonatomic) UrlLauncherPlugin *url_launcher;
- (instancetype)initWithController:(FlutterViewController *)controller;
diff --git a/examples/flutter_gallery/ios/Runner/PluginRegistry.m b/examples/flutter_gallery/ios/Runner/PluginRegistry.m
index 0a34729946..1bb042ddd6 100644
--- a/examples/flutter_gallery/ios/Runner/PluginRegistry.m
+++ b/examples/flutter_gallery/ios/Runner/PluginRegistry.m
@@ -8,6 +8,7 @@
- (instancetype)initWithController:(FlutterViewController *)controller {
if (self = [super init]) {
+ _url_launcher = [[UrlLauncherPlugin alloc] initWithController:controller];
}
return self;
}