Xcode/CocoaPods for Google VR
Cocoapods with GVRSDK
By Sam Smith
CocoaPods is a dependency manager written in Ruby for Objective-C and Swift. It focuses on the seamless integration of third party code into Xcode projects. It supports formats like git, svn, bzr, http, hg, and others. There is a huge library of files called CocoaPods available to be used in an Xcode project.
CocoaPods is therefore involved in a lot of areas other than Virtual Reality. The pod for Google Cardboard used to be CardboardSDK, but this pod was deprecated and it is now GVRSDK. There are three VR view types within GVRSDK: GVRPanoramaView, GVRVideoView, and GVRCardboardView. The first is for 3D pictures, the second for 3D videos, and the third for more complicated 3D experiences using OpenGL for dynamic landscapes and involving 3D audio. At the current moment, documentation and institutional support for the GVRSDK CocoaPod are both rather weak, so proceed with caution. (Unity is a more well-documented tool for developing for Google Cardboard than CocoaPods.)
There are also non-Google VR-related CocoaPods, such as the HTY360Player, OmniVirtSDK, and PlayKit VR for iOS, all of which can be used to play VR videos.
Recommended System Requirements
CocoaPods requires Xcode 7.1. or higher and Mac OS X. CocoaPods supports both Swift and Objective C.
Accessibility: The estimated time for someone to create Hello World in VR
Beginner: No coding or graphics experience | 2+ hours
Advanced: Coding and graphics experience | 45 minutes
Power: The engine's power - i.e. how much one can do with this
Moderate: Not user-friendly.
Usage: Evaluation of software's use for the following purposes
Art, Architecture, Design -- main fields of use.
Installing CocoaPods + XCode:
Install Xcode at https://developer.apple.com/xcode/. (You need Xcode 7.1 or higher and you definitely need a Macintosh computer of some sort.)
Open Terminal and enter “sudo gem install cocoapods”.
Create a Project and Install into it the Google VR SDK
Open up Xcode and select File>New>Project.
Select “Single View App.” Enter a Product Name and Organization Identifier, and then select Swift for Language. Check “Include Unit Tests” and “Include UI Tests but uncheck Use Core Data.
Navigate to the project folder in Terminal.
Create a Podfile by writing “pod init”.
Open the Podfile in the project folder with a text editor and delete everything in it. In its place, write (with the actual project name for ProjectName):
target “ProjectName” do
6. Save the Podfile and exit. Then, in the project folder via the Terminal, write “pod install.”