VR View sample app for iOS

Adding a VR view to your Cardboard app is as simple as downloading the Google VR SDK for iOS and adding a few lines of Objective-C to your app. There is a sample app in the SDK named "Panorama" which demonstrates the VR View functionality. To view different parts of the panorama, the user can rotate their phone.

To embed a panoramic image in your app, use the GVRPanoramaView class:

_panoView = [[GVRPanoramaView alloc] init];
_panoView.enableFullscreenButton = YES;
_panoView.enableCardboardButton = YES;
[_panoView loadImage:[UIImage imageNamed:@"andes.jpg"]
              ofType:kGVRPanoramaImageTypeStereoOverUnder];
[_scrollView addSubview:_panoView];

To embed a video, use the GVRVideoView class:

_videoView = [[GVRVideoView alloc] init];
_videoView.delegate = self;
_videoView.enableFullscreenButton = YES;
_videoView.enableCardboardButton = YES;
[_scrollView addSubview:_videoView];

View the Panorama sample files on GitHub.

Known Issues

  • 360 videos do not work in a web browser on iOS due to an issue with iOS forcing full screen playback of videos in the browser.

  • 360 images have incorrect orientation in iOS Safari if the code and images are hosted on different servers.

  • 360 videos do not work in OSX Safari if the media and the VR view code are hosted on different servers.

  • Images that are not power-of-two and square may not display correctly in Chrome and Safari iOS 8.