Some test text!

Search
Hamburger Icon

Xamarin / iOS

Connect to server (iOS)

Learn how to configure a server to synchronize your files and annotations or setup and try sample server projects.

Server samples for realtime document collaboration in Xamarin.iOS

This page only applies to Xamarin.iOS.

The iOS SDK includes a realtime collaboration sample app with the .dmg download (found in Samples/Other/Collaboration). It includes support for two different back-end servers:

  1. A demonstration Apryse collaboration server.
  2. Google's Firebase Realtime Database

This guide will step you through running the sample.

Download .dmg

Collaborate with the Apryse Demonstration sServer

The Apryse demonstration server uses WebSockets to communicate annotation changes and messages between the client and the server. The WebSocket API is provided by SocketRocket, and is integrated via CocoaPods.

  1. Open the workspace Collaboration.xcworkspace, and run the sample. The device will show the PDF viewer.
  2. Check Xcode's sample for a URL you can open in your computer's browser.

Now, when you create annotations on the device or the computer's browser, the annotation will show up on the other.

Collaborate with Firebase Realtime Database

Use Apryse's demonstration Firebase database.

Firebase's Realtime Database is a NoSQL database. Accessing firebase requires Google's Firebase SDK, which is integrated via Cocoapods:

  1. Open the workspace Collaboration.xcworkspace.
  2. Open the file ViewController.m, and in the method -(void)viewDidAppear:(BOOL)animated, comment out the line of code under "OPTION 1" (which uses the Apryse demonstration server), and uncomment the line under "OPTION 2" (which uses Firebase).
  3. Run the sample. The device will show the PDF viewer.
  4. Check Xcode's sample for a URL you can open in your computer's browser.

Now, when you create annotations on the device or the computer's browser, the annotation will show up on the other.

Use a different Firebase database.

The firebase sample can be configured to connect to your own Firebase instance. To do this, follow these instructions:

  1. If you have not already done so, create a Firebase account.
  2. Using the Firebase console, in the Authentication section, under Sign-in method, enable Anonymous sign-in as a provider.
  3. Using the Firebase console, in the Database section, create a new Realtime Database.
  4. Using the Firebase console, in Project Settings (found by clicking the gear icon), create a new iOS app. Download its config file ("GoogleService-Info.plist"), and replace the sample's file of the same name with the newly downloaded version.
  5. Run the project. If you run the project a second time on a different device or simulator, you can collaborate using the 2 (or more) instances of the app.

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales