This is the sample application for the Liferay iOS SDK.
It's a simple app that displays users in a table view. By clicking on an user, it will display its contact details such as: name, email, birthday and phones. By default, it uses the following credentials to authenticate:
Email: test@liferay.com
; password: test
; server: http://localhost:8080
.
You can change these values in the SettingsUtil.m class.
Most of the interesting code are in MainViewController.m and DetailsViewController.m. In these classes you can see how to create sessions and call portal services.
If you want to make asynchronous requests, take a look on how ContactCallback.m is used.
This project uses CocoaPods to fetch dependencies and the Liferay iOS SDK itself. If you don't want to use CocoaPods, you can download the iOS SDK source code and its dependencies, unzip and add them to your Xcode project, follow the instructions described here.
In order to build with CocoaPods, you have to:
-
Install CocoaPods.
-
Run
$ pod install
from the project root folder. -
This will download the latest version of the SDK and create a .xcworkspace file, use it to open your project in Xcode.
For more information on how CocoaPods works, read their documentation.