Library Installation
Obtaining the library
The ownCloud iOS library may be obtained from the following Github repository:
Once obtained, this code should be compiled with Xcode 6. The Github repository not only contains the library, ownCloud iOS library, but also contains a sample project, OCLibraryExample, which will assist in learning how to use the library.
Add the library to a project
There are two methods to add this library to a project.
-
Reference the headers and library binary file (
.a) directly. -
Include the library as a subproject.
Which method to choose depends on user preference as well as whether the source code and project file of the static library are available.
Reference headers and library binary files
Follow these steps if this is the desired method.
-
Compile the ownCloud iOS library and run the project. A
libownCloudiOS.afile will be generated.
The following files are required:
Library file
-
libownCloudiOS.a(Library)
Library Classes
-
OCCommunication.h(Accessors) Import in the communication class -
OCErrorMsg.h(Error Messages) Import in the communication class -
OCFileDto.handOCFileDto.m(File/Folder object) Import when using -
readFolderandreadFilemethods -
OCFrameworkConstants.h(Customize constants)
-
Add the library file to the project. From the
Build Phasestab, scroll toLink binary filesand select the+to add a library. Select the library file.

-
Add the path of the library header files. Under the
Build Settingstab, select the target library and add the path in theHeader Search Pathsfield.

-
Remaining in the
Build Settingtab, add the flag-Obj-Cunder theOther Linker Flagsoption.

At this stage, the library is included on your project and you can start communicating with the ownCloud server.
Include the library as a subproject
Follow these steps if this is the desired method.
-
Add the file
ownCloud iOS library.xcodeprojto the project via drag and drop.

-
Within the project, navigate to the
Build Phasestab. Under theTarget Dependenciessection, select the `+' and choose the library target.

-
Link the library file to the project target. Under the
Build Phasestab, select the+' under the `Link Binary with Librariessection and select the library file.

-
Add the flag
-Obj-CtoOther Linker Flagsunder the project target on theBuild Settingstab.

-
Finally add the path of the library headers. Under the
Build Settingstab, add the path under theHeader Search Pathsoption.
