Git Product home page Git Product logo

Comments (3)

Turiginy1941 avatar Turiginy1941 commented on April 28, 2024 1

It seems like your Fastlane configuration is not recognizing the specified scheme ("staging") during the build process, resulting in a fallback to the default "Release" scheme. This can be frustrating, especially when everything works fine locally but fails in the CI/CD pipeline.

Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Ensure Scheme Exists: Double-check that the "staging" scheme exists in your Xcode project. You can verify this by running the following command locally:

    xcodebuild -list
    

    Make sure that "staging" appears in the list of available schemes.

  2. Verify Scheme in Fastfile: Check your Fastfile configuration to ensure that the "staging" scheme is correctly specified in the build_app command. It seems like you're already specifying it, but it's worth double-checking for any typos or inconsistencies. Dgcustomerfirst

  3. Review GitHub Actions Environment: Make sure the GitHub Actions environment has the necessary configurations and permissions to build with the specified scheme. Sometimes, CI/CD environments can have different configurations or restrictions compared to local development environments.

  4. Debug Logs: Analyze the Fastlane output logs carefully, especially any warnings or errors that might indicate why the specified scheme is not being used during the build process. Look for any specific messages related to scheme selection or configuration.

  5. Explicitly Specify Scheme: Instead of relying on the default behavior, explicitly specify the scheme in the Fastfile command:

    build_app(
      scheme: "staging",
      # Other parameters...
    )
  6. Test with Different Configurations: If possible, try building with different configurations or schemes to see if the issue persists across all configurations or is specific to the "staging" scheme.

  7. Fastlane and Xcode Compatibility: Ensure that the versions of Fastlane and Xcode being used are compatible. Sometimes, issues can arise due to compatibility issues between Fastlane and Xcode versions.

  8. Consult Fastlane Documentation: Refer to the Fastlane documentation or community forums for any known issues or best practices related to specifying schemes in CI/CD environments.

By following these steps and carefully analyzing the Fastlane output, you should be able to diagnose and resolve the issue with specifying the scheme during the build process in your CI/CD pipeline. If the problem persists, you might need to provide more detailed logs or seek assistance from the Fastlane community for further troubleshooting.

from fastlane.

terdar-attempto avatar terdar-attempto commented on April 28, 2024

Update:

Now I have learned that the app flavor is not necessarily equivalent to the Xcode app scheme. When I set the configuration and scheme in the build_app action, the scheme gets applied correctly but the app will have no app flavor. The reason might be that the flavor can only be set via flutter build. My question now is, if there is any way to set the app flavor via build_app?

from fastlane.

terdar-attempto avatar terdar-attempto commented on April 28, 2024

Thank you for your advice, but as I already indicated in my previous comment, I tried to achieve something that is not possible with the build_app function. The iOS scheme is perfectly recognised by fastlane but my issue was something different. build_app only sets the iOS Build Scheme but not the flutter flavor. The flutter flavor is only applicable with the flutter build command, so I need to build the app in the workflow with this command and then I have to process the build with fastlane. But this is kinda tricky and I was not able yet to achieve that correctly.

For now, I built a workaround to determine in which environment the app currently is. The Flutter Plugin package_info_plus has the information about the installer store and whether this is local(Simulator or physical device), TestFlight or AppStore, I can choose the correct API base for the corresponding environment.

Since this is no issue directly associated with fastlane, we can close this issue.

from fastlane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.