-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Description
360° VR Image Displays Blank on iOS but Works Fine on Android
Issue Description
I'm experiencing an issue where a Viro360Image component displays correctly on Android devices but shows a completely blank screen on iOS devices (iPhones). The console logs confirm that the image has successfully loaded on both platforms, yet the 360° image is not visible on iOS.
Environment
- @reactvision/react-viro:
^2.50.0 - Expo SDK:
~54.0.30 - React Native:
0.81.5 - React:
19.1.0 - Development Client:
expo-dev-client ~6.0.20 - New Architecture: Enabled (
newArchEnabled: true)
Platform Details
| Platform | Behavior |
|---|---|
| Android | ✅ Works perfectly - 360° image displays correctly |
| iOS | ❌ Blank screen - image loads but doesn't display |
iOS Configuration (app.json)
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.anonymous.expo-starter-kit-typescript",
"infoPlist": {
"NSPhotoLibraryUsageDescription": "Starter Kit would like to read photos for AR experiences.",
"NSPhotoLibraryAddUsageDescription": "Allow $(PRODUCT_NAME) to save photos",
"NSCameraUsageDescription": "Starter Kit uses your camera for AR experiences.",
"NSMicrophoneUsageDescription": "Starter Kit uses your microphone for AR experiences.",
"GARAPIKey": "Your Google Cloud API Key",
"NSLocationWhenInUseUsageDescription": "Allow $(PRODUCT_NAME) to use your location for AR experiences",
"NSLocationAlwaysAndWhenInUseUsageDescription": "Allow $(PRODUCT_NAME) to use your location for AR experiences",
"ITSAppUsesNonExemptEncryption": false
}
}Viro Plugin Configuration
"@reactvision/react-viro": {
"android": {
"xRMode": "AR"
},
"ios": {
"cameraUsagePermission": "Starter Kit uses your camera for AR experiences.",
"microphoneUsagePermission": "Starter Kit uses your microphone for AR experiences.",
"photosPermission": "Starter Kit would like to read photos for AR experiences.",
"savephotosPermission": "Starter Kit would like to save photos to your library during AR experiences."
},
"googleCloudApiKey": "Your Google Cloud API Key",
"cloudAnchorProvider": "arcore",
"geospatialAnchorProvider": "arcore"
}Current Behavior
- On Android: The 360° panoramic image displays perfectly, user can look around
- On iOS: The screen remains completely blank (black), despite logs showing successful image load
- Console logs on both platforms show:
Image load startedImage successfully loaded!
- No error callbacks are triggered on iOS
- The
ViroTextcomponent also doesn't appear on iOS (suggesting the entire scene may not be rendering)
Expected Behavior
The 360° panoramic image should display on iOS devices exactly as it does on Android devices, allowing users to look around the virtual environment using the stereoscopic view (each eye separate image).
Code
Scene Component (Simple360Scene.tsx)
import React from "react";
import { ViroScene, Viro360Image, ViroText } from "@reactvision/react-viro";
const Simple360Scene = () => {
const handleLoadStart = () => {
console.log('Image load started');
};
const handleLoadEnd = () => {
console.log('Image successfully loaded!');
};
const handleError = (event: any) => {
console.error('Image load ERROR:', event);
};
return (
<ViroScene>
<Viro360Image
source={require('@/assets/images/360-room.png')}
onLoadStart={handleLoadStart}
onLoadEnd={handleLoadEnd}
onError={handleError}
/>
<ViroText
text="Look around!"
scale={[0.5, 0.5, 0.5]}
position={[0, 0, -2]}
style={{
fontFamily: "Arial",
fontSize: 30,
color: "#FFFFFF",
textAlignVertical: "center",
textAlign: "center",
}}
/>
</ViroScene>
);
};
export default Simple360Scene;Index file (index.tsx)
import React from 'react';
import { StyleSheet } from 'react-native';
import { ViroVRSceneNavigator } from '@reactvision/react-viro';
import Simple360Scene from '@/components/vr-scenes/Simple360Scene';
export default function ARHome() {
return (
<ViroVRSceneNavigator
initialScene={{ scene: Simple360Scene }}
style={styles.container}
/>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});Steps to Reproduce
- Install the expo starter kit
- Add the included snippet file into
@/components/vr-scenes/Simple360Scene.tsx - Replace the index file with provided snippet
- Add a placeholder png into your
assets/imagesfolder - Install dependencies
npx expo run:ios
- Open the app on your iPhone
- Check console logs - they show successful image load on both platforms
Device Information
Android (Working)
- Device: Samsung S10
- Android Version: 12
- Result: Image displays correctly
iOS (Not Working)
- Device: iPhone 14 Pro
- iOS Version: 18.7.2
- Result: Blank screen despite successful load
Additional Investigation
Things I've Verified:
- ✅ Image file exists at the correct path (
@/assets/images/360-room.png) - ✅ Image loads successfully (confirmed by
onLoadEndcallback) - ✅ No errors in
onErrorcallback - ✅ ViroVRSceneNavigator is properly initialized
- ✅ Camera permissions are granted on iOS
- ✅ New Architecture is enabled in app.json
Potential Issues:
- Could this be related to the New Architecture (
newArchEnabled: true) on iOS? - Is there a specific iOS rendering configuration needed for
Viro360Image? - Could the image format/size be incompatible with iOS despite loading successfully?
- Is there a difference in how ViroVRSceneNavigator renders scenes on iOS vs Android?
Questions
- Has anyone else experienced this issue with iOS and Viro360Image?
- Are there any specific iOS configurations or permissions needed for VR scenes?
- Could this be related to React Native 0.81.5 or the New Architecture on iOS?
- Is there a known workaround or fix for this issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels