When I attempt to execute a deferred oauth login using the react native Salesforce SDK for iOS, neither the success nor the failure callback is called, even when I have successfully completed the login. The result is that the web view remains visible, and I now see the post-log-in homepage. Instead, I would expect it to dismiss the web view, and call either success or failure so that my react code can handle the result appropriately.

I've done some digging into the code and the key problem seems to be in the 'didFinishLoad' method of 'SFAuthenticationManager'. It checks to see if the delegate has the selector 'authManagerDidFinishAuthWebViewLoad' and calls it if it does. But, according to my debugging, the delegate (SalesforceSDKManagerWithSmartStore) never has this selector and 'authManagerDidFinishAuthWebViewLoad' is never called. As a result, I see only references to 'didFinishLoad' in the debug logs and nothing else indicating that the login succeeded or failed.

There is nothing else suspect in the logs, other than a message

Preferences.plist: Error Domain=NSCocoaErrorDomain Code=256 "The file “Preferences.plist” couldn’t be opened... NSUnderlyingError=0x608000053230 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"

Which I assume just reflects the fact that I've never had a successful login.

So the questions: Why isn't the success / failure callback being triggered? Is there something we have to configure within Salesforce to ensure that the SDK can successfully recognize the login success/failure?

  • Having the exact same issue but in hybrid local. SDK 5.1.0.
    – Adam
    May 19, 2017 at 8:46


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.