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

Add symlink to the pub cache #70

Open
feinstein opened this issue Feb 16, 2024 · 1 comment
Open

Add symlink to the pub cache #70

feinstein opened this issue Feb 16, 2024 · 1 comment

Comments

@feinstein
Copy link

feinstein commented Feb 16, 2024

When we use flutterfire_cli (please test it with the latest dev version 0.3.0-dev.19) it creates a build script in ios, inside xcode, to move the firebase files to the correct folder. The script looks like this:

#!/bin/bash
PATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin
flutterfire bundle-service-file --plist-destination=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app --build-configuration=${CONFIGURATION} --platform=ios --apple-project-path=${SRCROOT}

This works fine when I use the flutter tools, but fails if I try to use xcode to build my app (which I need to do sometimes, like for simulating for the VisionOS, since it's not supported yet by the flutter tools) the build fails.

I can build my app in xcode if I change the script to:

#!/bin/bash
PATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin:$HOME/.puro/shared/pub_cache/bin/
flutterfire bundle-service-file --plist-destination=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app --build-configuration=${CONFIGURATION} --platform=ios --apple-project-path=${SRCROOT}

Basically adding the puro pub cache (since flutterfire is inside puro's pub cache), but I don't want to modify this script, since it's generated by the flutterfire_cli and it can change in the future. Also I don't want to have puro references in the project, since projects should be more independent of the dev's machine configurations.

It would be better if puro could symlink the default pub cache to it's pub cache.

@pingbird
Copy link
Owner

IMO the flutterfire CLI should just follow the semantics of the pub tool and use PUB_CACHE

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

2 participants