Unable to Execute Adb commands from Terminal Mac

Had tried with above command to execute adb command to clear app before application launch.

final String[] cmd = { “/bin/bash”, “-c”, “adb shell pm clear com.xyzbank.android.dev” };
final Process process = Runtime.getRuntime().exec(cmd);

This command is not working.Kindly suggest me a command.

Device used:
IPhone 11.1
Appium server 1.7.2
Jdk v1.8
xcode 9.2

Correct me if I’m wrong, but adb means Android debug bridge. You can not use adb commands for fruit.

why not to use one of reset strategies?

Hi,

Reset strategy is not working which i tried using noReset and fullReset and also tried with fastReset ,a popup appears only on clearing data and cache of App.Using the above command works fine in Android but not in IOS ,kindly suggest me solution using adb shell command which can be executed from terminal of Mac Ios.

final String[] cmd = { “/bin/bash”, “-c”, “adb shell pm clear com.xyzbank.android.dev” };
final Process process = Runtime.getRuntime().exec(cmd);

What do you mean it ‘fullReset’ does not work? Your application is not reinstalled?

ADB command is used only for android applicable to uiautomator2 native frameworks…
for iOS u may have to search for equivalent instruments (iOS ver<10)or xcuitest (iOS ver>=10)command for full reset of app.