In the following example, Main.storyboard doesn't show up in the generated Xcode project if it's added through an apple_resource_bundle target, but if it's added directly via data, the file shows up.
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle")
load(
"@build_bazel_rules_apple//apple:versioning.bzl",
"apple_bundle_version",
)
apple_resource_bundle(
name = "Storyboard",
resources = ["Resources/Main.storyboard"],
)
objc_library(
name = "Sources",
srcs = [
"Sources/AppDelegate.h",
"Sources/AppDelegate.m",
"Sources/main.m",
],
# Resources added through apple_resource_bundle doesn't show up in the project,
data = [":Storyboard"],
# but they do if they are added directly like below.
# data = ["Resources/Main.storyboard"],
)
ios_application(
name = "HelloWorld",
bundle_id = "com.example.hello-world",
families = [
"iphone",
"ipad",
],
infoplists = [":Info.plist"],
minimum_os_version = "8.0",
version = ":HelloWorldVersion",
deps = [":Sources"],
)
apple_bundle_version(
name = "HelloWorldVersion",
build_version = "1.0",
)
In the attached example below, run this to generate the Xcode project:
bazel run -- @tulsi//:tulsi -- --genconfig "`pwd`/HelloWorld.tulsiproj" --outputfolder=`pwd`
Thanks for submitting this issue but this tool is being deprecated. Please checkout rules_xcodeproj for a more complete and maintained Xcode integration.
In the following example,
Main.storyboard
doesn't show up in the generated Xcode project if it's added through anapple_resource_bundle
target, but if it's added directly viadata
, the file shows up.In the attached example below, run this to generate the Xcode project:
tulsi-apple_resource_bundle-issue.zip