Skip to content

Commit 2172013

Browse files
authored
Update README example (bazelbuild#2156)
1 parent 826b54b commit 2172013

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@ Minimal example:
3232

3333
```python
3434
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
35+
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
3536

36-
objc_library(
37-
name = "Lib",
38-
srcs = glob([
39-
"**/*.h",
40-
"**/*.m",
41-
]),
42-
data = [
43-
":Main.storyboard",
44-
],
37+
swift_library(
38+
name = "MyLibrary",
39+
srcs = glob(["**/*.swift"]),
40+
data = [":Main.storyboard"],
4541
)
4642

4743
# Links code from "deps" into an executable, collects and compiles resources
@@ -50,10 +46,13 @@ objc_library(
5046
ios_application(
5147
name = "App",
5248
bundle_id = "com.example.app",
53-
families = ["iphone", "ipad"],
49+
families = [
50+
"iphone",
51+
"ipad",
52+
],
5453
infoplists = [":Info.plist"],
5554
minimum_os_version = "15.0",
56-
deps = [":Lib"],
55+
deps = [":MyLibrary"],
5756
)
5857
```
5958

0 commit comments

Comments
 (0)