简体   繁体   中英

How can I use flutter's "--obfuscate" flag with fastlane on iOS

I have a fastlane lane that builds the app using gym or build_app but I also want to use flutter build 's --obfuscate flag.

  desc "Build - Enterprise"
  lane :build_enterprise do |options|
    bundle_id = options[:bundle_id]

    sync_certificates_and_provisioning_profiles(
      type: "enterprise",
      bundle_id: bundle_id,
    )
    cleanup
    gym(
      scheme: get_scheme(bundle_id),
      export_method: "enterprise",
      clean: true,
      include_bitcode: false,
      include_symbols: true,
      export_options: {
        signingStyle: "manual",
        provisioningProfiles: generate_enterprise_profiles(bundle_id)
      }
    )
  end

As I understand, I can replace gym with flutter build ios --obfuscate but then how can I make use of other parameters that gym provides. Such as: export_method , export_options , include_bitcode , include_symbols ? I have multiple flavors in the app and using these parameters based on debug/release app or staging/production app is quite useful.

You can't add this via fastlane-gym. In the project_directory>iOS>Flutter>Generated.xcconfig file add

DART_OBFUSCATION=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM