Post

Replies

Boosts

Views

Activity

SwiftUI view as contents of SCNMaterialProperty
In our app, we have an AR part where we set a SwiftUI view as the diffuse contents on a material of a node with plane geometry. The node's position is based on the device's location at the moment a button to create it is tapped. The view shows up fine and interaction is possible. However, after moving the device to positive values along the X and Z axes the touches seem to be offset. This makes the subviews on the rightmost side of the view unreachable. The view is scaled down because otherwise this issue happens from any camera position. Debugging view hierarchy shows the subviews' wireframe as out of bounds, but that's due to the whole view being scaled down. What's interesting is that some views' wireframes were missing from the debug on larger devices (iPhone 11 Pro) as opposed to smaller devices (iPhone 7), where it takes getting closer to the node for this issue to happen, and I don't know if that's related to the problem or not. I know views aren't recommended as diffuse contents, but that property is of type Any and so far it seems to work with views. Creating an image out of the view, as recommended, removes the interaction we need. Is hit-testing / raycasting useful in this scenario to know where it landed on the view? Or is there another way to fix the touch offset?
1
0
608
Apr ’22
URL Prefix Matching for App Clips not working
According to the docs, you can register a few URLs for Advanced App Clip Experiences and the one with the most specific URL prefix will get triggered. However, I can't get this to work as only the exact URLs trigger the App Clip Cards - meaning the app launches without parameters rendering this feature useless. Oddly enough though, once the clip is cached, the prefix matching works but only on some devices, making this a nightmare to figure out. Has anyone had this problem and solved it?
0
0
621
Aug ’21