This shell used to serve the dual purpose of running Flutter tests as
well as optionally being able to run Flutter applications on a Mac
desktop. After all the test runner targets were consolidated
(flutter_tester), this target was no longer used to run the tests. This
target is currently only used by engine developers to test changes
quickly on the host. Even for this purpose, the Desktop embedders are
more full featured and use the stable embedder API. The presence of a
cross-platform tester target, alternatives for Desktop targets that use
the stable embedder API and the fact that this target is no longer
tested, makes having this code in the source entirely redundant.
* Make FlutterStandardCodec handle writing NSData
iOS developers can accidentally pass an `NSData` object directly to
`FlutterStandardCodec` and forget to wrap it in
`FlutterStandardTypedData`. This failure won't be caught until
runtime.
Let's make `FlutterStandardCodec` more tolerant by making it assume
that `NSData` should be treated as a binary blob and by wrapping it
automatically.
Fixes https://github.com/flutter/flutter/issues/17449
Testing Done:
* Made a sample Flutter iOS application that created a
`FlutterMethodChannel` and invoked a method using an `NSData*`
argument. Verified that the Flutter method handler received the
message and that the `MethodCall.arguments` was a `UInt8Array` that
preserved the original byte order.
* Verified that without this change, the same sample application
crashed when run in debug mode.
* Add a unit test for encoding raw NSData
* Formatting adjustments
Decouple PlatformViewsController from FlutterView.
Instead of getting a FlutterView instance, depend on the specific interfaces required by
PlatformViewsController (BinaryMessenger, TextureRegistry, and Context).
This allows using PlatformViewsControlling in the flutter/embedding
code.
* Revert "Add logging if FlutterDartProject fails to load the application kernel snapshot (#6257)"
This reverts commit d29c7db769d1a0d45f579b76ee3a43f38dc7318d.
* Revert "Update deprecated subtags from language subtag registry. (#6280)"
This reverts commit 2a1debfccfe2cc00e596607ac7cb1d29d2af8834.
* Revert "Add Xib splashscreen support (#6289)"
This reverts commit 540cd96262ed87bb6cd26ac18ad5468e70c3af63.
* Revert "Fix a compilation problem when using iPhoneOS12.0sdk(Xcode10) && clang version 7.0.0. (#6279)"
This reverts commit 05f21e63a115db2db161c8265be8e8349f3d7df0.
To make "Engine run configuration was invalid." failures (e.g.
https://github.com/flutter/flutter/issues/20777) a bit easier to
diagnose, add some more logging to `FlutterDartProject` to verify
that snapshot assets were properly bundled.
On the iPhone X, raising the keyboard sets a bottom physical inset equal
to the keyboard height, however we previously did not zero out the bottom
physical padding. This was incorrect; when a soft keyboard is present,
it 'consumes' the safe area inset for the home indicator widget,
eliminating the need for the app to handle this at all.
- Switch core snapshot to Dart 2 and remove support for loading platform.dill.
- Remove support for loading script snapshots.
- Remove support for loading source.
- Remove settings and fix names to reflect the above.
- Remove support for loading the service isolate from source.
Otherwise the callbacks may be called after FlutterNativeView is destroyed and is null.
Also defensively check for whether the texture is already released in the callback because the callback may be called from another thread by a stale reference (see the comment).
This closes https://github.com/flutter/flutter/issues/20951.
The following were previously marked as deprecated over a month ago:
* `FlutterStandardBigInteger`
* `-[FlutterDartProject initFromDefaultSourceForConfiguration]`
Remove their implementations and mark them as unavailable.
Add a `-[FlutterViewController splashScreenView]` property
Add a `-[FlutterViewController splashScreenView]` property that
clients can use to customize the launch view (issue #17140).
The default WindowManager implementation in Android's Presentation is
delegating addView/removeView/updateViewLayout calls to the global
WindowManager.
This can result in a crash when an embedded view is trying to e.g show a
PopupWindow.
This change adds a custom WindowManager that overrides
addView (and removeView/updateViewLayout) and adds the view to the
presentation's view tree.
Note that views might keep a reference to the window manager which
might be an issue when we move a view from one virtual display to
another (due to a resize). For this reason when re-sizing we are not
creating a new window manager for the new presentation, but updating the
window manager's references to be relevant for the new presentation and
re-use it.
If `FlutterDartProject` found an `FLTLibraryPath` entry in an iOS
application's `Info.plist`, it assumed that values that were valid
filesystem paths were paths to bundles. If the attempt to retrieve
the `NSBundle` fails, `FlutterDartProject` ignored the failure and
then would assign `nil` to a C++ `std::string`, resulting in a null
pointer dereference.
Add some failure checks to prevent this.