OpenedX IOS app can't register

Hello community,

I just setup the openedX ios app with all configurations made, but i am unable to register a new user. When i click register i get this error: Request failed: Optional(<NSHTTPURLResponse: 0x283a05100> { URL: https://www.grassroot.academy/user_api/registration/account/registration/ } { Status Code: 404, Headers {
“Alt-Svc” = (
“h3=":443"; ma=2592000”
);

It looks like the ios app wants to register at this URL: https://www.grassroot.academy/user_api/registration/account/registration/, which is not also accessible in the browser i.e 404.

This is the screenshot when i try to register

This is my ios app config.yaml:
API_HOST_URL: https://www.grassroot.academy # localhost is 10.0.2.2 in Android

ENVIRONMENT_DISPLAY_NAME: Grassroot Academy

PLATFORM_NAME: Grassroot Academy

PLATFORM_DESTINATION_NAME: www.grassroot.academy

FEEDBACK_EMAIL_ADDRESS: contact@www.grassroot.academy

ECOMMERCE_URL: https://ecommerce.www.grassroot.academy

DISCOVERY:

TYPE: webview

WEBVIEW:

BASE_URL: Courses | Grassroot Academy

COURSE_DETAIL_TEMPLATE: https://www.grassroot.academy/courses/{path_id}

PROGRAM_DETAIL_TEMPLATE: https://www.grassroot.academy/courses/{path_id}

PROGRAM:

ENABLED: true

PROGRAM_URL: Authn | null**

PROGRAM_DETAIL_URL_TEMPLATE: https://www.grassroot.academy/dashboard/{path_id}?mobile_only=**true**

AGREEMENT_URLS:

PRIVACY_POLICY_URL: https://www.edx.org/webview/edx-privacy-policy

COOKIE_POLICY_URL: https://www.edx.org/webview/edx-privacy-policy/cookies

DATA_SELL_CONSENT_URL: https://www.edx.org/webview/edx-privacy-policy/do-not-sell-my-personal-data

TOS_URL: https://www.edx.org/webview/edx-terms-service

EULA_URL: https://www.edx.org/webview/eula

SUPPORTED_LANGUAGES:

  • en

DELETE_ACCOUNT_URL: Account |

ANNOUNCEMENTS_ENABLED: true

BADGES_ENABLED: true

CERTIFICATES_ENABLED: true

COURSE_DATES_ENABLED: true

COURSE_SHARING_ENABLED: true

COURSE_VIDEOS_ENABLED: true

DISCUSSIONS_ENABLED: true

DISCUSSIONS_ENABLE_PROFILE_PICTURE_PARAM: true

PUSH_NOTIFICATIONS: true

NEW_LOGISTRATION_ENABLED: true

REGISTRATION_ENABLED: true

TAB_LAYOUTS_ENABLED: true

USER_PROFILES_ENABLED: true

VIDEO_TRANSCRIPT_ENABLED: true

WHATS_NEW_ENABLED: false

IAP_ENABLED: false

SOCIAL_SHARING:

ENABLED: false

WHITE_LIST_OF_DOMAINS:

END_TO_END_TEST:

EMAIL_TEMPLATE: edx-app-test-{unique_id}@simulator.amazonses.com

SPEED_TEST_ENABLED: false

BRAZE:

ENABLED: true

PUSH_NOTIFICATIONS_ENABLED: true

TEST_ACCOUNT:

NAME: staff@example.com

PASSWORD: edx

OAUTH_CLIENT_ID:

APP_UPDATE_URIS:

APP_REVIEWS_ENABLED: true

DOWNLOAD_TO_SD_CARD_ENABLED: true

Hello,

Have you checked on the platform side if all the mobile related configurations are enabled such as combined login and mobile api etc ?

They could be the reason of 404

Hello @chintan i appreciate your response, please can you specify which files i can check. Also this is from my lms.env.yml file: CERTIFICATES_HTML_VIEW: true
PREVIEW_LMS_BASE: “preview.www.grassroot.academy”
ENABLE_COURSE_DISCOVERY: true
ENABLE_COURSEWARE_SEARCH: true
ENABLE_CSMH_EXTENDED: false
ENABLE_DASHBOARD_SEARCH: true
ENABLE_COMBINED_LOGIN_REGISTRATION: true
ENABLE_GRADE_DOWNLOADS: true
ENABLE_LEARNER_RECORDS: false
ENABLE_MOBILE_REST_API: true
ENABLE_OAUTH2_PROVIDER: true
ENABLE_PREREQUISITE_COURSES: true
ENABLE_THIRD_PARTY_AUTH: true
MILESTONES_APP: true
LMS_ROOT_URL: “https://www.grassroot.academy
CMS_ROOT_URL: “https://studio.www.grassroot.academy
CMS_BASE: “studio.www.grassroot.academy”
LMS_BASE: “www.grassroot.academy”
CONTACT_EMAIL: “contact@www.grassroot.academy”
CELERY_BROKER_TRANSPORT: “redis”
CELERY_BROKER_HOSTNAME: “redis:6379”
CELERY_BROKER_VHOST: “0”
CELERY_BROKER_USER: “”

The solution to the problem right now was for me to hardcode the blocks, registration and enrollments values to be equal to v1 in the APIURLVersionConfig file :
@objc class APIURLVersionConfig: NSObject {

let blocks: String
@objc let registration: String
let enrollments: String

init(dictionary: [String: AnyObject]) {

// blocks = dictionary[APIURLVersionKeys.blocks] as? String ??
// APIURLDefaultVersion.blocks.rawValue
blocks = “v1”
// registration = dictionary[APIURLVersionKeys.registration] as? String ?? APIURLDefaultVersion.registration.rawValue
registration = “v1”
// enrollments = dictionary[APIURLVersionKeys.enrollments] as? String ?? APIURLDefaultVersion.enrollments.rawValue
enrollments = “v1”
super.init()
}
}

After that was done, app was going to correct urls without a 404 error.

@Sheriff_Oladejo I am facing issue with config in IOS please guide me i am not able to compile the IOS app and also please guide me what should i put in config values

@Parvin_Kumar What errors are you facing exactly. Paste your ios config.yaml and any errors you are getting when compiling. Sorry, thought i sent this reply 3 days ago.

@Sheriff_Oladejo thanks for your reply i am pasting my config file please guide me i am wrong or write i am not able to compile the code. my repo url ios/default_config at rc/3.2.3 · parvinkumarEdx/ios · GitHub for your reference please guide me how to solve these error or any my config mistake causing this error .
for your reference i am attaching screenshot of error.


Since you are getting an unsupported swift architecture error you might want to check your swift version. I don’t think this has to do with edX internal configurations.

@Sheriff_Oladejo thanks alot please can you also guide me that my config file is good for production use or what changes I have to make into my config. I will check swift issue according to your instructions.
config.yaml (1.4 KB)