Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit 25a2367

Browse files
committed
docs: Update mobile application install instructions
1 parent a69127d commit 25a2367

File tree

3 files changed

+269
-246
lines changed

3 files changed

+269
-246
lines changed

en_us/install_operations/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ release.
4040

4141
ecommerce-deprecated/index
4242
insights/index
43+
mobile-deprecated
4344

4445
.. include:: ../../links/links.rst
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
.. _Deprecated Mobile Applications:
2+
3+
############################################
4+
Deprecated Open edX Mobile Applications
5+
############################################
6+
7+
.. warning::
8+
The following instructions refer to the older, now unsupported,
9+
mobile applications. They were last supported in the Quince release.
10+
11+
Please see :ref:`Setting up the Mobile Applications` for more on the current apps.
12+
13+
Deprecated Mobile Applications
14+
******************************
15+
16+
Accessing the Source Code
17+
=========================
18+
19+
The deprecated mobile applications, one for iOS and one for
20+
Android, are below. You can find the source code and additional documentation for each
21+
application in the following repositories.
22+
23+
* iOS (`iOS app deprecation ticket <https://github.com/openedx/public-engineering/issues/260>`_): http://github.com/openedx-unsupported/edx-app-ios
24+
25+
* Android (`Android app deprecation ticket <https://github.com/openedx/public-engineering/issues/261>`_): http://github.com/openedx-unsupported/edx-app-android
26+
27+
28+
Configuring Mobile Application Features
29+
=======================================
30+
31+
For the mobile API and authentication to work correctly with the edX mobile
32+
applications, you enable them in the ``edx/app/edxapp/lms.yml`` file. You
33+
then complete the setup for authentication by creating OAuth clients and
34+
adding their IDs to the custom configuration file of each mobile application.
35+
36+
Enable Mobile Application Features
37+
----------------------------------
38+
39+
.. note:: Configuration settings added to the ``lms.yml`` file are reset
40+
to their default values when you use Ansible to update edx-platform.
41+
42+
To enable the mobile application features, follow these steps.
43+
44+
#. In the ``edx/app/edxapp/lms.yml`` file, add the following lines to the
45+
features section.
46+
47+
.. code-block:: none
48+
49+
"FEATURES" : {
50+
...
51+
"ENABLE_MOBILE_REST_API": true,
52+
"ENABLE_OAUTH2_PROVIDER": true,
53+
"ENABLE_COMBINED_LOGIN_REGISTRATION": true
54+
  }
55+
56+
If you are running in a non-SSL environment, you can set
57+
``"OAUTH_ENFORCE_SECURE": false``. This configuration setting should never be
58+
set to ``false`` in anything other than a development environment.
59+
60+
#. Save the ``edx/app/edxapp/lms.yml`` file.
61+
62+
#. Restart the server.
63+
64+
.. future: add server- and client-side configuration for Google and Facebook sign in, incl. add ``"ENABLE_THIRD_PARTY_AUTH": true`` to the ``"FEATURES"`` list
65+
66+
.. _Create the OAuth Clients:
67+
68+
69+
Create the OAuth Clients
70+
------------------------------
71+
72+
You create an OAuth client ID and secret that are specific to your
73+
installation for use by the mobile applications. The procedure that follows
74+
assumes that you create a different client for each of the edX mobile
75+
applications.
76+
77+
Before you can create OAuth clients, a superuser must exist on the server. For
78+
more information, see `edX Managing the Full Stack`_.
79+
80+
To create your OAuth clients, follow these steps.
81+
82+
#. Log in to the Django administration console for your base URL. For example,
83+
``http://{your_URL}/admin``.
84+
85+
#. In the **Oauth2** section, select **Clients**.
86+
87+
#. Select **Add client**. A dialog box opens with the **Client id** and
88+
**Client secret** populated for the new client.
89+
90+
#. Enter a **Url** and **Redirect Url** for the first mobile application. For
91+
example, ``https://{your_URL}/api/mobile/{version}/?app=ios``. While the
92+
console requires values for these fields, they are not used by the edX
93+
mobile applications. You can enter the same value in both fields.
94+
95+
#. For the **Client type**, select **Public**.
96+
97+
#. Optionally, enter a **User** and an identifying **Name**.
98+
99+
#. Select **Save and add another**.
100+
101+
#. Repeat steps 4-6 for the second mobile application, and then select
102+
**Save**.
103+
104+
Configure the Applications with OAuth Client IDs
105+
------------------------------------------------
106+
107+
The procedure that follows assumes that you have a different OAuth client ID
108+
for each edX mobile application.
109+
110+
To configure each edX mobile application with its OAuth client ID, you add a
111+
setting to its custom configuration .yaml file. For information about how to
112+
set up custom configuration directories and files, see the GitHub repositories
113+
for `iOS`_ and `Android`_.
114+
115+
#. Obtain the OAuth client ID for the first mobile application from your
116+
Django administration console. For more information, see :ref:`Create the
117+
OAuth Clients`.
118+
119+
#. In your custom GitHub configuration directory, edit the .yaml file for the
120+
first mobile application. For example, for the edX mobile application for
121+
iOS, edit your ``ios.yaml`` file.
122+
123+
#. Add the following line to the .yaml file.
124+
125+
::
126+
127+
OAUTH_CLIENT_ID: '{client_id_for_iOS_app}'
128+
129+
#. Save the file.
130+
131+
#. Repeat steps 1-4 for the second mobile application.
132+
133+
134+
135+
.. _Configure OAuth Token Expiration Days:
136+
137+
Configure OAuth Token Expiration
138+
-----------------------------------
139+
140+
When OAuth tokens expire, learners who use the mobile apps to access your site
141+
must log in again.
142+
143+
The ``lms/envs/common.py`` file includes the default configuration settings for
144+
the number of days before OAuth tokens expire for confidential clients and
145+
public clients. Instead of modifying the defaults in ``lms/envs/common.py``, add
146+
the configuration settings to the ``lms.yml`` file and set values that will
147+
override the default settings.
148+
149+
To configure the number of days before OAuth tokens expire, follow these steps.
150+
151+
#. In the ``edx/app/edxapp/lms.yml`` file, add the following lines to
152+
specify the number of days that OAuth tokens remain valid for confidential
153+
or public clients.
154+
155+
.. note:: Make sure you add these lines at the top level of the JSON
156+
dictionary, and not inside any other declarations.
157+
158+
159+
.. code-block:: none
160+
161+
"OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS" : 365
162+
"OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS" : 30
163+
164+
#. Save the ``lms.yml`` file, then restart the edxapp app.
165+
166+
The values that you defined in ``lms.yml`` override the default
167+
values defined in ``lms/envs/common.py``.
168+
169+
170+
.. _Configuring Video Modules for Mobile:
171+
172+
Configuring Video Modules for Mobile
173+
=====================================
174+
175+
Course videos must be specifically prepared to ensure that they are in
176+
mobile accessible formats. Video modules in mobile-available courses should
177+
have low resolution encodings that are readily accessible by mobile
178+
devices.
179+
180+
After you obtain a low resolution encoding for a video file and post it
181+
online, your course team can add its location to the video module that
182+
includes the video in the course structure.
183+
184+
* To configure a video module in edX Studio, you edit the video component. On
185+
the **Advanced** tab, in the **Video File URLs** field, enter the URL to the
186+
mobile-targeted video as the first URL in the list. For more information, see
187+
:ref:`Working with Video Components` in *Building and Running
188+
an Open edX Course*.
189+
190+
* To configure a video module by editing the course XML, enter the URL to the
191+
mobile-targeted video as the first URL in the list of ``html5_sources``. For
192+
more information, see :ref:`Video Components` in the *edX
193+
Open Learning XML Guide*.
194+
195+
Enabling Push Notifications
196+
=============================
197+
198+
You enable push notifications on the server and then configure each of the edX
199+
mobile applications. Currently, you can use Parse for notification delivery.
200+
201+
The procedures that follow assume that you have obtained an application ID,
202+
REST API key, and client key from Parse.
203+
204+
Enable Push Notification on the Server
205+
-----------------------------------------
206+
207+
To enable the push notification feature, follow these steps.
208+
209+
#. In the ``edx/app/edxapp/studio.yml`` file, add the following lines.
210+
211+
.. code-block:: none
212+
213+
PARSE_KEYS = {
214+
"APPLICATION_ID": "{app_id}",
215+
"REST_API_KEY": "{API_key}"
216+
}
217+
218+
2. Save the ``edx/app/edxapp/studio.yml`` file.
219+
220+
#. Restart the server.
221+
222+
#. Log in to the Django administration console for your Studio URL. For
223+
example, ``http://studio.{your_URL}/admin``.
224+
225+
#. In the **Contentstore** section, select **Push notification configs**.
226+
227+
#. Select **Add push notification config**.
228+
229+
#. Verify that **Enabled** is selected, and then select **Save**.
230+
231+
Configure Push Notification on the Clients
232+
-----------------------------------------------
233+
234+
The procedure that follows assumes that you use a single set of Parse
235+
credentials for both of the edX mobile applications.
236+
237+
You add push notification settings to the applicable custom configuration
238+
.yaml file. For information about how to set up custom configuration
239+
directories and files, see the GitHub repositories for `iOS`_ and `Android`_.
240+
241+
#. In your custom GitHub configuration directory, edit the .yaml file that
242+
stores configuration settings that are common to both of the edX mobile
243+
applications. For example, edit your ``shared.yaml`` file.
244+
245+
#. Add the following lines to the .yaml file.
246+
247+
::
248+
249+
PARSE:
250+
NOTIFICATIONS_ENABLED: true
251+
APPLICATION_ID: {your application id}
252+
CLIENT_KEY: {your client key}
253+
254+
PUSH_NOTIFICATIONS: true
255+
256+
#. Save the file.
257+
258+
.. include:: ../../links/links.rst

0 commit comments

Comments
 (0)