RealityKit not behaving as expected

This week, I developed a small multiplatform RealityKit project. I also created a demo scene in Reality Composer Pro. Afterward, I imported the local package into the project. Running the project on macOS works perfectly. However, when I tried to run it on my iPhone, I encountered a permission error indicating that it couldn’t read the package. This seems unusual to me because I assumed that the dependency is bundled into the binary file. In an attempt to resolve the issue, I pushed the RCP package to GitHub, hoping it would work. Fortunately, everything compiles successfully now, but the loading time is significantly long, and the animations don’t play on tap gestures.

Could someone please help me identify the root cause of this problem?

Hi @iRIG ! Thanks for your question. 

I'm glad you were able to get your code to compile! But I understand you're still having issues with TapGesture.



In order to get to the root of the problem, could you please share any error messages you are seeing? Any relevant code blocks would also be helpful for me to get to the root of the problem, and you can share those here if you are able.


I recommend taking a look at the BOT-anist sample, as this is also a cross-platform RealityKit project that uses gestures. It may be useful to compare what you are doing with what the authors of this sample are doing.

 The relevant code begins on line 28 in RobotView.swift.

If we're not able to figure out the root of your problem here on the forums and you think you may be encountering a bug with RealityKit, please file a bug report for this issue using Feedback Assistant. You can also share your entire project with us this way if you'd like.

Thank you!

RealityKit not behaving as expected
 
 
Q