Skip to content

withPreferredDocumentDefinitions not working for android, working for ios #13

@kneeraj1996

Description

@kneeraj1996

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);
});
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions