2022-09-24
Problems encountered getting my React Viro Augmented Reality app to run on iPhone.
When the app first starts up, an error stating that there's no permission handler in the Podfile appears.
Despite following the Viro installation instructions, the necessary permissions do not get added to the Podfile automatically. I finally tracked down the instructions in this issue on react-native-permissions. Since I'm using both the camera and locations permissions I added the following lines to the Podfile:
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera/Permission-Camera.podspec"
pod 'Permission-LocationWhenInUse', :path => "../node_modules/react-native-permissions/ios/LocationWhenInUse/Permission-LocationWhenInUse.podspec"
Note the directory structure is a little different than what's shown in the issue. Make sure to go into the react-native-permissions folder under node_modules to find the correct path to the permissions .podspec files that you need.
Downgraded Viro from 2.21.1 to 2.20.2 per this response to an issue on Github.
Items were showing up rotated 135° counterclockwise about the y-axis from where expected.
Fixed by changing worldAlignment
from GravityAndHeading to Gravity.
This isn't actually related to Viro, but rather react-native-maps.
Ultimately, I sidestepped this issue by switching provider prop of MapView to PROVIDER_DEFAULT to use Apple Maps on iOS.