Start a new topic

KCSUser RefreshFromServer not reaching completion block

The following code will reach **Inside If** and **Inside Else**, but will not currently reach **Inside Block**:



if (![KCSUser hasSavedCredentials]) {

// Inside If

} else {

// Inside Else

[[KCSUser activeUser] refreshFromServer:^(NSArray *objectsOrNil, NSError *errorOrNil) {

// Inside Block

if (errorOrNil == nil) {

// No Error

} else {

// Error

}

}];

}



Is there something else I am supposed to be doing before refreshing the active user?

Let's try to pin down where your problems are deriving from. For further investigations could you please provide a few more details.



* Which Kinvey library are you using and what version:



* What are you trying to do and which steps are you taking to achieve that? At which step are you seeing the issue?



1. Step 1

2. Step 2

3. ...



* What are you expecting instead:



That information will help us to find an entry point for hunting down this problem. You can also take a look at our various troubleshooting guides at http://devcenter.kinvey.com/ios/guides/troubleshooting



We have numerous samples which demonstrate how login works. You can take a look at one of those and see what is different.



http://devcenter.kinvey.com/ios/samples



You should make sure the `activeUser` is not nil. Try



if (![KCSUser activeUser]) { ...

} else { ... }
Login or Signup to post a comment