Closed ls-jamie-hill closed 7 years ago
It should remember.. Are you sure you don't call "invalidateSession" somewhere?
Yes, we're not calling invalidateSession anywhere. Anything else that may cause this?
Could you verify that this is also a problem on device and not only on the simulator?
Yes, this is with a device. We are not using the simulator.
Could it be that you wipe any of our data, such as our core data stack? The SDK is also dependent on identifierForVendor to stay the same between launches. Do you have the same problem in our sample app?
No, we wouldn't be wiping any data. I'll give the sample app a try and see if we hit the same issues. Does that use enforcedUserAccount too?
Might not (something we should update). But you can always mod it.
So after a bit of testing, if I don't use enforcedUserAccount then it works as expected - it prompts the first time for credentials and then doesn't prompt on subsequent. However, if I use enforcedUserAccount then it prompts every time for the password.
Essentially we have a step in our system to request the email to enforce, then we set it in the SSKeychain for subsequent uses:
[[iZettleSDK shared] setEnforcedUserAccount:email];
[KPCredentialStorage setiZettleEnforcedUserAccount:email];
then for init:
NSDictionary *configuration = [[NSBundle mainBundle] infoDictionary];
[[iZettleSDK shared] startWithAPIKey:configuration[@"iZettleAPIKey"]];
NSString *enforcedEmail = [KPiZettlePairDevice enforcedUserAccount];
[[iZettleSDK shared] setEnforcedUserAccount:enforcedEmail];
then we find that it prompts every time for the password for that account on each payment.
Have you tried with different enforcedEmail users. I'm thinking it might be some string comparison that fails for some reason. What are the account(s) your are using for testing?
Also, for verification, are you running on the latest version of the SDK (1.2.3)
The email being used for enforced email is externaldemo123@izettle.com
. That is the only account we have been provided.
We are running the latest 1.2.3 SDK.
I downloaded the latest SDK and modded the sample app to enforce the user by adding:
[iZettleSDK shared].enforcedUserAccount = @"externaldemo@izettle.com";
[[iZettleSDK shared] chargeAmount:amount ....
before "chargeAmount:" and it works as expected. Could you try to use the above, i.e. hardcode the enforcedUserAccount value to test if it makes a difference?
Hi again, did you find a solution to your problem?
The way it works without enforcedUserAccount is suitable for us at this stage. If we revisit then we'll try the updated example and let you know.
When I using enforcedUserAccount In Payment option login screen the password not stored hence, every time the user has to type the password. please let us know why izettle sdk is not storing the password.
We are using enforcedUserAccount as recommended in the docs, but we are presented with the login form (email locked) on every transaction. How can we keep the logged in session active so a user is not forced to enter a password with every transaction?