Issue 1:
Currently, developing a flutter project that includes swift can be a bit of a pain when including various plugins - in particular Firebase messaging is the one I've had trouble with.

This is more or less the structure of (the iOS part) of my app:

App
↳ swift source
↳ firebase messaging
↳ objc source
↳ various static libraries included in sub-pods etc
↳ Qr code plugin
↳ objc source (originally swift but had issues with that)
↳ Google MobileVision (objc source)
↳ various static libraries included as sub-pods etc
↳ Swift plugin(s) (source, no libraries)
↳ Objc plugin(s) (source, no libraries)

Because of my usage of swift, use_frameworks! is set in my Podfile.

What's happening when I build currently is that the various libraries are each being build as dynamic frameworks i.e. Firebase, qr code pluign, swift plugin(s), objc plugin(s). Then it appears that the static libraries are being linked properly when running on the device, but when I do an achive build, upload to testflight, and run on the device it fails to run. As far as I can tell, the static libraries are being linked into the main app rather than the dynamic libraries where they're required (i.e. firebase), although I may be misdiagnosing that as I'm not an expert by any means.

I do have an example project but the issue is that to actually reproduce the issue you have to archive it, upload to app store, and use testflight etc to run it; I sometimes saw issues with release builds after running flutter build ios --release but not always for some reason.

This is the error though, although not all that detailed as it's hard to debug an app from testflight:

Termination Description: DYLD, Symbol not found: _OBJC_CLASS_$_FIRApp | Referenced from: /private/var/containers/Bundle/Application/A9C35A12-B9A3-4F0C-A508-C0554CA2843A/Runner.app/Frameworks/firebase_messaging.framework/firebase_messaging | Expected in: flat namespace | in /private/var/containers/Bundle/Application/A9C35A12-B9A3-4F0C-A508-C0554CA2843A/Runner.app/Frameworks/firebase_messaging.framework/firebase_messaging

What I'd like to propose is some way of forcing cocoapods to do what is needed (i.e. link the libraries into the right place). I tried various things including manually specifying the name of the dependency libraries in the podspec of the framework including them, which did link them into the dynamic framework but then resulted in duplicate definitions of classes and all sorts of other fun issues. I'm sure it's possible but that I just couldn't figure it out.

However, cocoapods does have a relatively new option introduced in 1.4.0 - static_framework. To use it, you simply specify static_framework = true in the podspec of the framework which includes a static library, and the framework will compile statically including the dependent libraries (it should also theoretically remove the requirement for the `s.pod_target_xcconfig = { 'FRAMEWORK_SEARCH_PATHS .... OTHER_LDFLAGS ...' currently in firebase_messaging.podspec (and I assume the other plugins as well).

There are a couple of caveats to this - the first being that CocoaPods currently has a bug that means public_headers which are symlinked from outside the project (as flutter has recently started doing) get included as Project Headers instead of Public Headers at least for when static_framework is used (it might pop up other places too). I've submitted a PR to cocoapods to resolve that but still need to write some unit tests for them (yay, I get to learn more ruby 😒) (edit: it has now been accepted into master but no idea about release date). Also, FYI - the trunk of cocoapods seems to not work with flutter (I don't currently have time to track down why not) so the next release that includes this fix could theoretically fail on that. It will also require people to update to cocoapods 1.4.0 if they haven't already.

Sorry for the long-windedness, but I think this is something worth considering especially now that more developers will hopefully be coming on board since the beta release - and I'd bet that a lot of them will want to use both swift and the various plugins flutter provides for firebase etc.

Issue 2:
10-03 11:29:10.612 29886 29912 E flutter : [ERROR:../../lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
10-03 11:29:10.612 29886 29912 E flutter : The null object does not have a method 'inheritFromWidgetOfExactType'.
10-03 11:29:10.612 29886 29912 E flutter :
10-03 11:29:10.612 29886 29912 E flutter : NoSuchMethodError: method not found: 'inheritFromWidgetOfExactType'
10-03 11:29:10.612 29886 29912 E flutter : Receiver: null
10-03 11:29:10.612 29886 29912 E flutter : Arguments: [Type: class 'FormScope']
10-03 11:29:10.612 29886 29912 E flutter : #0 Object._noSuchMethod (dart:core-patch/object_patch.dart)
10-03 11:29:10.612 29886 29912 E flutter : #1 Object.noSuchMethod (dart:core-patch/object_patch.dart)
10-03 11:29:10.612 29886 29912 E flutter : #2 _FormFieldData.onChanged (package:flutter/src/material/input.dart)
10-03 11:29:10.612 29886 29912 E flutter : #3 RawInputLineState._handleTextUpdated (package:flutter/src/widgets/editable.dart)
10-03 11:29:10.612 29886 29912 E flutter : #4 _KeyboardClientImpl.updateEditingState (package:flutter/src/widgets/editable.dart)
10-03 11:29:10.612 29886 29912 E flutter : #5 _KeyboardClientStubControl.handleMessage (package:sky_services/editing/editing.mojom.dart)
10-03 11:29:10.612 29886 29912 E flutter : #6 StubMessageHandler.handleRead (package:mojo/src/stub.dart)
10-03 11:29:10.612 29886 29912 E flutter : #7 MojoEventHandler._handleEvent (package:mojo/src/event_handler.dart)
10-03 11:29:10.612 29886 29912 E flutter : #8 MojoEventHandler._tryHandleEvent (package:mojo/src/event_handler.dart)
10-03 11:29:10.612 29886 29912 E flutter : #9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart)