The iOS Apstrata SDK is a utility that is provided to developers of iOS-based applications. The iOS Apstrata SDK wraps the Apstrata REST APIs making it very easy to call these latter from within Objective C code.
The iOS SDK is provided as source code: an interface "apstrata.h" and an implementation class "apstrata.mm". All you need to do is to add this code to your own and compile it.
- Drop the client library into you code,
- Create an instance of "ApstrataiPhoneClient" passing it the URL of the Apstrata server, the key and secret of the Apstrata account you are using and the expected authentication mode (more on authentication with Apstrata).
- Call one of the methods exposed by the Android client.
Click here to download the iOS Apstrata SDK source code. The source code ships with a sample file.
The iOS Apstrata Client provides the following methods:
|callAPIMethod||Invokes an Apstrata api by specifying the api name and parameters. This is the generic serving all-purposes method of the iOS client.||A string representing the response sent by the API|
|callAPIJson||Similar to the above except that it returns the response in JSON format||Same as above. You do not need to specify the expected returned format of the response.||A string representing the response sent by the API, in JSON format|
|callAPIXml||Similar to the above except that it returns the response in XML format||Same as above. You do not need to specify the expected returned format of the response.||A string representing the response sent by the API, in XML format|
|callAPIFile||This method is used typically to download a file||An buffer of bytes (NSData*)|
|getFullApiUrl||Use this method to retrieve the URL of a file attached to a document stored in your account|
Same as callAPIMethod.
|A string representing the url of the API call (useful to download an attached file)|