Gesture: System gesture gate timed out.
[SystemGestureGate] <0x101c8d590> Gesture: System gesture gate timed out.
1.i use flame in my project. 2.i add 'HasTappableComponents','HasDraggableComponents' these two mixin about Gesture into Class FlameGame. 3.it worked normally on ios 15.4,it makes error when i update on ios 16.0. 4.but it works normally on android.
flutter doctor: [✓] Flutter (Channel stable, 3.0.1, on macOS 12.6 21G115 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 14.0)
device information: • android-arm64 • Android 12(API 31) • ios • iOS 16.0 20A362
Actual results:
Code sample
class MyFlameGame extends FlameGame
with
//碰撞检测
HasCollisionDetection,
//点击事件和拖动事件不互斥,不影响操作机制
//点击事件
HasTappableComponents,
//拖动事件
HasDraggableComponents {
///按压事件
@override
void onTapDown(TapDownEvent event) {
super.onTapDown(event);
//游戏界面右上角两个按钮响应区域
if (event.canvasPosition.x >= width - 75.0 &&
event.canvasPosition.y <= safeTop + 80.0) {
gameExit.call();
} else if (event.canvasPosition.x >= width - 145.0 &&
event.canvasPosition.y <= safeTop + 80.0) {
gameStop.call();
} else {
//人物控制
if (event.canvasPosition.x >= (playerLayer.x + playerLayer.size.x / 2)) {
playerLayer.moveToRight();
} else {
playerLayer.moveToLeft();
}
}
}
///停止按压事件
@override
void onTapUp(TapUpEvent event) {
super.onTapUp(event);
//player停止移动
playerLayer.movePause();
}
///取消按压事件
@override
void onTapCancel(TapCancelEvent event) {
super.onTapCancel(event);
//player停止移动
playerLayer.movePause();
}
///记录上一次拖动的位置
double lastX = 0.0;
DIRECTION direction = DIRECTION.none;
///开始拖动
@override
void onDragStart(DragStartEvent event) {
super.onDragStart(event);
lastX = event.canvasPosition.x;
if (lastX > playerLayer.x) {
direction = DIRECTION.right;
} else if (lastX < playerLayer.x) {
direction = DIRECTION.left;
} else {
direction = DIRECTION.none;
}
}
///拖动中
@override
void onDragUpdate(DragUpdateEvent event) {
super.onDragUpdate(event);
if (event.canvasPosition.x > lastX) {
playerLayer.moveToRight();
} else if (event.canvasPosition.x < lastX) {
playerLayer.moveToLeft();
} else {
switch (direction) {
case DIRECTION.left:
playerLayer.moveToLeft();
break;
case DIRECTION.right:
playerLayer.moveToRight();
break;
case DIRECTION.none:
default:
playerLayer.movePause();
}
}
lastX = event.canvasPosition.x;
}
///拖动结束
@override
void onDragEnd(DragEndEvent event) {
super.onDragEnd(event);
playerLayer.movePause();
}
///拖动取消
@override
void onDragCancel(DragCancelEvent event) {
super.onDragCancel(event);
playerLayer.movePause();
}
}
Can you post the full stacktrace/error that you get? This sounds like a Flutter bug, but I couldn't find any open issues related to the error you wrote in the title.

[ ] "method: resume" [ ] "playerId: 752aa0f9-2c42-4af5-a8ca-bab58f16aef2" [+2966 ms] [SystemGestureGate] <0x1026557b0> Gesture: System gesture gate timed out. [+3016 ms] "method: setReleaseMode" [ ] "playerId: 5a79fcc1-cd84-4cab-a7ab-22850e4c01ad"
[+2966 ms] [SystemGestureGate] <0x1026557b0> Gesture: System gesture gate timed out. only this message
thank for your help @spydon but i test common flutter project about gesture and it does not have this error
In any system there are 2 kinds of errors: (1) errors caused by incorrect use of the API of that system (external errors), and (2) errors caused by internal inconsistencies within the system (internal errors). The external errors will normally have messages indicating where the problem is and what the user did wrong. The internal errors will typically be vague and indecipherable.
By the looks of it, this is an internal error within the iOS itself -- two levels removed from Flame. Which means it is extremely unlikely we would be able to do anything about either diagnosing or resolving the problem.
Your best bet would be to ask on StackOverflow, or on Apple Support forums. Sorry.