Sybase Mobile Evangelist

Ian Thain

Subscribe to Ian Thain: eMailAlertsEmail Alerts
Get Ian Thain: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: iPhone Developer, iPhone for Business, iPhone Developer Summit, Mobile Enterprise Application Platforms, iPhone Apps on Ulitzer

iPhone Apps: Article

Building the iOS Application

Sybase Unwired Platform Article Series #6

Welcome to article number 6 in my series of 8, covering the creation of an Enterprise iOS application using the Sybase Unwired Platform, with the ability to synchronize data. So far I have covered the overview of a Mobile Enterprise Application Platform (MEAP) and the benefits it brings to Enterprise Mobility Projects. I have also covered basic synchronization and the concept & creation of the abstraction of data from devices by the Mobile Business Object (MBO). Lastly I mentioned how the Sybase Unwired Platform could create an Object-API Wrapper of Objective-C (for iSurvey) to access the data and manage synchronization etc... and now lets see an overview of how we can use it to build an application.

Both the generated header files & implementation code in Objective-C (shown in the last article) are copied over to the Mac environment along with three libraries libclientrt.a, libSUPObj.a and libMO.a. The user interface can be created just the same as any iOS development, with either code in Objective-C or Interface Builder. The developer can then use the Objective-C Wrapper API's to populate their application.

Below is an example of some initial Objective-C code that initializes the Messaging and the local Database, then logs into the SUP Unwired server, where our MBO's have been deployed. Because I have used Personalization on at lest one of the MBO's this is also where I would pull a username to place in the suid_pk personalization key. Finally a subscription is made and the remote database is created & populated with the specific data it needs from consolidated database in the back-end, via the MBO's that were defined on the Unwired Server.

Some Initial Code

 

NOTE - I have simplified the code for this article. I suggest you should check out the SUP Developer Reference for iOS here

Now the data is located in the remote database (SQLite) on the device we need to access it. Again the API supplies easy ways to get the data, so that it can be used in for example, TableViews. Here is another code example.

More Code

Please check back weekly on a Friday for the next article and please follow me on Twitter @ithain

More Stories By Ian Thain

As one of the Sybase Technical Evangelists, Ian regularly addresses technical audiences all over the world and his sessions are always very well attended. He also writes education classes, whitepapers, demos and articles for various Sybase products and publishes regularly in Journals such as SYS-CON's PBDJ and International Developer Magazine. He is also the Sybase Unwired Platform & PocketBuilder Evangelist and works closely with the team in Dublin, CA and Concord, MA on new features and demonstrations for the products. In his customer-facing Evangelist role, Ian is very involved with the design, production and testing of Enterprise class Unwired Solutions, that have been implemented using Sybase's Unwired tools for Sybase customers around the globe. In addition, Ian is a dedicated technical expert continually working with Sybase's key partners and clients to enhance the capabilities of the Unwired solutions that Sybase can offer to its customers. Ian can also be found on Twitter @ithain