Wikitude / wikitude-flutter-plugin-examples

This repository contains an example app that demonstrates the usage of the Wikitude Flutter Plugin
10 stars 7 forks source link

drag events are not working on latest sdk version 9.12 #14

Open A2athoth opened 1 year ago

A2athoth commented 1 year ago

I have developed the app with wikitude flutte sdk 9.10 and upgraded to 9.12 since it doesn't work well.

in example, in the ios16, when you shortly visit the main app screen with gesture, then went back to the app with task manger something, all touch events doesn't work like that. and there are some more like some assets are not loaded sometimes. (in the sdk ver 9.10)

then they seems been solved in the 9.12, but in the sdk ver 9.12 / ios 16 I cannot drag my drawables and zoom(to change scales of them). touch drawable events seems worked since I could capture the screen feature. but there must be something wrong for touch event.

I tried to debug what is happening and put some 'print()' to the code in the "/plubin/augmented_reality_plugin_wikitude/lib/architect_widget.dart"

in there capture method worked

Future<String> captureScreen(bool mode, String name) async {
    assert(_channel != null);
    return await _channel?.invokeMethod('captureScreen', {"mode": mode, "name": name});
  }

but any 'onTouch~~~' method doesn't seems call. even I do anything.

Future<String?> onTouchBegan(int pointer, double x, double y) async {
    assert(_channel != null);
    return _channel?.invokeMethod('onTouchBegan', {"pointer": pointer, "x": x, "y": y});
  }

  Future<String?> onTouchEnded(int pointer, double x, double y) async {
    assert(_channel != null);
    return _channel?.invokeMethod('onTouchEnded', {"pointer": pointer, "x": x, "y": y});
  }

  Future<String?> onTouchCancelled(int pointer, double x, double y) async {
    assert(_channel != null);
    return _channel?.invokeMethod('onTouchCancelled', {"pointer": pointer, "x": x, "y": y});
  }

  Future<String?> onTouchMoved(int pointer, double x, double y) async {
    assert(_channel != null);
    return _channel?.invokeMethod('onTouchMoved', {"pointer": pointer, "x": x, "y": y});
  }

and I also figured it out something in the plugin.

"/plubin/augmented_reality_plugin_wikitude/ios/Classes/ArchitectWidget.m"

if I delete this line, touch event worked like before.

[_architectView setGestureRecognizers:nil];

but it brought some error back. like while the ar architect view playing, visit home screen then go back to the app and boom. touch not work even capture method.(only happened in the ios.)

I spent several days to solve it but it seems out of my codes. I am very desperate about this problem. I want to solve it ASAP.