Communication Library for iOS Examples

The distribution of the library includes several examples included into a single Xcode project. The examples demonstrate various features and APIs supported by the product.

  • Shared WhiteBoard - demonstrates the usage of the RTMP Remote Shared Objects between two or more clients.
  • Server to Client Method Invocation - demonstrates the invocation of various Java or .NET methods from Objective-C via RTMP.
  • Client to Server Method Invocation (RTMP Data Push) - demonstrates the invocation of the Objective-C method from Java or .NET code (Java or .NET Data Push).
  • Shared Ball - demonstrates the usage of the RTMP Remote Shared Object between native Objective-C and browser-based Flex clients

Shared WhiteBoard Example

The is based on Communicator Library for iOS and demonstrates the usage of the Remote Shared Objects API. It implements a whiteboard shared between multiple users. User can draw by finger on the own whiteboard, and the strokes are automatically replicated between all connected clients. 

Instructions

To see the example in action, you need to prepare your server-side environment. 

  1. Before you run the example on an iPhone or iPad, download and install the latest version of WebORB for .NET or Java. You can verify the server installation by running WebORB management console. For .NET, the console's address is localhost/weborb4/weborbconsole.html. For Java, run the product using the following command in a command prompt window: "java -jar weborb.jar", then open the management console in a browser using the following URL: ;
  2. Make sure your iPhone or iPad is on the same network as the computer where WebORB runs or alternatively, make sure the computer with WebORB has public IP address. 
  3. Run the example on an iPhone or iPad 
  4. Use the following configuration parameters: 

    Host: enter IP address of your computer 
    Port: enter 2037 for WebORB for .NET or 1935 for WebORB for Java 
    AppName: SharedObjectsApp

  5. Click "Connect" 
  6. Open the example on another iOS device and repeat steps 3 through 5. Scribble in the white space of the example and you will see that drawings are automatically synchronized between all instances of the client application. Double-touch will clear the whiteboard.

Server to Client Method Invocation

The example is based on Communicator Library for iOS and demonstrates server-to-client invocation. Make sure to install WebORB for Java or .NET and run multiple instances of this example. 

Instructions

To see the example in action, you need to prepare your server-side environment.

  1. Before you run the example on an iPhone or iPad, download and install the latest version of WebORB for .NET or Java. You can verify the server installation by running WebORB management console. For .NET, the console's address is localhost/weborb4/weborbconsole.html. For Java, run the product using the following command in a command prompt window: "java -jar weborb.jar", then open the management console in a browser using the following URL: ;
  2. Make sure your iPhone or iPad is on the same network as the computer where WebORB runs or alternatively, make sure the computer with WebORB has public IP address. 
  3. Run the example on an iPhone or iPad 
  4. Use the following configuration parameters: 

    Host: enter IP address of your computer 
    Port: enter 2037 for WebORB for .NET or 1935 for WebORB for Java 
    AppName: CallbackDemo
     
  5. Click "Connect" 
  6. Open the example on another device and repeat steps 3 through 5. You will see as clients connect to the server, other clients receive notifications via server-to-client method invocations. If you do not have another device, select the Help/Resources tab in the WebORB Management Console and click the "Examples" link. In the examples tree on the left, navigate to: FLEX Examples > Real-time Messaging (RTMP) > Server to client method invocation. The example contains a link to open additional windows with a Flex client. The Flex client uses the same mechanism for connecting to the server as the example app for the iPhone/iPad. As a result, when the Flex client connects/disconnects to/from the server, iPhone/iPad app also receives invocations from the server-side.

Client To Server Method Invocation

ClientInvoke example is based on Communicator Library for iOS and demonstrates the API enabling remote method invocation. The client application can invoke server-side Java or .NET methods and pass primitive values, strings, dates and arrays. 

Instructions

To see the example in action, you need to prepare your server-side environment.

  1. Before you run the example on an iPhone or iPad, download and install the latest version of WebORB for .NET or Java. You can verify the server installation by running WebORB management console. For .NET, the console's address is localhost/weborb4/weborbconsole.html. For Java, run the product using the following command in a command prompt window: "java -jar weborb.jar", then open the management console in a browser using the following URL: ;
  2. Make sure your iPhone or iPad is on the same network as the computer where WebORB runs or alternatively, make sure the computer with WebORB has public IP address. 
  3. Run the example on an iPhone or iPad 
  4. Use the following configuration parameters: 

    Host: enter IP address of your computer 
    Port: enter 2037 for WebORB for .NET or 1935 for WebORB for Java AppName: ClientInvoke 

  5. Click "Connect" 
  6. The example application contains several buttons which invoke server-side methods in Java or .NET. Click the buttons to issue remote method invocations.

Shared Ball

SharedBall example is based on Communicator Library for iOS and demonstrates the usage of the Remote Shared Objects API. RSO can be hosted in any media and messaging server: WebORB, Adobe FMS, Red5 or Wowza Media Server.

Instructions

To see the example in action, you need to prepare your server-side environment.

  1. Before you run the example on an iPhone or iPad, download and install the latest version of WebORB for .NET or Java. You can verify the server installation by running WebORB management console. For .NET, the console's address is localhost/weborb4/weborbconsole.html. For Java, run the product using the following command in a command prompt window: "java -jar weborb.jar", then open the management console in a browser using the following URL: ;
  2. Make sure your iPhone or iPad is on the same network as the computer where WebORB runs or alternatively, make sure the computer with WebORB has public IP address. 
  3. Run the example on an iPhone or iPad 
  4. Use the following configuration parameters: 

    Host: enter IP address of your computer 
    Port: enter 2037 for WebORB for .NET or 1935 for WebORB for Java AppName: SharedObjectsApp 

  5. Click "Connect" 
  6. Open the example on another iOS device by repeating steps 3 through 5. Drag the "WebORB" ball on the screen of one of the devices, you will see the position of the ball on other devices is synchronized in real-time. If you do not have another iOS device, select the Help/Resources tab in the WebORB Management Console and click the "Examples" link. In the examples tree on the left, navigate to: FLEX Examples > Real-time Messaging (RTMP) > Remote SharedObject - Ball Control. Drag the WebORB ball either in the example on iPhone/iPad or in the browser. As you drag, the position of the image in the example is properly synchronized on all devices.