-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: first hourThe first hour of using FlutterThe first hour of using Fluttera: pluginsSupport for writing, building, and running plugin packagesSupport for writing, building, and running plugin packagesplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
flutter create
a non-swift project
In pubspec.yaml
, add a swift plugin such as flutter_iap
.
flutter run
warns aboutuse_frameworks!
frompod install
. Easy to resolve so far.- Building gives
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.
error.
Seems like swift pod developers need to specify
s.pod_target_xcconfig = { 'SWIFT_VERSION' => <a version above 2.3 for it to work with Xcode 9> }
in their podspec. Added temporary hack in Podfile with
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
and re-pod install
3.
#import "Headers/flutter_iap-umbrella.h"
^
.../ios/Pods/Target Support Files/flutter_iap/flutter_iap-umbrella.h:13:9: error: include of non-modular header inside framework module 'flutter_iap': '.../.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.0.1/ios/Classes/FlutterIapPlugin.h'
Add
pre_install do |installer|
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
and
post_install do |installer|
installer.pods_project.targets.each do |target|
# workaround for https://github.com/CocoaPods/CocoaPods/issues/7463
target.headers_build_phase.files.each do |file|
file.settings = { 'ATTRIBUTES' => ['Public'] }
end
end
end
to make it work.
Wonder if we can add some automatic handling of swift plugins in the default objective-c project's Podfile
lukaspili, kozw, mravn-google, renatoathaydes, gaetschwartz and 37 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: first hourThe first hour of using FlutterThe first hour of using Fluttera: pluginsSupport for writing, building, and running plugin packagesSupport for writing, building, and running plugin packagesplatform-iosiOS applications specificallyiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team