googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
647 stars 191 forks source link

Include the SDK directly in the project #225

Closed ch4vi closed 7 years ago

ch4vi commented 7 years ago

exist any way to include the framework without using CocoaPods? I'm using Carthage and with other google libs like firebase I could import them "just" downloading and pasting them in my project, but I spent hours trying to find the last version of googlevr framework and I wasn't able to found it.

KhomenokV commented 7 years ago

My answer is late obviously but maybe it will help someone.

It is possible.

1) You should get library headers and libGVRSDK.a. You may take these files from Samples (f.e. TreasureHunt). 2) Copy libGVRSDK.a and headers from folders GTMSessionFetcher, GVRSDK, GoogleToolboxForMac to your project. Copy Resources folder to your project (it is located in GVRSDK folder). 3) Go to the Project -> Build Phases -> Compile Sources and set flag "-fno-objc-arc" for GTMLogger.m class (to turn off ARC for this class). 4) Add CoreMotion framework to your project. 5) Go to Project -> Target -> Build Settings -> Linking -> Other Linker Flags and add two flags there: "-ObjC" (for building static library) and "-lc++" (to resolve C++ compilation issues. May not be necessary, but in my case it was needed).

cargath commented 7 years ago

This seems really convoluted. There should be an official way to add the SDK without using CocoaPods. Also Carthage supports prebuild frameworks now, so there's no excuse for Google to not have Carthage support anymore.

ch4vi commented 7 years ago

At the end I had to use another library but I'm still waiting for Carthage because It's supposed that they offer better support and updates...

cargath commented 7 years ago

@ch4vi May i ask what you ended up using? I want to avoid blowing up the size of my app with the 270MB libGVRSDK.a, but i can't seem to find any competing frameworks for iOS.

cargath commented 7 years ago

@KhomenokV Tried it you way, but i get almost 5000 duplicate symbols in libGVRSDK.a. Any idea what i might be doing wrong? I spend a whole workday unsuccessfully trying to get my project to compile after adding the GVR SDK 🙁

ch4vi commented 7 years ago

@cargath I'm using NYT360Video maybe it's not as good as GVR but for me it was enough for now.

cargath commented 7 years ago

@ch4vi That actually looks pretty cool, but i need to play stereoscopic video :/ But thanks for getting back to my question!

KhomenokV commented 7 years ago

@cargath Unfortunately I have no idea why there may be duplicate symbols in your project unless headers and library were already included in it.