Update ios-app tutorial to use ios_application for bundling instead of the deprecated bundling functionality of objc_binary.
This is to be coordinated with updating the example app (linked to within the tutorial)
--
MOS_MIGRATED_REVID=105430949
diff --git a/site/docs/tutorial/ios-app.md b/site/docs/tutorial/ios-app.md
index 8990817..fd99f6b 100644
--- a/site/docs/tutorial/ios-app.md
+++ b/site/docs/tutorial/ios-app.md
@@ -65,21 +65,38 @@
## Add an objc_binary rule
-The [`objc_binary`](/docs/build-encyclopedia.html#objc_binary) rule creates the
-bundled `.ipa` archive file for the application and also generates an Xcode
-project file.
+The [`objc_binary`](/docs/build-encyclopedia.html#objc_binary) rule creates a
+binary to be bundled in the application.
Add the following to your `BUILD` file:
```python
objc_binary(
- name = "ios-app",
+ name = "ios-app-binary",
srcs = [
"UrlGet/main.m",
],
deps = [
":UrlGetClasses",
],
+)
+
+```
+Note how the `deps` attribute references the output of the
+`UrlGetClasses` rule you added to the `BUILD` file above.
+
+## Add an ios_application rule
+
+The [`ios_application`](/docs/build-encyclopedia.html#ios_application) rule
+creates the bundled `.ipa` archive file for the application and also generates
+an Xcode project file.
+
+Add the following to your `BUILD` file:
+
+```python
+ios_application(
+ name = "ios-app",
+ binary = ":ios-app-binary",
infoplist = "UrlGet/UrlGet-Info.plist",
)
```
@@ -88,9 +105,6 @@
[completed example](https://github.com/bazelbuild/examples/blob/master/tutorial/ios-app/BUILD)
in the `master` branch of the GitHub repo.
-Again, note how the `deps` attribute references the output of the
-`UrlGetClasses` rule you added to the `BUILD` file above.
-
## Run the build
Make sure that your current working directory is inside your Bazel workspace:
@@ -111,7 +125,6 @@
```bash
INFO: Found 1 target...
Target //ios-app:ios-app up-to-date:
- bazel-bin/ios-app/ios-app_bin
bazel-bin/ios-app/ios-app.ipa
bazel-bin/ios-app/ios-app.xcodeproj/project.pbxproj
INFO: Elapsed time: 3.765s, Critical Path: 3.44s