2

When this happens during oauth on iPad, clicking the Not You link and reentering the username/pwd takes the user to a full screen web view of the Salesforce UI instead of my mobile app!!! Ugh!

So I'm trying to understand some of the methods and properties in SFAuthenticationManager.h in order to see what I might use to fix this bug. What might be useful? And how are methods like - (void)appDidEnterBackground:(NSNotification *)notification; that are declared in this header used? Does the existence of this method mean that my app should send a notification to SFAuthenticationManager when it did enter background etc.?

EDIT added: The remote access auth happens and then I get the login screen again. My first step it to get to a place where I can reliably repro. the remote access auth error, which more often happens after I've had the iPad closed for some time. Also getting every time the app starts: "WARN|SFRootViewManager|view controller ((null)) not found in the view controller stack. No action taken." but that warning seems benign?

EDIT added: Here is the error I'm getting which seems to happen prior to the Remote Auth Error, then logging back in to the web

2014-10-01 16:35:32:177 iPath[3381:60b] ERROR|SFCrypto|App id keychain data missing or corrupted. Attempting to reset.

2014-10-01 16:35:32:192 iPath[3381:60b] ERROR|SFKeychainItemWrapper|Error adding keychain item: (-34018)

2014-10-01 16:35:32:192 iPath[3381:60b] WARN|SFCrypto|Could not save the base app identifier to the keychain (result: Unknown status code (-34018)). Retrying.

2014-10-01 16:35:32.204 iPath[3381:60b] SFOAuthCredentials:tokenForKey: (-34018) error retrieving "com.salesforce.oauth.access" item matching "{ acct = "iPath-Default-login.salesforce.com"; class = genp; "m_Limit" = "m_LimitOne"; "r_Attributes" = 1; svce = "com.salesforce.oauth.access"; }"

2

When this happens during oauth on iPad, clicking the Not You link and reentering the username/pwd takes the user to a full screen web view of the Salesforce UI instead of my mobile app!!! Ugh!

I've seen this too. It's been a problem for years but I'm not sure that it's specific to iOS.

I'm not sure I see how remote access authorization errors are related here. Normally a remote access authorization error means that your OAuth remote access app has a malformed, missing, or invalid client ID, no? And when it does happen, you're shown an error page and you never see the login screen. Perhaps you are seeing two separate issues here?

And how are methods like - (void)appDidEnterBackground:(NSNotification *)notification; that are declared in this header used? Does the existence of this method mean that my app should send a notification to SFAuthenticationManager when it did enter background etc.?

No. Those are callbacks for NSNotificationCenter subscriptions. You are not meant to invoke them manually; they are called in response to notifications posted about certain UIApplication lifecycle events (in this case, UIApplicationDidEnterBackgroundNotification).

| improve this answer | |
  • I think you're probably right in that's its likely 2 issues. My app is configured like the SDK 2.1 out of the box, to login in again automatically if a logout is initiated so I'm guessing that's what's happening. I've updated my Q with more detail about the remote access auth error. Thanks for the clarification on the 2nd point. Appreciate your help. – Brad Thomas Oct 1 '14 at 13:29
  • I've added a debug trace to my question, I'm also going to post that as a separate question – Brad Thomas Oct 2 '14 at 16:00
  • @Jhersh at this link you say "refresh the login webview" developer.salesforce.com/forums/… How do I refresh the login webview? – Brad Thomas Oct 9 '14 at 1:52
  • 1
    @BradThomas I meant just reload the currently visible page (the login screen). – Jonathan Hersh Oct 9 '14 at 15:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.