fix(ios): the clear-state guard checks the bundle that was cleared

A bool only said that something was cleared, so Launch(ctx, otherBundle,
clearState=true) passed the guard and reported a reset that had reached a
different app. Record what was cleared and compare against the bundle
being launched.
This commit is contained in:
pj committed 2026-08-16 01:04:58 +05:30
1 parent 99b9fe23f5
commit 6beea91046
2 files changed
+12 -10

No files matched your search

+1 -1
View File
@@ -83,7 +83,6 @@ func NewDevice(ctx context.Context, options DeviceOptions) (*Driver, error) {
coreDeviceID: options.CoreDeviceID,
bundleID: options.BundleID,
appPath: options.AppPath,
clearStateAtStartup: options.ClearState,
output: output,
doubleTapGapMilliseconds: gap,
deviceMode: true,
@@ -137,6 +136,7 @@ func NewDevice(ctx context.Context, options DeviceOptions) (*Driver, error) {
d.Close()
return nil, err
}
d.clearedBundleID = options.BundleID
}
if err := d.bringUpDevice(ctx); err != nil {