Improve pods setup isolation on existing projects#30966
Improve pods setup isolation on existing projects#30966vmaraccini wants to merge 9 commits intoflutter:masterfrom vmaraccini:fix-pods-setup
Conversation
This keeps the semantic of the add method imperative
|
@jmagman can you take a look at this? |
|
Apologies for not getting to this sooner. There will no longer be build settings added to the host app, or any references to "Runner". |
|
@vmaraccini I'm hoping your issue is fixed by #36793. You can migrate your Podfile as I suggested above, and try it on the master channel. https://github.com/flutter/flutter/wiki/Flutter-build-release-channels |
Description
This PR adds a check to the Flutter tool Cocoapods integration that prevents adding the Pods include (
#include "Pods/Target Support Files/Pods-Runner/...) if the project's Podfile does not contain the targetRunner.This is useful when attempting to integrate Flutter into an existing application that already has Cocoapods dependencies, but none of them point to the Runner target/project.
I'm facing this problem when integrating Flutter into my existing iOS app which has an
xcworkspacewith multiple projects and a single Podfile to manage all Cocoapods dependencies. None of the dependencies in that Podfile target theRunnerproject.Related Issues
I could not find any related issues, but I reckon this is a trivial change and may not be deserving of one.
Tests
I added the following tests in
packages/flutter_tools/test/ios/cocoapods_test.dart:does not include Pod config in xcconfig files, if Runner target is not presentI also changed existing tests in the
cocoapods_test.dartfile to have valid Podfile content instead of just a mock string.Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?