如何在iOS上使用fastlane和flutter的"--obfuscate"标志

7

我有一个使用 gym 或者 build_app 构建应用的快车道,但我还想使用 flutter build--obfuscate 标志。

  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

据我所知,我可以使用flutter build ios --obfuscate替换gym,但是我该如何使用gym提供的其他参数?例如:export_methodexport_optionsinclude_bitcodeinclude_symbols?我的应用程序中有多个风格,在基于调试/发布应用程序或暂存/生产应用程序时使用这些参数非常有用。请注意保留HTML标记。

嗨,@Rohan,你找到了解决办法吗? - Alexandru Rusu
没有,我没有 :/ - Rohan Taneja
那么,我猜你是通过 flutter build ipa 命令来构建应用,并指定所需的选项? - Alexandru Rusu
不,我使用gym本身。没有混淆。 - Rohan Taneja
1个回答

0

你不能通过fastlane-gym添加这个。在project_directory>iOS>Flutter>Generated.xcconfig文件中添加:

DART_OBFUSCATION=true

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接