Install and un-install .ipa through appium on Macbook

I need to install .ipa through appium and uninstall it through appium only after execution of each Test case.

Can it be achieved with ios devices,

If not is there any way to clear data of app through appium?
Actually I am working on a messaging application, and I need the login page in each Test Case as there is no logout button in messaging apps.

Appium provides method for install/uninstall/resetting app data

driver.install(“appPath on hard drive”);
driver.removeApp(“String bundleId”);
driver.isAppInstalled(“String bundleId”)

Only for Android app we can also automate steps by opening Settings apk and going to testapp and clicking Uninstall button to uninstall test app…


In capabilities, set flag “fullReset” to true.