The app I am testing uses a website-based login. So as soon as you click on the login button in the native app a webview opens up where you can enter your credentials. Once done, a single-sign-on cookie is set, the webview closes and the native app opens back up.
Because of the SSO closing, resetting or even reinstalling the app does not log the user out. However, in order to make the automated tests independent of each other I want to have the user always logged out at the beginning of each test run.
I know you can delete cookies with Selenium/Appium with https://appium.io/docs/en/commands/web/storage/delete-all-cookies/, but this apparently only works when in a webview context.
Is there any other way to delete SSO cookies in Android and iOS and reset app the state?