Leveraging the Benefits of Apple iWatch — Easy Compatibility with Titanium App!!!

The growing craze for Apple products across the masses has left the people addicted and aspiring for any and every product launched by Apple. One such product being the Apple iWatch is simply a show stealer these days. Anyone who sees or wears an Apple iWatch is simply in love with it. You get to receive and respond to several notifications instantly; you can easily keep a track over your daily activities using the Apple iwatch. It gives you the freedom to access and control your music using the power of your voice and the advance technology of the watch in your hand. There are a huge lot of things that can be done over the Apple watch like paying your grocery bills, sharing and accessing important information and much more!!!

Mobile Application platform provider Appcelerator offered a cloud based toolkit to promote the Titanium development and the running of the mobile optimized apps for the Apple watch, a device that almost does everything, however that too without a browser. The Titanium app is one such offering by the Appcelerator itself that is emerging as one of the most popular tool aiding developers to create native applications for mobile devices such as the Apple watch. Titanium is a cross-platform JavaScript PI framework that is used to highlight the development over the iOS, especially in the latest and mounting Apple watches, being the most innovative mobile device from the house of apple.

With Titanium App you can effectively write a native application:

The Titanium framework makes use of a combined JavaScript API along with platform oriented and native presentation blended together. In order to get closer to Titanium as a framework in popular mobile devices such as the Apple watch, we must understand the concept behind it offering a higher level of performance oriented result.

“Titanium is accessible and outstanding”

As by now, we have a fair understanding about the exclusive approach that Titanium’s mechanism as a platform, you would be able to recognize the influence of it, on the Apple watch and many more!

Titanium App largely works being steady and constant, without bringing up the need to change, which is indeed another plus point, offering a large opportunity for the users to rely on using it. It compiles really well along with the Apple watch kit. Executing the functions as expected, in simpler words the Titanium App could work well with the Apple watch, owing to its structure and use.

Along with the numerous incredible and commendable enhancements offered earlier, this particular release enlightens the bundling and communication with the Apple watch OS 2 App. The concept of having a watch app for the very own homegrown Titanium Apps, can be a fantastic experience, once you get to know how they communicate and enlighten each other.

This is how it works:

While talking about innovation, this era has also seen the Apple Watch OS2 that runs quite independently over the Watchkit Extension over the Apple’s watch. Using the Titanium app, you would communicate the similar existing framework.

The Addition of the watch app over to the Titanium App

This project would be projected to be termed as Apple Companion app and watch. It doesn’t require being identical to the existing Titanium app.

How to launch a Titanium App along with its Watch App:

A step by step guide to run the titanium App along with the watch app:

In order to run both the Titanium App along with the watchOS 2 app from the CLI, you would still maintain the XCode 6 installed, to be opted for and used the iOS version, your pick being the iOS 9 SDK found in the Xcode 7.

The launch watch app option would cater to the launch of the Watch App simulator, while combining it along iOS Stimulator and installing as well as launching your app. In the studio zone, just opt for highlighting the 9.0 iPhone along with the Watch Simulator pair. Now you get towards pairing your iPhone along with Apple Watch Device that could be slightly a time consuming one.

Making a provision:

To start with, you would need an iPhone running iOS 9 and pair it along the Apple watch that runs on watch OS 2. After this you need to arrange for the UUID for provisioning profiles in tiapp.xml.

How to Deploy:

This step is similar to the normal process like using the iOS 9 SDK and then uses the similar provisioning profile.

Communication between the Titanium and the Watch App:

After learning about the running of this sample, we have arrived closer to witness the way it works:

You just need to open the Watch App and Extension in the Xcode 7.

On the storyboard, you would get to see the App glances along with the notifications.

How to connect to the Titanium App:

Watch connectivity is offered in the header, wherein you see the watch connectivity \, wherein you would find the entire notifications, images and glances over the storyboard.

Send to the Titanium App

Coincide with the watch process “#pragma mark” and you will locate the 4 procedures in 4 toggles in the UI call. They reveal the 4 processes of WC Session in order to send a message file or renew the application Context.

Receive from the Titanium App:

Right under #pragma mark watch that passes on, one endures along with the delegates that pay attention and notifies the events expected from the Titanium App. You would also see events of a file or user Info that would exhibit been transferred successfully.

Transmitting to the Watch App

The event listeners for the various toggles demonstrate in order to get through the methods to send files and information to the Watch App. As you can observe, you can explore through the “CANCEL” methods. You can just test them in case your Watch is not reachable or due to something else the data can’t be transmitted to the Watch and is in the queue.

Tags:titanium app development


Originally published at blog.mobiloitte.com on December 6, 2015.