I am looking for a way to clear the iOS keychain for a specific app on my iOS device. While using automated tests with Appium, I'd like to be able to start from a fresh state for each test.
I tried looking into libimobiledevice, but there's no option to clear the Keychain.
When I remove the app from the device, the data is still kept in the Keychain for the specific app.
What I also tried was a different approach: resign the .ipa:
Either using fastlane resign, or extracting the entitlements from the .ipa and modifying the application-identifier, then resign with my own provisioning profile, but this also keeps using the keychain data from the original ipa.
What combination of application identifier/bundleId is iOS using to interact with the Keychain? If I could somehow modify and resign the ipa, it could ignore the Keychain values from the original ipa.