> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/xamarin/get-started/xamarin-ios/view-ios.md).

# Step 2: View a document in Xamarin.iOS

Learn how to create a new Visual Studio iOS App project with Single View App and set up a NavigationController in ViewController.cs. Run your app in debug mode for a seamless experience. The Apryse Xa

1. If you do not already have an existing application, create a new Visual Studio `iOS App` project with `Single View App`.
2. Add these namespaces to `ViewController.cs`:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
using pdftron;
using pdftron.PDF.Controls;
```

{% endcode %}
{% endtab %}
{% endtabs %}

1. Add a new NavigationController as the entry point and make the existing ViewController the root view controller:

![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-8867ffc55db738a95a7d5c0b7baa6d91c6fc2fa0%2Fb8eb113d2439c090b69708ca78882e77dd055f76-1547x1612.png?alt=media)

Your final setup should look like this:

![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-b36413a3dd80b832c4133c9ee6791fc21e0b14bb%2Fd4d3ef1d14cb8f4dca51a30d4da72bd37279ced0-1602x1524.png?alt=media)

1. Add the following lines to the `ViewDidLoad()` method:

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
var documentController = new PTDocumentController();
this.NavigationController.PushViewController(documentController, true);
documentController.OpenDocumentWithURL(new Uri("https://pdftron.s3.amazonaws.com/downloads/pdfref.pdf"));
```

{% endcode %}
{% endtab %}
{% endtabs %}

1. Run the application in debug mode and you should see the DocumentController start up:

![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-73d238f3e60a17d11ea5e2696a49d4996936d13e%2Fe0f78f77dff2b991bc9e0b2568c7d5c4ac6cf5b4-650x1405.png?alt=media)

## Next step

<a href="/xamarin/get-started/xamarin-ios/customize-ios.md" class="button primary">Customize</a><a href="/xamarin/get-started/faq/add-license.md" class="button primary">Add an Apryse license key</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/xamarin/get-started/xamarin-ios/view-ios.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
