I CAN NOT IMPLEMENT CUSTOM WDA SERVER TO start before test script

my wda is deleted after install app through real device iOS
i need to use the

custom wda server but i failed to implantation that i can not run the helper class WDAServer
if one has the full script with all imports it will help me to make WebDriveragent existed as long as possible because the script is failed

although i use capabilities
cap.setCapability(IOSMobileCapabilityType.USE_PREBUILT_WDA, true); // no need to build WDA. in case you build it manually after appium reinstall/install.
cap.setCapability(IOSMobileCapabilityType.USE_NEW_WDA, false); // do not update WDA on phone if it exists. use with caution! after reinstall appium you should set it true at least one time
cap.setCapability(“wdaStartupRetries”, “4”);
cap.setCapability(“wdaStartupRetryInterval”, “20000”);