Skip to content

Commit

Permalink
chore(example): update add apps to whiltelist
Browse files Browse the repository at this point in the history
  • Loading branch information
tompsota committed Oct 23, 2024
1 parent f01af8f commit 6289373
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,18 @@ const App = () => {
'com.talsecreactnativesecuritypluginexample',
'com.example.myApp',
];
appsToWhitelist.forEach(async (app) => {
try {
const whitelistResponse = await addToWhitelist(app);
console.info(
`Malware Whitelist response for ${app}: ${whitelistResponse}`
);
} catch (error: any) {
console.info('Error while adding app to malware whitelist: ', error);
}
});
await Promise.all(
appsToWhitelist.map(async (app) => {
try {
const whitelistResponse = await addToWhitelist(app);
console.info(
`${app} stored to Malware Whitelist: ${whitelistResponse}`
);
} catch (error) {
console.info('Malware whitelist failed: ', error);
}
})
);
};

useFreeRasp(config, actions);
Expand Down

0 comments on commit 6289373

Please sign in to comment.