I've encountered the same issue. It was working when I deployed the app to an iPhone with iOS 15 but the above issue occurred when I upgraded the iPhone to iOS 16.0.3
Post
Replies
Boosts
Views
Activity
It looks like Apple have fixed the issue. It seems to only affect some developer accounts. I got an email from them and this is their instructions:
In order to install development builds on the most recent releases, you’ll need to be issued new provisioning profiles.
In the Finder menu bar, open the Go menu and select Go to Folder
Enter the file path ~/Library/MobileDevice/Provisioning Profiles/
Optionally back up these files by copying them to another directory
Remove any files created after June 6, 2021
When you build to your device, Xcode will detect that there are no cached profiles eligible for your app and automatically request a new provisioning profile.
Thanks Maxx, I tried your suggestion. It turns out that physics methods only take effect after the entity is added to the scene. I know it's fairly obvious but for some reason I tried to use the physics methods when constructing the entity.
The solution is to create a new Apple Developer account. In XCode go to Signing & Capabilities, in the team drop-down select "Add an account..." and sign into your new account. Press Run in XCode. It will come up with the same message but go to Settings > General > VPN & Device Management and trust the app under "Developer App". This didn't appear before.
The problem was that I was giving the spheres so little linear velocity that it looked like setting the mode to .dynamic was stopping them but it was just friction. The following seems to work:
sphere.physicsBody?.mode = .kinematic
sphere.physicsMotion?.linearVelocity = [.random(in: -3...3), 0, .random(in: -3...3)]
DispatchQueue.main.asyncAfter(deadline: .now() + DispatchTimeInterval.milliseconds(1)) {
	sphere.physicsBody?.mode = .dynamic
}
In dynamic mode applyLinearImpulse() seems to work but the entity needs to be active. I don't know a good way to detect when an entity becomes active apart from a delay after an anchor is added to the session.
func session(_ session: ARSession, didAdd anchors: [ARAnchor]) {
DispatchQueue.main.asyncAfter(deadline: .now() + DispatchTimeInterval.seconds(1)) {
sphere.applyLinearImpulse([.random(in: -3...3), 0, .random(in: -3...3)], relativeTo: nil)
}
}