Some test text!

menu

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 PDFTron collaboration server.
  2. Google's Firebase Realtime Database

This guide will step you through running the sample.

Download .dmg

linkCollaborate with the PDFTron Demonstration sServer

The PDFTron 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.

linkCollaborate with Firebase Realtime Database

linkUse PDFTron'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 PDFTron 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.

linkUse 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.

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

Join our live demo to learn about use cases & capabilities for WebViewer

Learn more
close