Technical Blog Post
Hello CMIS: Going Mobile with iOS and Swift
With the release of IBM Content Navigator on Cloud, customers are embracing the concept of cloud for managing their documents. With IBM, they know the documents will be secured and hosted in an enterprise class data center. The first 2 CMIS articles - "Hello Document" and "Developing Content Navigator on Cloud solutions" - I introduced the concept of CMIS in very easy to use examples. This article takes a different approach and jumps right in with a more functional application that you can use as a base for your first iPhone application.
Note that by utilizing Swift, this solution will not run on older versions of iOS. This sample was created with Xcode 6.0 running on a Mac.
Apache Chemistry makes it easy
As with the previous articles on CMIS, the Apache Chemistry Open CMIS library is the key to working with CMIS on the iPhone. This is extremely helpful for developers because it eliminates the need to learn a different API for every platform. Once you begin to understand OpenCMIS, you can quickly create apps running on any supported platform.
Step 1: In Xcode 6.0, create a new Single View Application named CMIS_Sample.
Step 2: Download Objective CMIS and add the CMIS header files to your project
Step 3: Add the binary libraries libObjectiveCMIS.a and SystemConfiguration.framework to the Build Phases
Step 4: Create a bridging header file to use the Objective-C based CMIS APIs within your Swift code.
Step 5: Add the Path to the bridging header file to the "Objective- C Bridging Header" property in your project's Build Settings
Step 6: In the bridging header file, import all the CMIS classes that are required for the project.
Step 7: Build your own custom app!
That last step is really the hard part. To help out there, I have attached a sample application that enables the user to browse files and folders from their iOS device. Code for the sample application can be found here. Below is a screen shot of the running application.
CMIS Development Forum - ask questions, get answers.