@@ -158,8 +158,9 @@ export async function dispatchCommand(
158158 throw new AppError ( 'INVALID_ARGS' , 'swipe requires x1 y1 x2 y2 [durationMs]' ) ;
159159 }
160160
161- const rawDurationMs = positionals [ 4 ] ? Number ( positionals [ 4 ] ) : 250 ;
162- const durationMs = requireIntInRange ( rawDurationMs , 'durationMs' , 16 , 10_000 ) ;
161+ const requestedDurationMs = positionals [ 4 ] ? Number ( positionals [ 4 ] ) : 250 ;
162+ const durationMs = requireIntInRange ( requestedDurationMs , 'durationMs' , 16 , 10_000 ) ;
163+ const effectiveDurationMs = device . platform === 'ios' ? 60 : durationMs ;
163164 const count = requireIntInRange ( context ?. count ?? 1 , 'count' , 1 , 200 ) ;
164165 const pauseMs = requireIntInRange ( context ?. pauseMs ?? 0 , 'pause-ms' , 0 , 10_000 ) ;
165166 const pattern = context ?. pattern ?? 'one-way' ;
@@ -169,12 +170,23 @@ export async function dispatchCommand(
169170
170171 for ( let index = 0 ; index < count ; index += 1 ) {
171172 const reverse = pattern === 'ping-pong' && index % 2 === 1 ;
172- if ( reverse ) await interactor . swipe ( x2 , y2 , x1 , y1 , durationMs ) ;
173- else await interactor . swipe ( x1 , y1 , x2 , y2 , durationMs ) ;
173+ if ( reverse ) await interactor . swipe ( x2 , y2 , x1 , y1 , effectiveDurationMs ) ;
174+ else await interactor . swipe ( x1 , y1 , x2 , y2 , effectiveDurationMs ) ;
174175 if ( index < count - 1 && pauseMs > 0 ) await sleep ( pauseMs ) ;
175176 }
176177
177- return { x1, y1, x2, y2, durationMs, count, pauseMs, pattern } ;
178+ return {
179+ x1,
180+ y1,
181+ x2,
182+ y2,
183+ durationMs,
184+ effectiveDurationMs,
185+ timingMode : device . platform === 'ios' ? 'safe-normalized' : 'direct' ,
186+ count,
187+ pauseMs,
188+ pattern,
189+ } ;
178190 }
179191 case 'long-press' : {
180192 const x = Number ( positionals [ 0 ] ) ;
0 commit comments