How to open Login screen before each test case in iOS real device

I have automated a hybrid app on android (real device) using serenity-bdd, cucumber, and appium. On android, whenever there’s a new test/scenario the first step is always of login then comes the actual test. I want to run the same test cases for iOS (real device) as well. But when I try to run the test on iOS it doesn’t open the launch screen (where login is required) instead directly opens the Home screen (the screen that comes right after login). Is there any way I can make login mandatory for the iOS real device as well before each test case/scenario? Below are my desired capabilities

appium.automationName = XCUITest
appium.platformName = iOS
appium.deviceName  = iPhone 8 Plus
appium.platformVersion = 14.7.1
appium.app = {appPath}
appium.udid = {realDeviceUdid}
appium.appName = {appName}

try first ‘fastReset’ -> Different capabilities for different scenarios

I have set
appium.fullReset = false
appium.noReset = false
but no progress

if you manually reset app will you see login on app restart?
PS it is possible that you app stores info in secure folder that does not delete on reset or app remove. thus every time you reinstall app it get data from it. the only way to solve it is logout user in test code using UI - same as user does. Or possible ask developer for quicker workaround e.g. you send some flag on driver start and app using it to reset app data.

I think this should be set to ‘true’

https://appium.io/docs/en/writing-running-appium/other/reset-strategies/index.html

with android noReset should be enough to reset app

There is no problem with android actually, it’s working exactly the same as I stated above. Every time a test case/scenario is run, it first logins the app then run the test case

It uninstalls the app which is not required

you did not answer. how manually you logout? reset app in settings? other?

I use the logout button in the app. there’s no other way to logout the app, I mean through settings

So Appium will not do more magic. Logout in same way in test.

But in android case is different. Logout procedure is same on both apps but in android whenever there’s a new test case it automatically opens the login screen first. so I want to do same with iOS