godot-sdk-integrations / godot-ios-plugins

MIT License
130 stars 52 forks source link

Godot 4.x Support #64

Open Makosai opened 5 months ago

Makosai commented 5 months ago

This update mainly includes the following changes:

There are other changes.

TODO:

Makosai commented 5 months ago

The workflows are functional. But need to be reviewed. If I get approval, I'll dedicate some time to make them work with 3.x and 4.x seamlessly.

The same thing with the code itself and the game engine.

BastiaanOlij commented 3 months ago

Only noticed this PR now, have to find some time but cool to see someone is porting ARKit support to Godot 4 :)

Snowdaw commented 1 month ago

Hi, I tried to port @BastiaanOlij's Godot 3 ARKit test project to Godot 4.3 with this updated codebase. Unfortunately I am getting the following error messages from Godot about undefined symbols.

ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Undefined symbols for architecture arm64:
  "__print_line(String)", referenced from:
      print_line(Variant) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "stringify_variants(Variant)", referenced from:
      print_line(Variant) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::pre_render()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_view_count()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_system_info()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_vrs_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::stop_passthrough()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_color_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_depth_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::pre_draw_viewport(RID)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::start_passthrough()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::post_draw_viewport(RID, Rect2 const&)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::set_play_area_mode(XRInterface::PlayAreaMode)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_camera_transform()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_velocity_texture()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::trigger_haptic_pulse(String const&, StringName const&, double, double, double, double)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::is_passthrough_enabled()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::supports_play_area_mode(XRInterface::PlayAreaMode)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::is_passthrough_supported()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::set_environment_blend_mode(XRInterface::EnvironmentBlendMode)", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_supported_environment_blend_modes()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::end_frame()", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRPositionalTracker::set_tracker_name(StringName const&)", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRPositionalTracker::set_tracker_type(XRServer::TrackerType)", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRPositionalTracker::XRPositionalTracker()", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRServer::add_tracker(Ref<XRPositionalTracker>)", referenced from:
      ARKitInterface::get_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "XRServer::remove_tracker(Ref<XRPositionalTracker>)", referenced from:
      ARKitInterface::remove_all_anchors() in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
      ARKitInterface::remove_anchor_for_uuid(unsigned char const*) in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_play_area() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_play_area_mode() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_tracking_status() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_suggested_pose_names(StringName const&) const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "ARKitInterface::get_suggested_tracker_names() const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
  "Object::get_argument_options(StringName const&, int, List<String, DefaultAllocator>*) const", referenced from:
      vtable for ARKitInterface in arkit-device.release_debug.a[arm64][3](arkit_interface.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **

They are not just related to the ARKit implementation code as these are also included.

Undefined symbol: __print_line(String)
Undefined symbol: stringify_variants(Variant)
...
Undefined symbol: Object::get_argument_options(StringName const&, int, List<String, DefaultAllocator>*) const

This leads me to believe there is more going wrong than just unimplemented functions. Which should also have caused issues for Godot 3's ARKit if they were necessary for basic functionality.

I hope this can help other people figure out where things go wrong, as I don't really know what to do to get this to work and I would really like to be able to use ARKit with Godot.