Issue 1:
I have created a very basic flutter plugin here:

https://github.com/shehabic/dhplugin

and used it in this module:

https://github.com/shehabic/flutter-test-module

this module is supposed to be the module that will have all the customer plugin we'll create in our company, we import this module into our existing apps and it'll grab all of our custom plugins with it.

I've spent 5 days now having trouble with and I couldn't get it to work.

here is the error:

Steps to Reproduce

Checkout the module above

Run flutter packages get

Run flutter build ios --debug

Logs

Building com.shehabic.module.mymodule for device (ios)...
Signing iOS app for device deployment using developer identity: "iPhone Developer: My Name (TeamNumber)"
Starting Xcode build...
Xcode build done. 9.1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **

Xcode's output:
↳
=== BUILD TARGET flutter_webview_plugin OF PROJECT Pods WITH CONFIGURATION Debug ===
dhplugin.xcconfig line 12: Unable to find included file "../.ios/Flutter/Generated.xcconfig"
dhplugin.xcconfig line 13: Unable to find included file "../.ios/Flutter/Generated.xcconfig"
=== BUILD TARGET flutter_webview_plugin OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/shehabic/development/flutter/.pub-cache/git/dhplugin-d25caf5fc30cf036675d3e2a4fab393243f112f2/ios/Classes/DhpluginPlugin.m:2:9: fatal error:
'dhplugin/dhplugin-Swift.h' file not found
#import <dhplugin/dhplugin-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
flutter_webview_plugin.xcconfig line 11: Unable to find included file "../.ios/Flutter/Generated.xcconfig"
flutter_webview_plugin.xcconfig line 12: Unable to find included file "../.ios/Flutter/Generated.xcconfig"
/Users/shehabic/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.2.1+2/ios/Classes/FlutterWebviewPlugin.m:71:22: warning: incompatible pointer
to integer conversion assigning to 'BOOL' (aka 'signed char') from 'id _Nullable' [-Wint-conversion]
_enableAppScheme = call.arguments[@"enableAppScheme"];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/shehabic/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.2.1+2/ios/Classes/FlutterWebviewPlugin.m:244:78: warning: values of type
'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
id data = [FlutterError errorWithCode:[NSString stringWithFormat:@"%ld", error.code]
~~~ ^~~~~~~~~~
%ld (long)
/Users/shehabic/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.2.1+2/ios/Classes/FlutterWebviewPlugin.m:254:102: warning: values of type
'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
[channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", response.statusCode], @"url": webView.URL.absoluteString}];
~~~ ^~~~~~~~~~~~~~~~~~~
%ld (long)
3 warnings generated.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.10.1-pre.78, on Mac OS X 10.14 18A391, locale en-DE)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2017.3.2)
[✓] VS Code (version 1.28.2)
[!] Connected device
! No devices available

Issue 2:
Hi,

I’m struggling since the last few days to understand how I can build or use Flutter Platform channel plugins that are written in Swift for the iOS part.

To my understanding plugins should not force you to set « use_frameworks! » in your PodFile, because, well, that’s make for example firebase_messaging not working (because this plugin force to comment use_frameworks).

So I try to create a plug-in by my own with the Flutter CLI :

flutter create —template=plugins -ios-language swift sample

The project is generated with the use_frameworks! In PodFile who makes it functionnal but incompatible with most from the start.

I’m not an CocoaPods expert but is it still required for Swift Library to use this flag ? I thought that starting at Cocoapod 1.5 you could remove the flag. But that’s not working at all.

So is it possible to make Flutter Swift plugins who works with firebase plugins ?

If so, can you point me to this direction ? Should the cli create command need to be updated to provide from the start the "good" example project ?

If making swift plugins working with "first party" plugins is not possible, is it not wiser to remove the ability to create swift plugins since this is not "future proof" and can produce some awkward ecosystem of plugins.

Sorry in advance if what I said is not really relevant, I'm trying to understand "the right way" to make iOS plugins...in Swift (Objective-C is not my cup of tea)

Steps to Reproduce

Create a new Flutter plugin project :

flutter create --template=plugin -i swift sample

In sample/example/ios/Podfile, Comment use_frameworks!

In sample/example run flutter run on iOS emulator

fatal error: 'sample/sample-Swift.h' file not found
#import <sample/sample-Swift.h>

Logs

flutter doctor -v
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale fr-FR)
• Flutter version 1.0.0 at /Users/romainpardon/Development/SDK/flutter
• Framework revision 5391447fae (3 weeks ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/romainpardon/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.30.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.21.1

[✓] Connected device (1 available)
• iPhone XR • DDB601C1-5AEC-47B3-999A-2D6E72FAF466 • ios • iOS 12.1 (simulator)

• No issues found!