Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withPreferredDocumentDefinitions not working for android, working for ios #13

Open
kneeraj1996 opened this issue Apr 12, 2024 · 0 comments

Comments

@kneeraj1996
Copy link

Expected behaviour:- According to country code by default specific country should be already selected from country picker when modal gets opened, workking fine on ios not for android.

This function is only working for ios not for android

.withPreferredDocumentDefinitions({
"IDENTITY": {
"country":countryCode
}

})

this is full code
const launchSNSMobileSDK = (userId: string, cameFrom: string, countryCode: string) => {
let snsMobileSDK = SNSMobileSDK.init(sumSubDummyToken, () => {
// this is a token expiration handler, will be called if the provided token is invalid or got expired

return common.axiosGenericInstance
  .get(`${BASEURL.MAIN_API_URL}${endPoints.sumsubAccessToken}`, {
    params: {userId: userId},
  })
  .then(resp => {
    //return a fresh token from here
    return resp?.data?.data?.token;
  });

})
.withPreferredDocumentDefinitions({
"IDENTITY": {
"country":countryCode
}

})
.withHandlers({
// Optional callbacks you can use to get notified of the corresponding events
onStatusChanged: event => {},
onLog: event => {},
})
.withDebug(true)
.withLocale('en') // Optional, for cases when you need to override the system locale
.build();

snsMobileSDK
.launch()
.then(result => {
const cb = () => {
switchLoader(store.dispatch, false);
navigate(screenNames.HOME_SCREEN)
};
switchLoader(store.dispatch, true);
store.dispatch(getUserStatistics());
store.dispatch(getProfileData(cb, cb));
})
.catch(err => {
console.log('sum sub error', err);
});
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant