Fastlane instructives for tool publishing the Gallery (#14347)

* first round fastlane working on Android

* clean up and start ios

* Partial iOS

* Got a fastfile that works on iOS

* Finalize Android push instructions

* Finalize instructions for iOS

* Extra cleanup and optipng

* Disable readme autogen and add a default readme
diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart
index 721b7c5..dcf3a83 100644
--- a/dev/devicelab/lib/tasks/perf_tests.dart
+++ b/dev/devicelab/lib/tasks/perf_tests.dart
@@ -57,7 +57,7 @@
 TaskFunction createGalleryNavigationMemoryTest() {
   return new MemoryTest(
     '${flutterDirectory.path}/examples/flutter_gallery',
-    'io.flutter.examples.gallery',
+    'io.flutter.demo.gallery',
     testTarget: 'test_driver/memory_nav.dart',
   ).run;
 }
@@ -65,8 +65,8 @@
 TaskFunction createGalleryBackButtonMemoryTest() {
   return new AndroidBackButtonMemoryTest(
     '${flutterDirectory.path}/examples/flutter_gallery',
-    'io.flutter.examples.gallery',
-    'io.flutter.examples.gallery.MainActivity',
+    'io.flutter.demo.gallery',
+    'io.flutter.demo.gallery.MainActivity',
   ).run;
 }
 
diff --git a/examples/flutter_gallery/android/Gemfile b/examples/flutter_gallery/android/Gemfile
new file mode 100644
index 0000000..7a118b4
--- /dev/null
+++ b/examples/flutter_gallery/android/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "fastlane"
diff --git a/examples/flutter_gallery/android/Gemfile.lock b/examples/flutter_gallery/android/Gemfile.lock
new file mode 100644
index 0000000..8188b61
--- /dev/null
+++ b/examples/flutter_gallery/android/Gemfile.lock
@@ -0,0 +1,143 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    CFPropertyList (2.3.6)
+    addressable (2.5.2)
+      public_suffix (>= 2.0.2, < 4.0)
+    babosa (1.0.2)
+    claide (1.0.2)
+    colored (1.2)
+    colored2 (3.1.2)
+    commander-fastlane (4.4.5)
+      highline (~> 1.7.2)
+    declarative (0.0.10)
+    declarative-option (0.1.0)
+    domain_name (0.5.20170404)
+      unf (>= 0.0.5, < 1.0.0)
+    dotenv (2.2.1)
+    excon (0.60.0)
+    faraday (0.14.0)
+      multipart-post (>= 1.2, < 3)
+    faraday-cookie_jar (0.0.6)
+      faraday (>= 0.7.4)
+      http-cookie (~> 1.0.0)
+    faraday_middleware (0.12.2)
+      faraday (>= 0.7.4, < 1.0)
+    fastimage (2.1.1)
+    fastlane (2.79.0)
+      CFPropertyList (>= 2.3, < 3.0.0)
+      addressable (>= 2.3, < 3.0.0)
+      babosa (>= 1.0.2, < 2.0.0)
+      bundler (>= 1.12.0, < 2.0.0)
+      colored
+      commander-fastlane (>= 4.4.5, < 5.0.0)
+      dotenv (>= 2.1.1, < 3.0.0)
+      excon (>= 0.45.0, < 1.0.0)
+      faraday (~> 0.9)
+      faraday-cookie_jar (~> 0.0.6)
+      faraday_middleware (~> 0.9)
+      fastimage (>= 2.1.0, < 3.0.0)
+      gh_inspector (>= 1.0.1, < 2.0.0)
+      google-api-client (>= 0.13.1, < 0.14.0)
+      highline (>= 1.7.2, < 2.0.0)
+      json (< 3.0.0)
+      mini_magick (~> 4.5.1)
+      multi_json
+      multi_xml (~> 0.5)
+      multipart-post (~> 2.0.0)
+      plist (>= 3.1.0, < 4.0.0)
+      public_suffix (~> 2.0.0)
+      rubyzip (>= 1.1.0, < 2.0.0)
+      security (= 0.1.3)
+      slack-notifier (>= 2.0.0, < 3.0.0)
+      terminal-notifier (>= 1.6.2, < 2.0.0)
+      terminal-table (>= 1.4.5, < 2.0.0)
+      tty-screen (>= 0.6.3, < 1.0.0)
+      tty-spinner (>= 0.8.0, < 1.0.0)
+      word_wrap (~> 1.0.0)
+      xcodeproj (>= 1.5.2, < 2.0.0)
+      xcpretty (>= 0.2.4, < 1.0.0)
+      xcpretty-travis-formatter (>= 0.0.3)
+    gh_inspector (1.0.3)
+    google-api-client (0.13.6)
+      addressable (~> 2.5, >= 2.5.1)
+      googleauth (~> 0.5)
+      httpclient (>= 2.8.1, < 3.0)
+      mime-types (~> 3.0)
+      representable (~> 3.0)
+      retriable (>= 2.0, < 4.0)
+    googleauth (0.6.2)
+      faraday (~> 0.12)
+      jwt (>= 1.4, < 3.0)
+      logging (~> 2.0)
+      memoist (~> 0.12)
+      multi_json (~> 1.11)
+      os (~> 0.9)
+      signet (~> 0.7)
+    highline (1.7.10)
+    http-cookie (1.0.3)
+      domain_name (~> 0.5)
+    httpclient (2.8.3)
+    json (2.1.0)
+    jwt (2.1.0)
+    little-plugger (1.1.4)
+    logging (2.2.2)
+      little-plugger (~> 1.1)
+      multi_json (~> 1.10)
+    memoist (0.16.0)
+    mime-types (3.1)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2016.0521)
+    mini_magick (4.5.1)
+    multi_json (1.13.1)
+    multi_xml (0.6.0)
+    multipart-post (2.0.0)
+    nanaimo (0.2.3)
+    os (0.9.6)
+    plist (3.4.0)
+    public_suffix (2.0.5)
+    representable (3.0.4)
+      declarative (< 0.1.0)
+      declarative-option (< 0.2.0)
+      uber (< 0.2.0)
+    retriable (3.1.1)
+    rouge (2.0.7)
+    rubyzip (1.2.1)
+    security (0.1.3)
+    signet (0.8.1)
+      addressable (~> 2.3)
+      faraday (~> 0.9)
+      jwt (>= 1.5, < 3.0)
+      multi_json (~> 1.10)
+    slack-notifier (2.3.2)
+    terminal-notifier (1.8.0)
+    terminal-table (1.8.0)
+      unicode-display_width (~> 1.1, >= 1.1.1)
+    tty-cursor (0.5.0)
+    tty-screen (0.6.4)
+    tty-spinner (0.8.0)
+      tty-cursor (>= 0.5.0)
+    uber (0.1.0)
+    unf (0.1.4)
+      unf_ext
+    unf_ext (0.0.7.4)
+    unicode-display_width (1.3.0)
+    word_wrap (1.0.0)
+    xcodeproj (1.5.4)
+      CFPropertyList (~> 2.3.3)
+      claide (>= 1.0.2, < 2.0)
+      colored2 (~> 3.1)
+      nanaimo (~> 0.2.3)
+    xcpretty (0.2.8)
+      rouge (~> 2.0.7)
+    xcpretty-travis-formatter (1.0.0)
+      xcpretty (~> 0.2, >= 0.0.7)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  fastlane
+
+BUNDLED WITH
+   1.16.0
diff --git a/examples/flutter_gallery/android/app/build.gradle b/examples/flutter_gallery/android/app/build.gradle
index 7c726cf..66aa041 100644
--- a/examples/flutter_gallery/android/app/build.gradle
+++ b/examples/flutter_gallery/android/app/build.gradle
@@ -22,7 +22,7 @@
     }
 
     defaultConfig {
-        applicationId "io.flutter.examples.gallery"
+        applicationId "io.flutter.demo.gallery"
         minSdkVersion 16
         targetSdkVersion 27
         versionCode 1
diff --git a/examples/flutter_gallery/android/app/src/androidTest/java/io/flutter/examples/gallery/FlutterGalleryInstrumentationTest.java b/examples/flutter_gallery/android/app/src/androidTest/java/io/flutter/demo/gallery/FlutterGalleryInstrumentationTest.java
similarity index 96%
rename from examples/flutter_gallery/android/app/src/androidTest/java/io/flutter/examples/gallery/FlutterGalleryInstrumentationTest.java
rename to examples/flutter_gallery/android/app/src/androidTest/java/io/flutter/demo/gallery/FlutterGalleryInstrumentationTest.java
index a2d19b5..a2459c2 100644
--- a/examples/flutter_gallery/android/app/src/androidTest/java/io/flutter/examples/gallery/FlutterGalleryInstrumentationTest.java
+++ b/examples/flutter_gallery/android/app/src/androidTest/java/io/flutter/demo/gallery/FlutterGalleryInstrumentationTest.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package io.flutter.examples.gallery;
+package io.flutter.demo.gallery;
 
 import android.support.test.filters.LargeTest;
 import android.support.test.rule.ActivityTestRule;
diff --git a/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml b/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml
index 37ef2f2..a1fad9e 100644
--- a/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml
+++ b/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml
@@ -4,7 +4,7 @@
      found in the LICENSE file.
  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.gallery">
+    package="io.flutter.demo.gallery">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/FlutterGalleryInstrumentation.java b/examples/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/FlutterGalleryInstrumentation.java
similarity index 90%
rename from examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/FlutterGalleryInstrumentation.java
rename to examples/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/FlutterGalleryInstrumentation.java
index 57c7035..ecd4cbf 100644
--- a/examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/FlutterGalleryInstrumentation.java
+++ b/examples/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/FlutterGalleryInstrumentation.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package io.flutter.examples.gallery;
+package io.flutter.demo.gallery;
 
 import android.os.ConditionVariable;
 import io.flutter.plugin.common.MethodCall;
@@ -18,7 +18,7 @@
   private volatile boolean testSuccessful;
 
   FlutterGalleryInstrumentation(FlutterView view) {
-    new MethodChannel(view, "io.flutter.examples.gallery/TestLifecycleListener")
+    new MethodChannel(view, "io.flutter.demo.gallery/TestLifecycleListener")
         .setMethodCallHandler(this);
   }
 
diff --git a/examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/MainActivity.java b/examples/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/MainActivity.java
similarity index 95%
rename from examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/MainActivity.java
rename to examples/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/MainActivity.java
index 4e980b2..1fa83a4 100644
--- a/examples/flutter_gallery/android/app/src/main/java/io/flutter/examples/gallery/MainActivity.java
+++ b/examples/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/MainActivity.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package io.flutter.examples.gallery;
+package io.flutter.demo.gallery;
 
 import android.os.Bundle;
 
diff --git a/examples/flutter_gallery/android/fastlane/Appfile b/examples/flutter_gallery/android/fastlane/Appfile
new file mode 100644
index 0000000..08f5523
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/Appfile
@@ -0,0 +1 @@
+package_name "io.flutter.demo.gallery"
diff --git a/examples/flutter_gallery/android/fastlane/Fastfile b/examples/flutter_gallery/android/fastlane/Fastfile
new file mode 100644
index 0000000..eb4ced6
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/Fastfile
@@ -0,0 +1,19 @@
+# Prevent Fastlane from overwriting README.md
+skip_docs
+
+default_platform(:android)
+
+# This should be run after running
+# flutter build apk --release
+# to build the app using the Flutter toolchain.
+platform :android do
+  desc 'Push the built release APK to alpha'
+  lane :deploy_play_store_alpha do
+    upload_to_play_store(
+      track: 'alpha',
+      apk: '../build/app/outputs/apk/release/app-release.apk',
+      json_key_data: ENV['GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE'],
+      skip_upload_screenshots: true
+    )
+  end
+end
diff --git a/examples/flutter_gallery/android/fastlane/README.md b/examples/flutter_gallery/android/fastlane/README.md
new file mode 100644
index 0000000..2c91f15
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/README.md
@@ -0,0 +1,10 @@
+fastlane documentation
+================
+This folder contains hermetic scripts to deploy a built APK to the play store.
+
+This is done using the [fastlane](https://fastlane.tools) tool suite.
+
+Deployment can be done manually by Googlers by following
+go/flutter-gallery-publish (internal doc).
+
+Deployment is automatically done by Travis on branch cuts.
diff --git a/examples/flutter_gallery/android/fastlane/metadata/android/en-US/full_description.txt b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/full_description.txt
new file mode 100644
index 0000000..3d36bb0
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/full_description.txt
@@ -0,0 +1,9 @@
+(Flutter is alpha technology)
+
+A gallery of widgets and behaviors, plus demos and vignettes, all built with Flutter. This is a demo of some of the features of Flutter, and some features like accessibility are not yet wired in.
+
+Flutter is a new project to help developers build high-performance, high-fidelity, mobile apps for iOS and Android from a single codebase.
+
+This app is open source. Check out the code to see how this app is built: https://github.com/flutter/flutter/tree/master/examples/flutter_gallery
+
+Visit https://flutter.io to learn more.
\ No newline at end of file
diff --git a/examples/flutter_gallery/android/fastlane/metadata/android/en-US/images/icon.png b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/images/icon.png
new file mode 100644
index 0000000..a3c444c
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/images/icon.png
Binary files differ
diff --git a/examples/flutter_gallery/android/fastlane/metadata/android/en-US/short_description.txt b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/short_description.txt
new file mode 100644
index 0000000..04c96fa
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/short_description.txt
@@ -0,0 +1 @@
+A gallery showcasing apps and widgets build using the Flutter framework
\ No newline at end of file
diff --git a/examples/flutter_gallery/android/fastlane/metadata/android/en-US/title.txt b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/title.txt
new file mode 100644
index 0000000..9f39b01
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/title.txt
@@ -0,0 +1 @@
+Flutter Gallery
\ No newline at end of file
diff --git a/examples/flutter_gallery/android/fastlane/metadata/android/en-US/video.txt b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/video.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/flutter_gallery/android/fastlane/metadata/android/en-US/video.txt
diff --git a/examples/flutter_gallery/ios/Gemfile b/examples/flutter_gallery/ios/Gemfile
new file mode 100644
index 0000000..7a118b4
--- /dev/null
+++ b/examples/flutter_gallery/ios/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "fastlane"
diff --git a/examples/flutter_gallery/ios/Gemfile.lock b/examples/flutter_gallery/ios/Gemfile.lock
new file mode 100644
index 0000000..8188b61
--- /dev/null
+++ b/examples/flutter_gallery/ios/Gemfile.lock
@@ -0,0 +1,143 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    CFPropertyList (2.3.6)
+    addressable (2.5.2)
+      public_suffix (>= 2.0.2, < 4.0)
+    babosa (1.0.2)
+    claide (1.0.2)
+    colored (1.2)
+    colored2 (3.1.2)
+    commander-fastlane (4.4.5)
+      highline (~> 1.7.2)
+    declarative (0.0.10)
+    declarative-option (0.1.0)
+    domain_name (0.5.20170404)
+      unf (>= 0.0.5, < 1.0.0)
+    dotenv (2.2.1)
+    excon (0.60.0)
+    faraday (0.14.0)
+      multipart-post (>= 1.2, < 3)
+    faraday-cookie_jar (0.0.6)
+      faraday (>= 0.7.4)
+      http-cookie (~> 1.0.0)
+    faraday_middleware (0.12.2)
+      faraday (>= 0.7.4, < 1.0)
+    fastimage (2.1.1)
+    fastlane (2.79.0)
+      CFPropertyList (>= 2.3, < 3.0.0)
+      addressable (>= 2.3, < 3.0.0)
+      babosa (>= 1.0.2, < 2.0.0)
+      bundler (>= 1.12.0, < 2.0.0)
+      colored
+      commander-fastlane (>= 4.4.5, < 5.0.0)
+      dotenv (>= 2.1.1, < 3.0.0)
+      excon (>= 0.45.0, < 1.0.0)
+      faraday (~> 0.9)
+      faraday-cookie_jar (~> 0.0.6)
+      faraday_middleware (~> 0.9)
+      fastimage (>= 2.1.0, < 3.0.0)
+      gh_inspector (>= 1.0.1, < 2.0.0)
+      google-api-client (>= 0.13.1, < 0.14.0)
+      highline (>= 1.7.2, < 2.0.0)
+      json (< 3.0.0)
+      mini_magick (~> 4.5.1)
+      multi_json
+      multi_xml (~> 0.5)
+      multipart-post (~> 2.0.0)
+      plist (>= 3.1.0, < 4.0.0)
+      public_suffix (~> 2.0.0)
+      rubyzip (>= 1.1.0, < 2.0.0)
+      security (= 0.1.3)
+      slack-notifier (>= 2.0.0, < 3.0.0)
+      terminal-notifier (>= 1.6.2, < 2.0.0)
+      terminal-table (>= 1.4.5, < 2.0.0)
+      tty-screen (>= 0.6.3, < 1.0.0)
+      tty-spinner (>= 0.8.0, < 1.0.0)
+      word_wrap (~> 1.0.0)
+      xcodeproj (>= 1.5.2, < 2.0.0)
+      xcpretty (>= 0.2.4, < 1.0.0)
+      xcpretty-travis-formatter (>= 0.0.3)
+    gh_inspector (1.0.3)
+    google-api-client (0.13.6)
+      addressable (~> 2.5, >= 2.5.1)
+      googleauth (~> 0.5)
+      httpclient (>= 2.8.1, < 3.0)
+      mime-types (~> 3.0)
+      representable (~> 3.0)
+      retriable (>= 2.0, < 4.0)
+    googleauth (0.6.2)
+      faraday (~> 0.12)
+      jwt (>= 1.4, < 3.0)
+      logging (~> 2.0)
+      memoist (~> 0.12)
+      multi_json (~> 1.11)
+      os (~> 0.9)
+      signet (~> 0.7)
+    highline (1.7.10)
+    http-cookie (1.0.3)
+      domain_name (~> 0.5)
+    httpclient (2.8.3)
+    json (2.1.0)
+    jwt (2.1.0)
+    little-plugger (1.1.4)
+    logging (2.2.2)
+      little-plugger (~> 1.1)
+      multi_json (~> 1.10)
+    memoist (0.16.0)
+    mime-types (3.1)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2016.0521)
+    mini_magick (4.5.1)
+    multi_json (1.13.1)
+    multi_xml (0.6.0)
+    multipart-post (2.0.0)
+    nanaimo (0.2.3)
+    os (0.9.6)
+    plist (3.4.0)
+    public_suffix (2.0.5)
+    representable (3.0.4)
+      declarative (< 0.1.0)
+      declarative-option (< 0.2.0)
+      uber (< 0.2.0)
+    retriable (3.1.1)
+    rouge (2.0.7)
+    rubyzip (1.2.1)
+    security (0.1.3)
+    signet (0.8.1)
+      addressable (~> 2.3)
+      faraday (~> 0.9)
+      jwt (>= 1.5, < 3.0)
+      multi_json (~> 1.10)
+    slack-notifier (2.3.2)
+    terminal-notifier (1.8.0)
+    terminal-table (1.8.0)
+      unicode-display_width (~> 1.1, >= 1.1.1)
+    tty-cursor (0.5.0)
+    tty-screen (0.6.4)
+    tty-spinner (0.8.0)
+      tty-cursor (>= 0.5.0)
+    uber (0.1.0)
+    unf (0.1.4)
+      unf_ext
+    unf_ext (0.0.7.4)
+    unicode-display_width (1.3.0)
+    word_wrap (1.0.0)
+    xcodeproj (1.5.4)
+      CFPropertyList (~> 2.3.3)
+      claide (>= 1.0.2, < 2.0)
+      colored2 (~> 3.1)
+      nanaimo (~> 0.2.3)
+    xcpretty (0.2.8)
+      rouge (~> 2.0.7)
+    xcpretty-travis-formatter (1.0.0)
+      xcpretty (~> 0.2, >= 0.0.7)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  fastlane
+
+BUNDLED WITH
+   1.16.0
diff --git a/examples/flutter_gallery/ios/Podfile b/examples/flutter_gallery/ios/Podfile
index cfee435..0bdc701 100644
--- a/examples/flutter_gallery/ios/Podfile
+++ b/examples/flutter_gallery/ios/Podfile
@@ -48,6 +48,7 @@
 post_install do |installer|
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
+      config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = ''
       config.build_settings['ENABLE_BITCODE'] = 'NO'
     end
   end
diff --git a/examples/flutter_gallery/ios/Runner.xcodeproj/project.pbxproj b/examples/flutter_gallery/ios/Runner.xcodeproj/project.pbxproj
index cb1bc3d..ae0a1d4 100644
--- a/examples/flutter_gallery/ios/Runner.xcodeproj/project.pbxproj
+++ b/examples/flutter_gallery/ios/Runner.xcodeproj/project.pbxproj
@@ -455,7 +455,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flutterGallery;
+				PRODUCT_BUNDLE_IDENTIFIER = io.flutter.demo.gallery;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Debug;
@@ -477,7 +477,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flutterGallery;
+				PRODUCT_BUNDLE_IDENTIFIER = io.flutter.demo.gallery;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Release;
diff --git a/examples/flutter_gallery/ios/fastlane/Appfile b/examples/flutter_gallery/ios/fastlane/Appfile
new file mode 100644
index 0000000..849b7e1
--- /dev/null
+++ b/examples/flutter_gallery/ios/fastlane/Appfile
@@ -0,0 +1,8 @@
+app_identifier "io.flutter.demo.gallery" # The bundle identifier of your app
+apple_id "stores@flutter.io" # Your Apple email address
+
+itc_team_id "118089806" # iTunes Connect Team ID
+team_id "S8QB4VV633" # Developer Portal Team ID
+
+# For more information about the Appfile, see:
+#     https://docs.fastlane.tools/advanced/#appfile
diff --git a/examples/flutter_gallery/ios/fastlane/Fastfile b/examples/flutter_gallery/ios/fastlane/Fastfile
new file mode 100644
index 0000000..258866f
--- /dev/null
+++ b/examples/flutter_gallery/ios/fastlane/Fastfile
@@ -0,0 +1,47 @@
+# Prevent Fastlane from overwriting README.md
+skip_docs
+
+default_platform(:ios)
+
+# This should be run after running
+# flutter build ios --release --no-codesign
+# to build the app using the Flutter toolchain. This lane is meant to only
+# rebuild the app by:
+# 1- Signing using the publishing credentials; and
+# 2- xcodebuild with archive option
+platform :ios do
+  desc "Push a new release to TestFlight"
+  lane :build_and_deploy_testflight do
+    # Doesn't do anything when not on Travis.
+    setup_travis
+
+    # Retrieves all the necessary certs and provisioning profiles.
+    sync_code_signing(
+      git_url: ENV["PUBLISHING_MATCH_CERTIFICATE_REPO"],
+      type: "appstore",
+      readonly: true
+    )
+
+    # Modify the Xcode project to use the new team and profile.
+    # It will put the git state to dirty but Travis will be wiped after
+    # then run session.
+    disable_automatic_code_signing
+    update_project_provisioning(
+      xcodeproj: "Runner.xcodeproj",
+      target_filter: "Runner",
+      build_configuration: "Release",
+      profile: ENV["sigh_io.flutter.demo.gallery_appstore_profile-path"],
+    )
+
+    # Build and archive the app again.
+    build_ios_app(
+      workspace: "Runner.xcworkspace",
+      scheme: "Runner",
+      export_method: "app-store",
+      # Verify that the right signing identity is used for publishing.
+      codesigning_identity: "iPhone Distribution: Store Ladd (S8QB4VV633)",
+    )
+
+    upload_to_testflight
+  end
+end
diff --git a/examples/flutter_gallery/ios/fastlane/README.md b/examples/flutter_gallery/ios/fastlane/README.md
new file mode 100644
index 0000000..b923a9b
--- /dev/null
+++ b/examples/flutter_gallery/ios/fastlane/README.md
@@ -0,0 +1,11 @@
+fastlane documentation
+================
+This folder contains hermetic scripts to re-build the app using a distribution
+profile and then deploy to TestFlight.
+
+This is done using the [fastlane](https://fastlane.tools) tool suite.
+
+Deployment can be done manually by Googlers by following
+go/flutter-gallery-publish (internal doc).
+
+Deployment is automatically done by Travis on branch cuts.
\ No newline at end of file
diff --git a/examples/flutter_gallery/test/live_smoketest.dart b/examples/flutter_gallery/test/live_smoketest.dart
index 39536cc..dda898e 100644
--- a/examples/flutter_gallery/test/live_smoketest.dart
+++ b/examples/flutter_gallery/test/live_smoketest.dart
@@ -13,7 +13,7 @@
 import 'package:flutter_gallery/gallery/app.dart';
 
 /// Reports success or failure to the native code.
-const MethodChannel _kTestChannel = const MethodChannel('io.flutter.examples.gallery/TestLifecycleListener');
+const MethodChannel _kTestChannel = const MethodChannel('io.flutter.demo.gallery/TestLifecycleListener');
 
 Future<Null> main() async {
   try {