# Streaming iOS ARKit RGB-D Data

We have 2 different methods for streaming RGB-D on iOS:

1. Streaming without running AR app (no Unity)
2. Streaming while running AR app **(Unity Plugin)**

{% hint style="info" %}
**Problems?! (shocker)**

Reach out on [our discord](https://discord.gg/9r2HH4xH) and we will get you going!
{% endhint %}

## Streaming without running AR app

### 1.0 Build Sensor Stream Pipe for iOS (No Unity)

1.1 Follow the instructions: [Installation iOS (Unity Plugin)](/installation-ios.md#building-for-an-ios-app-no-unity)

### **2.0 Build Sensor Stream Pipe for Mac**

2.1 Follow the instructions here: [Installation Mac](/installation-mac.md#pre-built-binaries-installation-recommended)

### 3.0 Run Sensor Stream Client on Mac

3.1 Navigate to `/Sensor-Stream-Pipe/build/bin`

3.2 Run Sensor Stream Client with OpenCV visualization&#x20;

```
./ssp_client_opencv 9999
```

### **4.0 Run and Build Sensor Stream Server**

4.1 Open ssp.xcodeproj in `Sensor-Stream-Pipe/build-ios`

4.2 Sign, in Signing & Capabilities

![](/files/-MevYMtnYr1x97ggABjz)

4.3 Build and run ssp\_server!

If running into issues update host to the ip address of the computer running ssp client opencv in `serve_ios_raw.yaml`:

![](/files/-MevdllzBxMF-wHiQXbk)

## **Streaming while running AR app (Unity Plugin)**

### 1.0 Build Sensor Stream Pipe for iOS (No Unity)

1.1 Follow the instructions: [Installation iOS (Unity Plugin)](/installation-ios.md#building-for-an-ios-deployed-unity-app-unity-plugin)

### **2.0 Build Sensor Stream Pipe for Mac**

2.1 Follow the instructions here: [Installation Mac](/installation-mac.md#pre-built-binaries-installation-recommended)

### **3.0 Setup Unity Project**

3.1 git clone our sample project

```csharp
git clone https://github.com/moetsi/SSP-Unity-Plugin-AR-App.git
```

3.2 Update line 3 in Assets/StreamingAssets/serve\_ios\_raw\.yaml to the correct destination IP address

<figure><img src="/files/AIbgoQRoOiCeG1AasR1r" alt=""><figcaption></figcaption></figure>

### **4.0 Deploy the Unity Project**

4.0 Go to Assets/Scenes and open the SampleScene

4.1 Move the plugins created in [this step](https://sensor-stream-pipe.moetsi.com/pages/-MYAjs1ldpderuy3UOBk#id-2.0-download-and-install-ssp-1) to Assets/Plugins/iOS

4.1 Open Unity (2022+ works well) Go to Build Settings, switch to iOS platform, and hit "Build and Run" (this will launch xcode)

Set up your signing so you can deploy your application.

4.2 Run ssp\_client\_opencv on port 9999 on the device you are streaming frame data (check out [Streaming a Video](/streaming-a-video.md#3-0-run-sensor-stream-client-and-sensor-stream-server) if need instruction on how to do this)

4.3 Deploy the project onto an RGB-D (LiDAR) iPhone and check out the RGB-D data streaming as the iPhone runs an Unity AR Application!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sensor-stream-pipe.moetsi.com/streaming-ios-arkit-rgb-d-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
