4
\$\begingroup\$

We are trying to build a Unity game in Xcode but keep getting this error:

ld: '/Users/Pero/Documents/GitHub/MyGame/XCodeProject/Pods/GooglePlayGames/gpg-cpp-sdk/ios/gpg.framework/gpg(libgpg.a-armv7-master.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

We are using:

  • Unity 5.1.1f1
  • Xcode Version 7.1 (7B91b)

We have these frameworks included in the Xcode project:

  • gpg.framework
  • GooglePlus.framework
  • GoogleOpenSource.framework
  • GoogleMobileAds.framework
  • CoreText.framework
  • AdSupport.framework
  • AudioToolBox.framework
  • AVFoundation.framework
  • CFNetwork.framework
  • CoreGraphics.framework
  • CoreLocation.framework
  • CoreMedia.framework
  • CoreMotion.framework
  • CoreVideo.framework
  • Foundation.framework
  • iAd.framework
  • MediaPlayer.framework
  • OpenAL.framework
  • OpenGLES.framework
  • QuartzCore.framework
  • SystemConfiguration.framework
  • UIKit.framework
  • StoreKit.framework
  • CoreTelephony.framework

We also have Cocoapods installed and this is in our Podfile:

platform :ios, '7.0'
pod 'GooglePlayGames'
pod 'Google/SignIn'

We have tried searching the issue and none of the solutions we found did work. We have tried enabling and disabling the bitcode, Build Active Architecture Only, setting or deleting Search Paths… Here are some links:

xcode-5-1-missing-required-architecture-arm64

new-warnings-in-ios9

impact-of-xcode-build-options-enable-bitcode-yes-no

error-after-updating-to-xcode-7

xcode-7-and-enable-bitcode-yes-setting-does-not-work

apple-llvm-6-0-error-clang-failed-with-exit-code-1

It is our first time using Xcode. We have built the Android version from Unity with no problems.

There was also a problem with creating the Xcode project from Unity on a Mac (Unity kept crashing), so the Xcode project was created on a PC.

Thank you in advance

\$\endgroup\$
2
\$\begingroup\$

I would suggest upgrading to the latest Unity 5 patch release (5.2.2p3) at the time of writing this and build your XCode project from the Mac. If Unity is crashing at that point chances are there is something inherently wrong with your project.

I would also suggest a clean of the Library and Obj folders, and even deleting your entire Xcode project and trying again.

If you have made sure you are using the latest version of the Google Play Game Services plugin, and you still get the error, I'm wondering if you are using the C/C++ version of the plugin from here? https://developers.google.com/games/services/ios/quickstart

If so, see if people have gotten it working with Unity, if not, perhaps look at the Prime31.com plugin for GPGS, as that definately works with Unity.

\$\endgroup\$
  • \$\begingroup\$ This is an older project that built fine for Android so we were reluctant to upgrade Unity, but upgrading (and doing some minor changes) fixed the issue from the question. But we have some new problems and are investigating them and I'll post them in another thread if we can't solve them. Can you please provide a link for Prime31.com? \$\endgroup\$ – Mentoliptus Nov 10 '15 at 7:24
0
\$\begingroup\$

I was stuck with this same problem until 5 hours ago all you have to do is go to build setting in ur project and scroll down to build options when u see (enable bitcode) change it to no and there you go this worked for couple people if it does not work for you let me know i got a different idea

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.