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

request: Improve iOS build #348

Open
1 task done
JCKodel opened this issue Dec 17, 2024 · 1 comment
Open
1 task done

request: Improve iOS build #348

JCKodel opened this issue Dec 17, 2024 · 1 comment

Comments

@JCKodel
Copy link

JCKodel commented Dec 17, 2024

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

No response

Description

What feature would you like to see?

Every time I update Flutter, I usually delete all the package cache (dart pub cache clean). This deletes the flutterfire_cli. When building the iOS app on VSCode, the error message is pretty unhelpful. The only helpful information is given by XCode when it fails the build and you click on the build logs (then you realize that the upload-crashlytics_symbols step failed because flutterfire is not available).

Suggestion:

Change the script to add a dart pub global activate flutterfire_cli on shellScript below:

8B3DA8A8A3A6FFF9F96462E2 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
  isa = PBXShellScriptBuildPhase;
  buildActionMask = 2147483647;
  files = (
  );
  inputFileListPaths = (
  );
  inputPaths = (
  );
  name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
  outputFileListPaths = (
  );
  outputPaths = (
  );
  runOnlyForDeploymentPostprocessing = 0;
  shellPath = /bin/sh;
  shellScript = "\n#!/bin/bash\ndart pub global activate flutterfire_cli\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};

If possible, make checks if firebase is authenticated as well (and, somehow, make those mistakes clearer when we issue an flutter build).

Also, this script is not compatible with CI/CD, since firebase will not be authenticated in, let's say, XCode Cloud. Maybe add a environment variable or something that ignores this script, so we can build in a cloud environment without having to delete this script?

Reasoning

Flutter often hides the true nature of a native build (in both Android and iOS). The more we can help mitigate those platform weaknesses, the better Flutter is.

Additional context and comments

No response

@JCKodel JCKodel added the triage label Dec 17, 2024
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant