Mobile SDK / Endpoint APIs
These FAQs briefly summarise key points regarding using Composr's Mobile SDK to develop mobile apps for your Composr site.
For more information, check out these tutorials:
While covered in the "Themeing" category, you should also check out this tutorial:
For more information, check out these tutorials:
While covered in the "Themeing" category, you should also check out this tutorial:
Question | What is Composr Mobile SDK? |
---|---|
Answer | Composr Mobile SDK (CMS SDK) is a toolkit designed for experienced iOS and Android developers to build mobile apps that integrate with a Composr-powered website. It offers both Composr-specific integrations and a collection of standalone utilities for building apps, providing a common base between iOS and Android akin to the PHP and Composr APIs, enabling easier code porting while maintaining a native experience. |
Question | How can I obtain Composr Mobile SDK? |
---|---|
Answer | The iOS/Android SDK can be found on GitLab at: Composr ecosystem / Composr Mobile SDK · GitLab. To connect to a Composr site, you will need to install the composr_mobile_sdk addon, which is not bundled. This addon provides scripting to generate app assets from the Composr site. |
Question | What is the purpose of the Composr Mobile SDK Toolkit? |
---|---|
Answer | The Toolkit, part of the composr_mobile_sdk addon, aids in mirroring Composr website resources into a mobile app. It includes tools for generating iOS/Android string resources from language files and exporting theme images in a directory structure suitable for iOS/Android app image assets. |
Question | How do I access the server-side API for my mobile app? |
---|---|
Answer | The server-side API can be accessed via HTTP calls to http://yourbaseurl/data/endpoint.php. Results are returned in JSON format. The API utilizes endpoints with a 'hook' name and a 'hook type' categorization. Both REST-style and GET-parameter style requests are supported, with the latter recommended for simplicity. |
Question | How does authentication work with the server-side API? |
---|---|
Answer | Authentication is handled automatically using cookies, similar to regular website requests. If cookies are not feasible, the response parameters device_auth_member_id_cn/device_auth_pass_hashed_cn/device_auth_member_id_vl/device_auth_pass_hashed_vl from the login endpoint can be resent as POST parameters in subsequent requests. |
Question | What are some of the default endpoints available in the server-side API? |
---|---|
Answer | Default endpoints cover various functionalities, including:
Specific details on parameters and response data for each endpoint can be found in the documentation. |
Question | What other approaches exist for mobile integration with Composr? |
---|---|
Answer | Other approaches, in various stages of development, include:
|
Question | What are some key concepts related to mobile app development with Composr? |
---|---|
Answer | Essential concepts include:
|
Question | How do I set up Composr Mobile SDK in my iOS and Android projects? |
---|---|
Answer | iOS (Xcode):
Android (Eclipse):
|
Question | What are the key classes and utilities provided by Composr Mobile SDK? |
---|---|
Answer | CMS SDK provides several classes with utility functions mirroring PHP and Composr APIs, including:
|