Skip to content

Commit 4842e99

Browse files
committed
chore: vision docs
1 parent 1564db0 commit 4842e99

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

content/guide/visionos.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ contributors:
88

99
<img class="mx-auto" src="../assets/images/guide/vision-pro.png" alt="Vision Pro" />
1010

11-
Apple provides [visionOS](https://developer.apple.com/visionos/) development through the latest [Xcode 15.2](https://developer.apple.com/xcode/resources/) release.
11+
Apple provides [visionOS](https://developer.apple.com/visionos/) development starting with [Xcode 15.2](https://developer.apple.com/xcode/resources/) or higher.
1212

1313
::: info Note
1414
You will need an [Apple developer account](https://developer.apple.com/programs/enroll/) to download developer tools and SDKs.
@@ -18,7 +18,7 @@ You will need an [Apple developer account](https://developer.apple.com/programs/
1818

1919
## Create a visionOS project
2020

21-
Vision Pro is [scheduled for release on February 2, 2024](https://twitter.com/tim_cook/status/1744362067786682797) however you can develop now using the Vision Pro Simulator. Since the hardware is not available for public use yet, we are providing `vision` tagged npm packages to keep things distinct while you develop for visionOS.
21+
You can develop with a physical Vision Pro plugged in or using the Vision Pro Simulator.
2222

2323
**You will need the `vision` CLI**:
2424

@@ -62,13 +62,36 @@ The `vision` platform target is a shorthand alias for `visionos` so this can als
6262
ns run visionos --no-hmr
6363
```
6464

65+
#### Develop with physical Vision Pro
66+
67+
You can use a [Developer Strap](https://developer.apple.com/visionos/developer-strap/purchase) to connect your Vision Pro to your Mac.
68+
69+
> The Developer Strap is an optional accessory that provides a USB-C connection between Apple Vision Pro and Mac and is helpful for accelerating the development of graphics-intensive apps and games. The Developer Strap provides the same audio experience as the in-box Right Audio Strap, so developers can keep the Developer Strap attached for both development and testing.
70+
71+
Once connected, you can run `ns device` and it will list all connected physical devices:
72+
73+
```bash
74+
% ns device
75+
Searching for devices...
76+
77+
Connected devices & emulators
78+
┌───┬──────────────────┬──────────┬───────────────────────────┬────────┬───────────┬─────────────────┐
79+
# │ Device Name │ Platform │ Device Identifier │ Type │ Status │ Connection Type │
80+
│ 1 │ Apple Vision Pro │ visionOS │ 00008112-001A10812278A01E │ Device │ Connected │ USB │
81+
```
82+
83+
You can then run on that device as follows:
84+
85+
```bash
86+
ns run visionos --no-hmr --device=00008112-001A10812278A01E
87+
```
88+
6589
### What makes a project work on visionOS?
6690

67-
Primarily 3 key elements make up a NativeScript driven visionOS project:
91+
Primarily 2 key elements make up a NativeScript driven visionOS project:
6892

6993
1. `App_Resources/visionOS/src/NativeScriptApp.swift`
70-
2. `App_Resources/visionOS/build.xcconfig` with a minimum target of `IPHONEOS_DEPLOYMENT_TARGET = 17.0`
71-
3. The following dependencies are used:
94+
2. The following dependencies are used:
7295

7396
```json
7497
{
@@ -82,10 +105,6 @@ Primarily 3 key elements make up a NativeScript driven visionOS project:
82105
}
83106
```
84107

85-
::: info Note
86-
Once Apple releases visionOS in a final Xcode release these tags will no longer be necessary.
87-
:::
88-
89108
## Design Guidelines and Notes
90109

91110
We strongly encourage developers to understand and use Apple's system glass materials throughout their apps in addition to closely following their design guidelines.
@@ -222,7 +241,7 @@ You should not have to do a lot of this throughout apps in general but these opt
222241
223242
## NativeScript and the SwiftUI App Lifecycle
224243
225-
NativeScript 8.6 brings support for the [SwiftUI App](https://developer.apple.com/documentation/swiftui/app) Lifecycle for the first time. For a better understanding of the SwiftUI App Lifecycle, we recommend the following articles:
244+
Starting with NativeScript 8.6 we support the [SwiftUI App](https://developer.apple.com/documentation/swiftui/app) Lifecycle for the first time. For a better understanding of the SwiftUI App Lifecycle, we recommend the following articles:
226245
227246
- https://peterfriese.dev/posts/ultimate-guide-to-swiftui2-application-lifecycle/
228247
- https://dev.to/sam_programiz/swiftui-app-life-cycle-2n68

0 commit comments

Comments
 (0)