Wednesday, April 9, 2014

More Open Source! Our New Demo iOS Container

Today we are thrilled to announce a new open source project, an iOS app featuring an F2 Container. Since launching F2, we've had countless conversations about taking advantage of the framework across all devices and platforms. App reusability is core to F2 and extending that reuse to mobile platforms is an important part of building modern applications with F2.

We've used this iOS Container demo app to proof of concept two primary things: the loading of F2 apps and the communication between them (i.e., F2 Context). The iOS app demonstrates how quickly and easily F2 apps can be integrated in a native environment with the communication layer remaining intact. Let's break it down.

As you can see in the screenshot below, we're loading four F2 example apps in a single view. These are the same example apps used on and included in the Examples download. No changes were made to these apps to support iOS integration.

All that is shown in blue along with the "Search for Company" field are native components. The search field queries a lookup API and uses the CONTAINER_SYMBOL_CHANGE event in F2 when you tap on a result. (All of the apps are already listening for that event per the F2 specification.)

Using individual UIWebViews and creating each web view's HTML on-the-fly with embedded dependencies fetched from the AppManifests, the iOS app demonstrates how performance isn't a concern when loading n number of F2 apps on iOS. Additionally, iOS 7's broader support for JavaScript allows deeper integration between the native and web environments and passing of F2 Context is seamless.

If you look closely, notice the little blue "i" in the bottom right corner. When tapping that button, the Stock News app flips over and you're able to either choose between Stock or Market News, or to provide your own F2 AppManifest for no-code-changes-required demos.

A couple of other notes:
  • A full set of (auto) docs are available in the project (documentation.html)
  • This app currently only supports iOS 7 and iPad in landscape orientation.
  • Apple doesn't permit ad hoc betas or trials through the App Store, so if you want to install this on your iPad, you'll need to get the source from GitHub into Xcode.
  • If you wanted to replace all of the UIWebViews with your own apps, replacing them is as simple as providing an AppConfig like this for the watchlist app.
  • Just like F2, anyone is free to download this project. The same license applies to iOS Container—Apache v2 and © Copyright 2014 Markit On Demand.
Browse over to the GitHub project—OpenF2/iOS-Container—for all the source code, docs, and the app itself. The F2 Team would welcome any Pull Requests or Issues on this demo iOS app, and you can reach us at for specific questions.

No comments:

Post a Comment