googlevr / gvr-ios-sdk

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

Duplicate symbol problem #234

Closed jonflanders closed 6 years ago

jonflanders commented 7 years ago

I am using Unity 5.6. I build an Xcode project and then run "pod install".

Once I do that I am getting a duplicate symbol error for just about every symbol from libGVRSDK.a (from the pod install) and libgvrunity.a (from the Unity project plugin folder).

When I remove libgvrunity.a I get 31 complier errors relating to naming.

The project can't build without libGVRSDK.a because of the missing symbols problem mentioned in this issue - https://github.com/googlevr/gvr-ios-sdk/issues/229

jrobalino commented 7 years ago

A friend found a temporary workaround, but note that it bypasses the pods:

  1. Copy the GVROverlayView.h file from Pods/Headers/Public/GVRSDK folder to the top-level Classes folder.

  2. Open the main .xcodeproj file.

  3. Delete the libPods-Unity-iPhone.a file from the left pane.

  4. Under Build Settings, double-click the first line in Other Linker Flags.

  5. Delete the $(inherited) line.

    screen shot 2017-04-07 at 8 44 47 pm
  6. Build the project.

  7. Profit.

snovak commented 7 years ago

The above described issue is actually a different issue than #259 , resulting from upgrading the GoogleVR unity package, without deleting all references to the old libgvrunity.a.

If libGVRSDK.a and libgvrunity.a are creating a mass of conflicting symbols, you need to reimport the GoogleVRForUnity.unitypackage, but first you need to go through your Assets/Plugins dir and delete any references to GVR, including libgvrunity.a. Unity's package manager does not delete files from previously imported packages that conflict with package updates.

sanjayc77 commented 6 years ago

This was a fixed by unbundling the dependency on GTM* to Cocoapods. Closing this due to age and not reproducible with latest version. Please re-open if the issue still persists.