Since we had issues with the previous messages we decided to place instead a 3d asset. The issue was that to ad a UIView to the AR view it had to be added as a subview. This became an issue because even though the ARGeoAnchor was being added to specific lat, long the message was still being added as a subview. With this update, we don't add any subviews and only add anchors and entities to the AR scene.
Reality Composer
I've added a reality composer project that I used to create the location pin. To update the 3d pin it can be done on reality composer then export as a USDZ file. This file is then loaded to the entity.
How a message is added
A big part of the code is through delegate callbacks from the keyboard. Where it does the actual coordinate logic to place it is in VC+TextViewDelegates.swift inside textViewDidEndEditing
Update
Since we had issues with the previous messages we decided to place instead a 3d asset. The issue was that to ad a UIView to the AR view it had to be added as a subview. This became an issue because even though the ARGeoAnchor was being added to specific lat, long the message was still being added as a subview. With this update, we don't add any subviews and only add anchors and entities to the AR scene.
Reality Composer
I've added a reality composer project that I used to create the location pin. To update the 3d pin it can be done on reality composer then export as a USDZ file. This file is then loaded to the entity.
How a message is added
A big part of the code is through delegate callbacks from the keyboard. Where it does the actual coordinate logic to place it is in
VC+TextViewDelegates.swift
insidetextViewDidEndEditing