You are here

How to build the SDK static library from source code

This task demonstrates how to build the SDK static library from the source code for the iOS SDK. It is recommended however that you use the prebuilt library that is included with the SDK. This task is mainly useful for developers who wish to build a new version of the static library with code changes prior to an official release or for testing their own contributions to the project.

You should have already checked out the Mobile SDK source code. If you wish to build the SDK documentation you will also need to download and install AppleDoc. AppleDoc and instructions on how to install it can be found from the Appledoc website. If you do not wish to build the AppleDoc documentation you will need to edit the build script and comment out the command to build the documentation. The troubleshooting section of this documentation has further information on this.

This task shows you how to build the static library for the Client API and the SDK documentation.
Note: You only need to do this task if you want to rebuild the static library (libAlfrescoSDKv1.4.x.a) that comes with the SDK. The SDK binary distribution includes a prebuilt version of this static library, so that you can get building your applications right away, so this task is optional. It is recommended you use the static library provided with the SDK binary distribution.
  1. Change into the following directory: ~/mobile_sdk/iOS/AlfrescoSDK

  2. Run the following shell command: ./scripts/build_package.sh.

    You may receive an error as follows:

    Error: No developer directory found at /Volumes/Xcode/Xcode.app/Contents/Developer. \
                        Run /usr/bin/xcode-select to update the developer directory path.          
              
    Note: If you want to build a debug version of the SDK use ./scripts/build_package.sh Debug.

    This will build the libAlfrescoSDKv1.4.x.a static library file, which you will link to your applications that require to use SkyVault functionality.

You have now built the libAlfrescoSDKv1.4.x.a static library, in the following locations:
  • ./AlfrescoSDK/build/Release-iphoneos/libAlfrescoSDK-iOSv1.4.x.a
  • ./AlfrescoSDK/build/Release-iphonesimulator/libAlfrescoSDK-iOSv1.4.x.a
  • ./AlfrescoSDK/build/Release-universal/libAlfrescoSDK-iOSv1.4.x.a
  • ./AlfrescoSDK/build/Release-macosx/libAlfrescoSDK-OSXv1.4.x.a
Attention: The library filename generated may contain a slightly different version number. In this documentation libAlfrescoSDK-iOSv1.4.x.a is used, where x represents the minor version of the static library.