Skip to content
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

Macos run problem. With problem resolution #217

Open
SergeShkurko opened this issue Oct 19, 2023 · 9 comments
Open

Macos run problem. With problem resolution #217

SergeShkurko opened this issue Oct 19, 2023 · 9 comments

Comments

@SergeShkurko
Copy link

I found resolution for fix macos build

Same this:
Error (Xcode): Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Release-development-input-files.xcfilelist'

Thoughts:

macos catch error when build because xcode really cannot find the generated pods file
but file exist... hm...

Task Xcode -> Targets "Runner" -> Build Phases -> [CP] Embed Pods Frameworks has two interested fields: "Input File Lists" and "Output File Lists"
For example we get "input file Lists" and read it:
${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist
where CONFIGURATION would be one of 'Debug', 'Profile', 'Release'
then we check PODS_ROOT:

Damn! Pods root path couldn't set for flavors

Conclusion:

We need set xcode Build Setting PODS_ROOT for all configurations to ${SRCROOT}/Pods

@SergeShkurko SergeShkurko changed the title Macos run problem Macos run problem. With problem resolution Oct 19, 2023
@SergeShkurko
Copy link
Author

@AngeloAvv can you create fix in package?

@SergeShkurko
Copy link
Author

SergeShkurko commented Oct 19, 2023

Simple manual way for fix macos run:

Set it value: ${SRCROOT}/Pods

Here:
image

Good luck 😉

@AngeloAvv
Copy link
Owner

The quickest solution is to deintegrate the Pods (by removing pod files and folders), and run flutter pub get again.

@mobikats
Copy link

The quickest solution is to deintegrate the Pods (by removing pod files and folders), and run flutter pub get again.

This does not work, it leaves you with the same problem.

@mobikats
Copy link

Simple manual way for fix macos run:

Set it value: ${SRCROOT}/Pods

Here: image

Good luck 😉

This looks like it should work, but whenever I change any build setting I get left with:

Screenshot 2023-10-26 at 11 51 55

And when I run "pod install" again, it sets back the build settings again (!).

So right now I still can't build my project.

There must be an easier way to manage flavors in Flutter projects, I seem to spend more time trying to fix path/build issues like this than I do actually editing dart code these days - any change seems to break the build, eg Xcode changes, flutter changes, CocoaPods changes, adding an extension, etc etc - the build breaks :(

@AngeloAvv
Copy link
Owner

AngeloAvv commented Dec 8, 2023

@AngeloAvv can you create fix in package?

How can I? Those entries do not even exist when you run flutter_flavorizr after creating a project in the first place. These elements are automatically added by cocoapods when you add third party libraries.

That's why deintegrating the pods, cleaning the lock files, and running the pub get will clean the Xcode folder structure and fix the problem.

@AngeloAvv
Copy link
Owner

@mobikats I added the Troubleshooting section in the README where I explain what are the right steps to get rid of the problem once and for all.

@mobikats
Copy link

Thanks @AngeloAvv .
I think what often happens is that (at least for me) I want to run flutter_flavorizr on an already well-developed project. For example, an app owner some years later wants a new application variant for an existing project and you find yourself needing to add additional flavors to a project that might have multiple extensions, 30+ libraries, and possibly bespoke native integrations, as well as existing flavors. It's running the flavorizr here that can cause these types of breakages.

@AngeloAvv
Copy link
Owner

Release 2.2.3 should fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants