Skip to Content

Problems authenticating with app generated using the iOS SDK assistant

I am able to generate an app using the sample service now and I'm able to authenticate with the app and I get data. However, if I use any other back end service, the app is generated but when I enter my credentials and log in I get an alert that says my credentials failed. I've tried backend services that require basic authentication and services, like Northwind, that require no authentication. I get the same result. I'm able to access the data from inside the mobile services cockpit so I don't think there is an issue with the destinations and I hard coded my user id and password to make sure I wasn't repeatedly mistyping my password. I get this in the console:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}

SAPURLSessionDelegateDispatcher.swift.sapSessionTask(for:) - Wrapper SAPURLSessionTask is found for taskIdentifier: 1

2017-06-01 12:27:15.428482-0500 erpSimCloud[15957:522283] [general] # SAP.Foundation.SAPURLSession.SAPURLSessionDelegateDispatcher - DEBUG - (0x60000046aac0) - SAPURLSessionDelegateDispatcher.swift.urlSession(_:task:didCompleteWithError:) - SAPURLSessionTask's finishBehaviour: initial

2017-06-01 12:27:15.429255-0500 erpSimCloud[15957:522283] [general] # SAP.Foundation.SAPURLSession.SAPURLSessionDelegateDispatcher - DEBUG - (0x60000046aac0) - SAPURLSessionDelegateDispatcher.swift.callCompletion(_:task:error:completionHandler:) - Enumerating didCompleteWithError observers and delegate with error: nil

When this code executes:

guard let response = response as? HTTPURLResponse, response.statusCode == 200 else {
                let message: String
                if let error = error {
                    message = error.localizedDescription
                } else {
                    // default error mesage if no error happened
                    message = NSLocalizedString("keyErrorLogonProcessFailedNoResponseBody", value: "Check your credentials!", comment: "XMSG: Body of alert message about logon process failure.")
                self.displayAlert(title: NSLocalizedString("keyErrorLogonProcessFailedNoResponseTitle", value: "Logon process failed!", comment: "XTIT: Title of alert message about logon process failure."),
                    message: message)

error is nil and it looks like the response object is empty. I'm new to xcode and swift so it could be I just don't know how to check the contents of that object.

I've downloaded the latest SDK release. Is it possible that it has a bug?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 01, 2017 at 06:25 PM


    I changed the authentication method to none and generated an application. Now I get the list of collections but if I try to access one I get a 403 - Backend connection is not mapped for this application configuration. Odd, since I can use the OData Application Destination Test in the application definition to retrieve the data.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 01, 2017 at 07:30 PM


    If I create the app definition in the cockpit, I can't get it to work. However, if I let the assistant create the app and set the authentication to none, it works.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 14, 2017 at 07:30 AM

    Hi Ross,

    What kind of OData service are you using? Maybe for the first time you had a misconfigured application on the server, and that caused the issue. Could you please share with us some additional details?


    Add comment
    10|10000 characters needed characters exceeded