function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jhennyjhenny 

PIN Unlock Event (Hybrid App)

Is there an event listener for when a PIN unlocks the app?

 

 

I.e.  document.addEventListener("pinUnlockSuccess", onPinUnlockFunction, false);

 

The log seems to write the following, but I don't know how to subscribe to it in the container:

SFSecurityLockout|Sending passcode flow completed notification with validation success = 1

 

I need to register some soups when the application loads,

but this needs to happen after PIN unclock or it will error.

bob_buzzardbob_buzzard

I'm not posting any help here, simply adding a me too.  I've found that my soup registration is in a race condition with the pin unlock functionality.  If I'm too slow with that, I get a soup error that the database doesn't exist or can't be decrypted.  

jhennyjhenny

 FYI - got a response on github:

 

"Currently, we don't have an event exposed on the Javascript side that you can listen for. We will consider adding this feature in a future release.

I would recommend triggering the soup registration when required via a user action, such as a button click. This ensures that the user has entered a passcode and the key required for encryption is available."

 

https://github.com/forcedotcom/SalesforceMobileSDK-iOS/issues/356#issuecomment-20583605

bob_buzzardbob_buzzard

Thanks for posting the response - I guess I'll have a lag when the user first attempts to do anything while I set the soup up.