mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() You can run iOS/macOS Flutter apps through either the Flutter CLI or Xcode. However, it's often required to first run the Flutter CLI to generate required files and settings. Some of these settings/files (like dev dependencies) are specific to the build mode. However, you can change the build mode through Xcode too. When you change the build mode through Xcode, the Flutter-generated files and setting may not be correct. This PR checks if the current build mode matches the one last used by the Flutter CLI. If it doesn't, it'll print a warning like this:  If the build action is `install`, which indicates the app is being built for distribution, this will print as an error and fail the build:  ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md |
||
---|---|---|
.. | ||
flutterapp/lib | ||
FlutterUITests | ||
Host | ||
Host.xcodeproj | ||
Host.xcworkspace | ||
Podfile | ||
PodfileMissingPostInstall | ||
README.md |
iOS host app
Used by the module_test_ios.dart
device lab test.
iOS host app for a Flutter module created using
$ flutter create -t module hello
and placed in a sibling folder to (a clone of) the host app.
flutterapp/lib/marquee.dart
and flutterapp/lib/main.dart
must be copied into the new module lib
for platform unit tests
to pass.
This application demonstrates some basic functionality for Add2App, along with a native iOS ViewController as a baseline and to demonstrate interaction.
- A regular iOS view controller (UIViewController), similar to the default
flutter create
template (NativeViewController.m). - A FlutterViewController subclass that takes over the full screen. Demos showing this both from a cold/fresh engine state and a warm engine state (FullScreenViewController.m).
- A demo of pushing a FlutterViewController on as a child view.
- A demo of showing both the native and the Flutter views using a platform channel to interact with each other (HybridViewController.m).
- A demo of showing two FlutterViewControllers simultaneously (DualViewController.m).
A few key things are tested here (FlutterUITests.m):
- The ability to pre-warm the engine and attach/detach a ViewController from it.
- The ability to use platform channels to communicate between views.
- The ability to simultaneously run two instances of the engine.