Skip to content

Build Cardboard iOS SDK for Unity

cai-mobfish edited this page Jul 7, 2020 · 2 revisions

Steps to build "libsdk.a" - iOS native Cardboard plugin for Unity3D:

Note: This tutorial is based on XCode 11.5

  1. Download/Clone the Fork from official Google Cardboard SDK

  2. Open project in Xcode - "Cardboard.xcworkspace"
    Screenshot 2020-07-07 at 14 02 38

  3. Select the project "sdk"
    Screenshot 2020-07-07 at 14 02 59

  4. Set the active scheme to "Generic iOS Device"
    Screenshot 2020-07-07 at 14 02 38

  5. In PROJECT->sdk, under the "Info" tab, set "iOS Deployment Target" to 10.0.
    Screenshot 2020-07-07 at 13 56 29

  6. Under the "Build Settings" tab, select filter "All" and "Combined", and set the value "ONLY_ACTIVE_ARCH" to "No".
    Screenshot 2020-07-07 at 13 57 06

  7. Build the SDK: "Product -> Build".
    Screenshot 2020-07-07 at 14 23 57

  8. "libsdk.a" will be generated under "Products", in "Project navigator" tab.
    Screenshot 2020-07-07 at 14 26 59

  • Note: The actual file location is not inside the project folder, but a place in user directory.
  • The actual file location on my side: "Users/[username]/Library/Developer/Xcode/DerivedData/Cardboard-[hash]"/Build/Products/Debug-iphoneos/"
  • You can get the file by right click on the file in Project navigator, and click "Show in Finder".