Creating an iOS Launcher

Creating an iOS launcher is pretty similar as connecting it. The following steps describe how to create your own Tabris client for iOS.

Please note: To create a launcher for iOS you need to have Mac with Xcode installed. If you don’t have a Mac we recommend using http://www.macincloud.com/. If this is an option for you, you would want to take a look at our MacinCloud guide.

Install the Tabris SDK

Tabris iOS SDK Installer

Before you start, make sure your Mac has the latest Xcode installed. Your next step is to install the Tabris SDK, which will provide you with a project template for Xcode and the required frameworks. Download the Tabris SDK .zip.

In the iOS folder, you’ll find a Disk Image (.dmg) with the Tabris Installer (.pkg). The Installer Package will take care of the rest for you.

Create a Project

New Tabris Project in Xcode

For your convenience we created a Tabris project template with default branding, a basic configuration and an implementation as a starting point for your own App.

To create a New Project in Xcode, select File > New > Project. In the wizard choose the template iOS > Application > Tabris-based Application. On the next page you will need to provide a Product Name (e.g. MyBusinessApp) and a Company Identifier (e.g. com.my-company). On the last page select where you would like to store the project, and you’re ready for the next step.

Customize your App

Customize your App

Xcode should now present a Summary of your App’s Target. You can see the summary anytime by selecting the project item in the Project Navigator on the left and selecting your App’s Target in the editor. Here you can set a Version for your App, specify on which Devices it should run and set the App Icons and Launch Images.

In Apple’s Developer Library you’ll find information on the correct sizes for your images.

Hands-on your application code

Code Hands-On

To get the App to communicate with your server, you need to provide the URL of your server instance (e.g. http://192.168.0.1:8080/com.eclipsesource.tabris.helloworld/helloworld ). All you need to do is change the returned URL of the serverURL method in the AppDelegate.m class. Take a look at TabrisClientDelegates.h to see how you can further interact and configure your Tabris client.

Configure the Tabris Client

The Tabris iOS client will run an instance of TabrisClient. Usually you instantiate the TabrisClient in your UIApplicationDelegate which also implements TabrisClientDelegate and serves a delegate:

    TabrisClient *client = [[TabrisClient alloc] initWithWindow:self.window];
    client.delegate = self;

There are required and optional methods to implement in order to configure the TabrisClient and get it working:

Method

Default

Description

Required
(NSURL *)serverURL The absolute HTTP(S) URL of the entrypoint on the tabris server.
(void)clientDidBecomeReady Called when the Tabris client did become ready and will start a new session.
Optional
(BOOL)logResponses NO Whether the HTTP responses in the client-server communication should be logged to the console and a file in the application document folder.
(BOOL)logRequests NO Whether the HTTP requests in the client-server communication should be logged to the console and a file in the application document folder.
(BOOL)useSSLStrict YES Whether to perform strict validations on SSL connections to the server.
Strict validations include: Certificate expiration, domain name match, and if the certificate is trusted by a CA.
Note: Only applies if HTTPS is used.
(BOOL)useInfiniteRequestTimeout NO Whether the Tabris client should wait infinitely for HTTP requests to return. If set to YES, the number returned by requestTimeout is ignored. Use this during development for debugging. It is not recommended to us this during production.
(NSInteger)requestTimeout 90 The time to wait for a response for an HTTP request, given in seconds. If the time is over, the request is cancelled with a timeout.
Note: Only applies if useInfiniteRequestTimeout returns NO.
(BOOL)useAutoCapitalization Whether to enable auto capitalization for all text widgets in the client. If this method is not implemented, the value in the global preferences applies.
Note: Auto capitalization can be overridden for individual text widgets as well.
(BOOL)useAutoCorrection Whether to enable auto correction for all text widgets in the client. If this method is not implemented, the value in the global preferences applies.
Note: Auto correction can be overridden for individual text widgets as well.
(NSString *)requiredServerId nil The ID to check for the client binding.
If set, the client can only connect to servers with the same ID.
If set to nil, the client can connect to any server (if no ID is set there).
(BOOL)enableReload NO Whether the Tabris client provides a way to manually reload the session.
It can be accessed via a left bezel-swipe and then perform a pull-to-refresh on the list.

Run

Run your Tabris App

After starting the server with HelloWorld, you can confirm that everything worked fine by starting your App in the Simulator or on your connected iOS device.

You should see the small HelloWorld Application rendered with the native iOS client App, with no browser rendering or html involved.

Updating the iOS Launcher

Tabris iOS SDK Installer

To update to a more recent version of the Tabris SDK, just download the most recent Tabris SDK .zip and install it again. The framework files will be installed into /Users/Shared/Tabris and replace the old ones.