Author: fmui
Date: Wed Dec 12 11:26:19 2012
New Revision: 1420621
URL: http://svn.apache.org/viewvc?rev=1420621&view=rev
Log:
Insert ObjectiveCMIS page content
Modified:
chemistry/site/trunk/content/objective-c/objectivecmis.mdtext
Modified: chemistry/site/trunk/content/objective-c/objectivecmis.mdtext
URL:
http://svn.apache.org/viewvc/chemistry/site/trunk/content/objective-c/objectivecmis.mdtext?rev=1420621&r1=1420620&r2=1420621&view=diff
==============================================================================
--- chemistry/site/trunk/content/objective-c/objectivecmis.mdtext (original)
+++ chemistry/site/trunk/content/objective-c/objectivecmis.mdtext Wed Dec 12
11:26:19 2012
@@ -16,5 +16,159 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
-# Welcome to ObjectiveCMIS
-Apache Chemistry ObjectiveCMIS is a CMIS client library for Objective-C.
\ No newline at end of file
+#Welcome to Apache ObjectiveCMIS
+
+
+## Introduction
+
+Apache Chemistry ObjectiveCMIS is a CMIS client library for Objective-C
language.
+
+The library is primarily targeted at iOS application development and aims to
provide an interoperability API to CMIS based repositories.
+
+However, as the base library is built on the Foundation.framework it can be
used for developing Mac OSX applications as well.
+
+
+### Where to get it from
+
+TBD
+
+### Get ObjectiveCMIS code
+
+* binary distribution
+
+* source code distribution
+
+
+### What the library contains
+
+The ObjectiveCMIS library is distributed as a ZIP file containing
+
+* the library: _libObjectiveCMIS.a_
+
+* public header files: contained in the _ObjectiveCMIS_ folder
+
+* documentation: provided as a docset (generated using appledocs).
+
+
+
+### Minimum Requirements
+
+The library is making use of Objective-C automated reference counting (ARC).
Therefore the library is compatible with iOS SDK v5.x or later.
+
+For development we recommend the latest available version of XCode and iOS/Mac
OSX SDKs.
+
+
+### How to include the library on your XCode project
+
+The easiest way to include the ObjectiveCMIS library into your project is to
unzip the ObjectiveCMIS ZIP file.
+
+Then go to the 'File' menu in XCode and select the 'Add Files toâ¦' option.
Add the headers and library files contained in the ZIP distribution to your
project:
+
+* Make sure that the library is included in the list of frameworks/libraries.
Select the build target and go to Build Phases. libObjectiveCMIS.a should be
listed in the Link Binary with Libraries option.
+
+* The CMIS headers should be included in the 'Copy Headers' section of Build
Phases for your build target.
+
+
+
+## Getting Started
+
+
+### Block based structure
+
+ObjectiveCMIS calls to CMIS repositories are asynchronous. Callback handling
is facilitated utilising _block_ structures available in Objective-C. Further
information on the use of blocks in Objective-C can be found directly at
[http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Blocks/Articles/00_Introduction.html]
+
+
+### At the Beginning - There is a CMIS Session
+
+It all starts with establishing a session to the CMIS repository. The class to
facilitate this is 'CMISSession'.
+
+The code snippet below demonstrates how to create a session with a minimum set
of parameters (used for access/authentication)
+
+
+ CMISSessionParameters *params = [[CMISSessionParameters alloc]
initWithBindingType:CMISBindingTypeAtomPub];
+
+ params.atomPubUrl = [NSURL URLWithString:cmisAtomPubLocation];
+
+ params.username = @"<yourusername>";
+
+ params.password = @"<yourpassword>";
+
+ params.repositoryId = self.repositoryId;
+
+
+
+ //Connect to session
+
+ [CMISSession connectWithSessionParameters:params
completionBlock:^(CMISSession *session, NSError *error){
+
+ if( nil == session )
+
+ {
+
+ //do your error handling here
+
+ }
+
+ else
+
+ {
+
+ self.session = session;
+
+ }
+
+ }];
+
+
+#### How to get to the repository ID
+
+In the code above you may have noticed that we used the repository ID in the
session parameters. This is a required parameter to be passed into the
'connectWithSessionParameters:completionBlock:' method. CMISSession provides a
convenience method to retrieve the repositories. This is demonstrated in the
code snippet below.
+
+
+ __block CMISSessionParameters *params = [[CMISSessionParameters alloc]
initWithBindingType:CMISBindingTypeAtomPub];
+
+ params.atomPubUrl = [NSURL URLWithString:cmisAtomPubLocation];
+
+ params.username = @"<yourusername>";
+
+ params.password = @"<yourpassword>";
+
+ [CMISSession arrayOfRepositories:params completionBlock:^(NSArray *repos,
NSError *error){
+
+ if(nil == repos)
+
+ {
+
+ // error handling
+
+ }
+
+ else
+
+ {
+
+ CMISRepositoryInfo repoInfo = [repos objectAtIndex:0];
+
+ params.repositoryId = repoInfo.identifier;
+
+ [CMISSession connectWithSessionParameters:params
completionBlock:^(CMISSession *session, NSError *sessionError){
+
+ if(nil == session)
+
+ {
+
+ }
+
+ else
+
+ {
+
+ self.session = session;
+
+ }
+
+ }];
+
+ }
+
+ }];