Sunday, September 25, 2022
HomeiOS Developmentswift - Constructing iOS app with Bazel fails on iOS model

swift – Constructing iOS app with Bazel fails on iOS model


I’m studying bazel. In my ios_application rule there’s this line:

minimum_os_version = "14.5"

and in my .bazelrc there are these strains:

construct 
  --apple_platform_type=ios 
  --xcode_version=13.4.1 
  --ios_minimum_os=14.5 
  --ios_simulator_device="iPhone 13" 
  --ios_simulator_version=15.5 

After I construct it with bazel construct //:App, it provides me these errors like

ContentView.swift:11:6: error: 'ObservedObject' is simply accessible in iOS 13.0 or newer
, as if I’m constructing with a decrease model of iOS than 13.0

any concept what the issue might be?

Error log:

INFO: Analyzed goal //XcodeBenchmark:App (0 packages loaded, 0 targets configured).
INFO: Discovered 1 goal...
ERROR: /Customers/tahabebek/BazelEd/BenchmarkProjects/XcodeBenchmark/XcodeBenchmark/Screen5/BUILD.bazel:3:14: Compiling Swift module //XcodeBenchmark/Screen5:Screen5 failed: (Exit 1): employee failed: error executing command
  (cd /non-public/var/tmp/_bazel_tahabebek/ea06894acf9e8d0a18b7c9fce25481e4/execroot/__main__ && 
  exec env - 
    APPLE_SDK_PLATFORM=iPhoneSimulator 
    APPLE_SDK_VERSION_OVERRIDE=15.5 
    SWIFT_AVOID_WARNING_USING_OLD_DRIVER=1 
    XCODE_VERSION_OVERRIDE=13.4.1.13F100 
  bazel-out/darwin_arm64-opt-exec-2B5CBBC6-ST-e5c8d72b3b04/bin/exterior/build_bazel_rules_swift/instruments/employee/employee swiftc @bazel-out/ios-sim_arm64-min14.5-applebin_ios-ios_sim_arm64-fastbuild-ST-92fa43ee4129/bin/XcodeBenchmark/Screen5/Screen5.swiftmodule-0.params)
# Configuration: b49a82c195d775e901470b0dfb490b914790bcca5cf674a00f03b79e63478dfc
# Execution platform: @local_config_platform//:host
error: emit-module command failed with exit code 1 (use -v to see invocation)
XcodeBenchmark/Screen5/ContentView5.swift:11:6: error: 'ObservedObject' is simply accessible in iOS 13.0 or newer
    @ObservedObject var vm: ViewModel5

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments