flutter_flavorizr
flutter_flavorizr copied to clipboard
Macos run problem. With problem resolution
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
@AngeloAvv can you create fix in package?
Simple manual way for fix macos run:
Set it value: ${SRCROOT}/Pods
Here:
Good luck 😉
The quickest solution is to deintegrate the Pods (by removing pod files and folders), and run flutter pub get again.
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.
Simple manual way for fix macos run:
Set it value:
${SRCROOT}/Pods
Here:
Good luck 😉
This looks like it should work, but whenever I change any build setting I get left with:
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 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.
@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.
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.
Release 2.2.3 should fix the issue