flutter/examples/flutter_gallery
Chris Bracken 0ee3f57a10 Build Flutter app as a framework on iOS (#8971)
**THIS IS A BREAKING CHANGE.** See below for migration steps for
existing projects.

Previously, Flutter app code was built as a raw dylib on iOS.  Dynamic
libraries outside of a framework bundle are not supported on iOS, except
for the system Swift libraries provided by Xcode.

See:
https://developer.apple.com/library/content/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-TROUBLESHOOTING_BUNDLE_ERRORS-EMBEDDED__DYLIB_FILES

* Migrates Xcode build from app.dylib to App.framework
* Migrates flutter create template
* Migrates example projects

Migration steps for existing projects
=====================================

The following steps should be taken from the root of your Flutter
project:

1. Edit `ios/.gitignore`: add `/Flutter/App.framework` on a new line.
2. In the Xcode project navigator, remove `app.dylib` from the Flutter
   folder. Delete this file from the `ios/Flutter` directory in your project.
3. Run a build to generate `ios/Flutter/App.framework`. From the command
   line, run `flutter build ios`. If you have not configured app signing
   in Xcode, an alternative method is to open the simulator, then run
   `flutter run -d iP`.
4. In the Xcode project navigator, select the `Runner` project. In the
   project settings that are displayed in the main view, ensure that the
   `Runner` target is selected. You can verify this by exposing the
   sidebar using the [| ] icon in the upper-left corner of the main
   view.
5. Select the *General* tab in the project settings. Under the
   *Embedded Binaries* section, click '+' to add `App.framework`. In the
   sheet that drops down, click the *Add Other...* button. Navigate to
   the `ios/Flutter` directory and select `App.framework`. Click *Open*.
   In the sheet that drops down, select *Create folder references*, then
   click *Finish*.
6. In the project settings, verify that `App.framework` has been added to the
   *Embedded Binaries* and *Linked Frameworks and Libraries* lists.
7. In the Xcode project navigator, drag `App.framework` under the
   Flutter folder.
8. In the Xcode project navigator, select `Flutter` then from the
   *File* menu, select *Add Files to "Runner"...*. Navigate to the
   `ios/Flutter` directory, select `AppFrameworkInfo.plist` and click
   the *Add* button.
9. From the command line, in your project directory, run
   `flutter build clean`, then `flutter run`.

At this point your project should be fully migrated.
2017-03-22 17:41:49 -07:00
..
.idea Revert back IntelliJ .iml file to project root (#8139) 2017-02-14 18:15:26 +01:00
android Upgrade build tools to latest Android Studio default (#8461) 2017-02-28 18:25:28 +01:00
ios Build Flutter app as a framework on iOS (#8971) 2017-03-22 17:41:49 -07:00
lib use color.shadeXxx instead of color[Xxx] (#8932) 2017-03-21 23:14:55 +01:00
test Test API improvements: pumpAndSettle, autogenerate pointer IDs (#8751) 2017-03-13 16:27:15 -07:00
test_driver apply upcoming rule use_collection_literals_when_possible (#8649) 2017-03-08 14:57:31 -08:00
.gitignore Call it Flutter Gallery (#3801) 2016-05-09 11:00:54 -07:00
BUILD.gn Add a Fuchsia target for the Flutter gallery. (#7619) 2017-01-24 14:03:06 -08:00
flutter_gallery.iml Revert back IntelliJ .iml file to project root (#8139) 2017-02-14 18:15:26 +01:00
pubspec.yaml Merge pubspec.yaml and flutter.yaml. (#7605) 2017-01-24 11:19:31 -08:00
README.md Restore Flutter gallery license page scrolling (#5934) 2016-09-20 15:13:50 -07:00

Flutter gallery

Demo app for the material design widgets and other features provided by Flutter.

Building

You can follow these instructions to build the gallery app and install it onto your device.

Prereqs

If you are new to Flutter, please first follow the Flutter Setup guide.

Building and installing the Flutter app

  • cd $FLUTTER_ROOT/examples/flutter_gallery
  • flutter upgrade
  • flutter run --release

The flutter run --release command both builds and installs the Flutter app.

Prerelease checklist

  • Verify that the About box's license page scrolls and reveals its long long stream of license texts.

Icon

Android launcher icons were generated using Android Asset Studio: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=1&foreground.space.pad=0.1&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=fafafa%2C100&effects=none