New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move logic from user project's Podfile to a Ruby script in Flutter tools #45197
Comments
To what extent do we know whether users have manually edit the file? |
Hard to say. Though it is an issue users brought up #12754 |
\cc @franciscojma86 |
New prompt from
If you have custom Podfile edits you would like to keep, the easiest thing to do is to re-create your changes on top of the new generated one. If you are unable to do that, here is the generated Podfile that copies the correct version of the Flutter engine to the expected locations. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
The Podfile format has changed in 1.20 with #59044. This change was made to support plugins that do not support the iOS platform and was developed to hopefully prevent painful developer migrations like this to be necessary in the future by simplifying it, and moving more logic into the Flutter SDK. The new Podfile looks different, but the key sections are the same. target 'Runner'There's a target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
# ADD YOUR CUSTOM PODS HERE!
end For example, if you needed to include a pod like target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'KeychainSwift', '~> 19.0'
end project 'Runner'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
} for example, if you had a project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Staging' => :release,
'Release' => :release,
} post_installThere's also a post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# YOUR CUSTOM TARGET CODE HERE.
end
end for example, if your old Podfile set your plugins' post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end |
Writing out the logic into the user project's source controlled Podfile means we're locking the interpretation of
.flutter-plugins
which is ephemeral with the Flutter tools in time and it's no longer upgradable.Since we know we're moving the .flutter-plugins content to support federated plugins (@amirh) we should make sure the users with existing projects can handle changes in the way .flutter-plugins is written to.
cc @zanderso @jmagman
The text was updated successfully, but these errors were encountered: