Closed jordanjalles closed 2 years ago
Hey thanks for the heads up, are you sure you added the header as a C header bridge? You shouldn't need to manually include the header like that
I will published an updated version I worked on anyway, that setup the xcode framework directly in the Unity build system. It removes any manual step needed
The missing bridge header was it! I saw that step in other tutorials but must have missed it in this one. I'm looking forward to your next version :)
No need anymore to manually bridge with the next version: https://davidpeicho.github.io/blog/unity-swiftui-integration-revisited/
I haven't finished the blog post, might have a lot of spelling mistakes and all! But basically the trick is to use a post build step in Unity.
The main
branch of this repository now uses this technique!
I followed your tutorial and always got errors from xCode not being able to find TestDelegate and other NativeCallProxy types. I spent days trying to figure this out. The missing step was to edit the UnityFramework file and add #include "NativeCallProxy.h". Either there is some a in your unity project that I don't get by default before building, or this step should be part of the procedure. Otherwise great tutorial!