React Viro on iOS

Problems encountered getting my React Viro Augmented Reality app to run on iPhone.

No Permission Handler Detected

When the app first starts up, an error stating that there's no permission handler in the Podfile appears.

No Permission Handler

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.

requireNativeComponent VRTText was not found in the UI Manager

requireNativeComponent VRTText was not found in the UI Manager

Downgraded Viro from 2.21.1 to 2.20.2 per this response to an issue on Github.

Position in AR is wrong

Items were showing up rotated 135° counterclockwise about the y-axis from where expected.

Fixed by changing worldAlignment from GravityAndHeading to Gravity.

AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS

This isn't actually related to Viro, but rather react-native-maps.

AirGoogleMaps dir must be added to your xCode project

Ultimately, I sidestepped this issue by switching provider prop of MapView to PROVIDER_DEFAULT to use Apple Maps on iOS.