Skip to content

Commit 2b0217b

Browse files
committed
feat: added category for visionOS and page on using Preview with it
1 parent 4842e99 commit 2b0217b

File tree

5 files changed

+43
-8
lines changed

5 files changed

+43
-8
lines changed
335 KB
Loading

content/guide/visionos-preview.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Previewing visionOS from StackBlitz
3+
description: You can develop and live preview Vision Pro apps using StackBlitz with NativeScript Preview.
4+
contributors:
5+
- NathanWalker
6+
---
7+
8+
Just like you can Preview iOS and Android apps using StackBlitz with [NativeScript Preview](https://preview.nativescript.org/), you can do the same with visionOS apps.
9+
10+
<img class="mx-auto" src="../assets/images/guide/nativescript-visionpro-stackblitz.jpg" alt="Previewing visionOS from StackBlitz" />
11+
12+
## Using NativeScript Preview with Vision Pro
13+
14+
*This is useful if you have a physical Vision Pro device.*
15+
16+
1. On your Vision Pro
17+
- Search for and install "NativeScript Preview" on the App Store.
18+
2. On your desktop
19+
1. Start a StackBlitz session containing a Vision Pro app like this one: https://stackblitz.com/edit/nativescript-vision-pro-explore?file=src%2Fapp%2Fitem%2Fitems.component.ts
20+
- *Tip: You can also share your desktop to your Vision Pro to copy/paste links directly.*
21+
2. Once QR Code appears on the right side, you can CMD+Tap on the QR to open a new browser tab.
22+
3. Copy/Paste the URL from the new browser tab
23+
4. Share this URL with your Vision Pro
24+
3. Back on your Vision Pro
25+
1. Tapping on the shared link will open NativeScript Preview and begin building in the StackBlitz terminal.
26+
2. Once the build is complete, Vision Pro Safari will launch with a prompt to open 'Preview' on the Vision Pro to begin a live development session with your Vision Pro app.

content/guide/visionos.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You can use a [Developer Strap](https://developer.apple.com/visionos/developer-s
6868

6969
> 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.
7070
71-
Once connected, you can run `ns device` and it will list all connected physical devices:
71+
Once connected, you can run `ns device` to list all connected physical devices:
7272

7373
```bash
7474
% ns device
@@ -77,7 +77,7 @@ Searching for devices...
7777
Connected devices & emulators
7878
┌───┬──────────────────┬──────────┬───────────────────────────┬────────┬───────────┬─────────────────┐
7979
# │ Device Name │ Platform │ Device Identifier │ Type │ Status │ Connection Type │
80-
│ 1 │ Apple Vision Pro │ visionOS │ 00008112-001A10812278A01E │ Device │ Connected │ USB │
80+
│ 1 │ Apple Vision Pro │ visionOS │ 00008112-001A10812278A01E │ Device │ Connected │ USB │
8181
```
8282

8383
You can then run on that device as follows:
@@ -91,7 +91,7 @@ ns run visionos --no-hmr --device=00008112-001A10812278A01E
9191
Primarily 2 key elements make up a NativeScript driven visionOS project:
9292

9393
1. `App_Resources/visionOS/src/NativeScriptApp.swift`
94-
2. The following dependencies are used:
94+
2. The following dependencies:
9595

9696
```json
9797
{

content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Some popular use cases:
1717
- AndroidTV and Watch development
1818
- watchOS development
1919
- Learning native platforms through JavaScript understanding
20-
- Exploring platform API documentation by [trying APIs directly from a web browser without requiring a platform development machine setup](https://preview.nativescript.org/)
20+
- Exploring platform API documentation by trying APIs [directly from a web browser](https://preview.nativescript.org/) without requiring a platform development machine setup.
2121

2222
### Why NativeScript?
2323

content/sidebar.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,19 @@ export default [
202202
},
203203
],
204204
},
205+
{
206+
text: 'Developing with Vision Pro',
207+
items: [
208+
{
209+
text: 'Developing with visionOS',
210+
link: '/guide/visionos',
211+
},
212+
{
213+
text: 'Previewing visionOS from StackBlitz',
214+
link: '/guide/visionos-preview',
215+
},
216+
]
217+
},
205218
{
206219
text: 'Advanced Concepts',
207220
items: [
@@ -261,10 +274,6 @@ export default [
261274
// text: 'The Layout Process',
262275
// link: '/guide/advanced/the-layout-process',
263276
// },
264-
{
265-
text: 'Developing with visionOS',
266-
link: '/guide/visionos',
267-
},
268277
{
269278
text: 'Metadata',
270279
link: '/guide/metadata',

0 commit comments

Comments
 (0)