Thursday, August 11, 2022
HomeiOS Developmentios - CocoPods error on putting in flutter with bazel

ios – CocoPods error on putting in flutter with bazel


I am making an attempt to construct an ipa file utilizing bazel and flutter, then I’ve the next BUILD file:

    title = "flutter_build_ios",
    srcs = glob(["ios/**","lib/**","assets/**", "pubspec.yaml"]),
    outs = ["mobile.ipa"],
    cmd_bash = "flutter construct ipa --export-options-plist ios/Runner/ExportOptions.plist --obfuscate --split-debug-info=construct/app/outputs/symbols && cp construct/ios/ipa/cell.ipa $@ && cp construct/app/outputs/symbols $(@D)",
    tags = ["local"]

When I attempt to execute the bazel command: @bazel construct //:flutter_build_ios --verbose_failures I received error:

(Couldn't create '/var/root/.cocoapods/repos', the CocoaPods repo cache listing.
Errno::EACCES: Permission denied @ dir_s_mkdir - /var/root/.cocoapods)
You possibly can strive including it manually in `/var/root/.cocoapods/repos` or through `pod repo add`.

I do not know why bazel is making an attempt to make use of /var/root as an alternative of ~/Library/Caches/CocoaPods/. I attempted execute the identical command in my terminal, with out bazel: flutter construct ipa --export-options-plist ios/Runner/ExportOptions.plist --obfuscate --split-debug-info=construct/app/outputs/symbols and the whole lot works nice.

I believe I am lacking one thing about how bazel works beneath the hood.



Most Popular

Recent Comments