Why does my WebDriverAgent keeps disappearing on real iOS device?

I followed the instructions on how to install the WebDriverAgent in order to run tests on the real device. The first day, it was fine and everything worked perfectly. Recently, the WebDriverAgent will disappear from my iPad and my scripts will exit with code 65 because it could not find a WebDriverAgent. I then have to reinstall it on my iPad through XCode, but XCode will give me a warning that “there are too many instances of this running your device,” but it will still reinstall WebDriverAgent for me, then my scripts will run for a few times until I disconnect and re-connect my iPad to test again, and the process starts over. Is there a way to fix this?