Play-games-plugin-for-unity: Cannot run xc workspace.

Created on 28 Oct 2016  Â·  62Comments  Â·  Source: playgameservices/play-games-plugin-for-unity

Hi,

I meet a problem with ios build. Please give me a hand. I always get it. Thank you.

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
      objc-class-ref in gpg(GPGClearcutLogger.o)
  "_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
      objc-class-ref in gpg(GIPNetworkImage.o)
  "_GTMMethodCheckMethodChecker", referenced from:
      +[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString32] in libGoogleToolboxForMac.a(GTMNSDictionary+URLArguments.o)
      +[NSDictionary(GTMNSDictionaryURLArgumentsAdditions) xxGTMMethodCheckMethodNSString33] in libGoogleToolboxForMac.a(GTMNSDictionary+URLArguments.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only
iOS

Most helpful comment

Hi guys, I had same problems, so this is what you have to do :

0 - Install cocoapods and then download cocoapods app so it will make the whole process easier
1 - Set your deployment target for iOS 8 in Unity
2 - build your iOS version in Unity
3 - open cocoapods app, find the "podfile" in the root directory of your project created by Unity,
4 - change its content with this and hit install:

platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
end

this step will create iphone-unity.xcworkspace file that you will open from now on. DO not use iphone.xcodeproj that was created by unity.

5 - now, In xCode remove GoogleSignIn.framework f in Build Phases in Libraries and in the references on the left.

6 - set your developer profile for the app of course so you can build it

7 - and that's it :) it will compile and will work for you

then I had an issue when trying to upload the app to the app store, so:

  1. What I had to do was to go to the xcode project folder, via Finder search GoogleSignIn.bundle and delete the file through Finder. Then I cleaned the project, compiled and everything worked + I was able to submit IPA to the app store.

PS: follow this thread, very smart people there figured it out :)

https://github.com/playgameservices/play-games-plugin-for-unity/issues/1460

good luck :)

All 62 comments

I am getting a similar error when I try to build in Xcode.

After building in Unity my XCode project doesn't have an XCWorkspace file.

When I open the terminal and CD to the project directory and run pod install I get the following output in terminal
Analyzing dependencies Downloading dependencies Using GTMOAuth2 (1.1.4) Using GTMSessionFetcher (1.1.7) Using GoogleAppUtilities (1.1.2) Using GooglePlayGames (5.1.1) Using GooglePlusOpenSource (1.7.1) Using GoogleSignIn (4.0.1) Using GoogleSymbolUtilities (1.1.2) Using GoogleToolboxForMac (2.1.0) Generating Pods project Skipping User Project Integration Sending stats Pod installation complete! There is 1 dependency from the Podfile and 8 total pods installed.

There still is not an XCworkspace file and when I try to build my game in xcode from launching the xcode project file i get the following output.

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_GTMSessionFetcherService", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GTMSessionFetcher", referenced from: objc-class-ref in GoogleSignIn(GIDRuntimeConfigFetcher.o) objc-class-ref in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from: objc-class-ref in gpg(GPGClearcutLogger.o) "_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from: objc-class-ref in gpg(GIPNetworkImage.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) Showing first 200 warnings only

Same here.

Xcode 7.3.1
Unity 5.4.1

I should state. I am running Mac OS 10.12, Xcode 8, and Unity 5.4.2f2

1st: In Unity i do an iOS build. When Unity is done, it only creates an Xcode project. It is not creating an Xcode workspace like it used to.

2nd Well ok, i click on the Xcode project, and run it. I get an error saying UnityAds.framework is missing. WTH? I'm looking at the Linked Frameworks and Libraries and i can see that UnityAds.framework is included. Oh well, i remove UnityAds.framework and manually add it again. And i run again.

3rd I get another error saying FBSDKShareKit.framework is missing. You can't be serious!? I'm looking at the Linked Framesworks and Libraries and i can see FBSDKsharekit.framework. Again, i remove the FBSDKshareKit.framework and manually add it again. And Run Xcode again.

4thI get another error saying:

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GTMSessionFetcherService", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GTMSessionFetcher", referenced from:
objc-class-ref in GoogleSignIn(GIDRuntimeConfigFetcher.o)
objc-class-ref in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
objc-class-ref in gpg(GPGClearcutLogger.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
objc-class-ref in gpg(GIPNetworkImage.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only

@claywilkinson

@ugobyte I don't get your 3rd step.
1
2
4

@Tekuzo I have FacebookSDK integrated in my app.

ah, im just rocking GPGS

@Ugobyte I got the same errors as yours even when I have NO_GPGS listed in Scripting Define Symbols.

I also tried:

  • create an empty Unity project
  • import ONLY Google Play Game Services package
  • add NO_GPGS
  • build for Xcode

... but still got the same errors.

I'm using GPGS version 0.9.35, already tested on both Unity 5.4.1f1 and 5.3.5f1 with no luck.

I have similar issues. i must have tried like 100 different ways 👎

screen shot 2016-10-31 at 02 14 54

Same here:
Unity 5.4.1
Xcode 8.1

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GTMSessionFetcherService", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
"_OBJC_CLASS_$_GTMSessionFetcher", referenced from:
objc-class-ref in GoogleSignIn(GIDRuntimeConfigFetcher.o)
objc-class-ref in GoogleSignIn(GIDSignIn.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

So I got a little bit further.

This is what my Pod file looked like after unity compiled the ios version
`source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, '7.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '~> 5.0'
end`

All I did was change integrate_targets => false to true before I ran "pod install" and voilà the XCworkspace file showed up.

Unfortunately it still fails to build,

@Tekuzo same here. I even tried different versions of build targets but everytime i get stuck at that point

Switching my build target to iOS 9 reduced the warnings from 200+ to only 50 but i still get the same 3 build errors

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
objc-class-ref in gpg(GPGClearcutLogger.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
objc-class-ref in gpg(GIPNetworkImage.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Hi guys, I had same problems, so this is what you have to do :

0 - Install cocoapods and then download cocoapods app so it will make the whole process easier
1 - Set your deployment target for iOS 8 in Unity
2 - build your iOS version in Unity
3 - open cocoapods app, find the "podfile" in the root directory of your project created by Unity,
4 - change its content with this and hit install:

platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
end

this step will create iphone-unity.xcworkspace file that you will open from now on. DO not use iphone.xcodeproj that was created by unity.

5 - now, In xCode remove GoogleSignIn.framework f in Build Phases in Libraries and in the references on the left.

6 - set your developer profile for the app of course so you can build it

7 - and that's it :) it will compile and will work for you

then I had an issue when trying to upload the app to the app store, so:

  1. What I had to do was to go to the xcode project folder, via Finder search GoogleSignIn.bundle and delete the file through Finder. Then I cleaned the project, compiled and everything worked + I was able to submit IPA to the app store.

PS: follow this thread, very smart people there figured it out :)

https://github.com/playgameservices/play-games-plugin-for-unity/issues/1460

good luck :)

So following your advice @kukoss I managed to get it to build.

I think that the thing that really did it was removing Googlesignin.framework from the build phases. I am not too familiar with XCode so I had not done that with the previous attempts.

screen shot 2016-11-02 at 1 35 36 pm

Going to this section of XCode and removing that framework from here seems to have done the trick. I am creating an archive right now to be able to upload to testflight.

Thank you very much.

Good luck @Tekuzo let me know. I wonder if you have to delete the bundle file too

@kukoss it looks like I do. The project successfully builds, but when I go to upload the archive to itunes I get an error along the lines of

iTunes Store operation failed.
Unexpected CFBundleExecutable Key. The bundle at 
'Payload/projectblue.app/GoogleSignIn.bundle' does not contain a bundle executable.
If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. 
If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

I followed your advice, I deleted the google signin from build phases, and from the resource tree, and I deleted it from inside of finder, cleaned the project and tried again but still no luck. there is probably one last step that I am missing.

@Tekuzo you have to find googlesignin.bundle in the folder of your app. Did you delete the file? I searched for it in Finder and deleted it afterwards.

@Tekuzo open your xcodeworkspace on the left side under Pods project find the file "Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone-resources.sh" then comment the line that look like this
install_resource ".../googlesignin.bundle"

Hi,

My project was not creating xcworkspace
I removed pods using terminal and installed again to get latest.

I removed all plugins (even removed plugin folder) from my project I was using
google analytics
game play services
google ads

  • Commented the code that was causing errors for these libraries.
  • Then I exported the package of my complete project and saved game.unitypackage
  • Then started a fresh unity project and did all player settings.
  • Then imported my game.unitypackage
  • Added my 3 plugins
    It started creating xcworkspace

my pod file is

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
target 'Unity-iPhone' do
pod 'Google-Mobile-Ads-SDK', '7.8'
pod 'GooglePlayGames', '5.1'
pod 'GoogleAnalytics'
end

Every thing is complied I get following link error

ld: '/Projects/XCode/iOSBuild1/Pods/GoogleSignIn/Libraries/libGIDExShared.a(GIDSignInExtensionRequest.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 arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I remove GoogleSignIn Folder from my pods project I get same error.

Any suggestion for me?

@gnchisti you skipped step 3 and 4. Also look in the other thread i gave link so you can see my screenshots

@hmoo3ton thank you, your extra little pointer helped me cross the finish line. I have successfully uploaded an IPA to the app store.

I find this frustrating because this is a process that prior to my upgrade to Unity 5.4, Google Play 0.9.35 and OSX Sierra that all of this just worked automatically and I didn't have to adjust anything in XCode.

Oh well, I at least it is now working.

@kukoss I've tried everything humanly possible, yet i don't get any workspace file. All i get is the xcodeproj file. In your steps, at step number 4, you said to change the contents to:

platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
end

And hit install. I did that.

I got this

[!] The version of CocoaPods used to generate the lockfile (1.1.1) is higher than the version of the current executable (1.0.0). Incompatibility issues may arise.
Analyzing dependencies
Downloading dependencies
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.7)
Using GoogleAppUtilities (1.1.2)
Using GooglePlayGames (5.1.1)
Using GooglePlusOpenSource (1.7.1)
Using GoogleSignIn (4.0.1)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 8 total pods installed.

Yet no xcodeworkspace file.

@Ugobyte did you set your Unity build for iOS targer version 8? Do you have the newest cocoapods installed?

@kukoss Yea, i did that.
screen shot 2016-11-05 at 2 58 50 pm
screen shot 2016-11-05 at 2 59 42 pm

@ugobyte do not use the cocoa pods app if you have a newer version installed. Just cd to your Xcode project directory with terminal and run "pod install"

@tekuzo
I used terminal, navigated to my xcode proj directory. Ran "pod install". It successfully ran, yet no xcode workspace. Went back to Unity, did an iOS build, still no workspace

screen shot 2016-11-06 at 8 22 27 pm

@ Ugobyte
Do my steps above

On Monday, November 7, 2016, UgoBoss [email protected] wrote:

[image: screen shot 2016-11-06 at 8 22 27 pm]
https://cloud.githubusercontent.com/assets/13201425/20043683/c662fe4c-a45e-11e6-9c89-f6721feaf1b2.png

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/playgameservices/play-games-plugin-for-unity/issues/1461#issuecomment-258727797,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD5nir4ZmKjfAVTLk3sviQrBN5-OOoSDks5q7n1ugaJpZM4KjVOj
.

gnc
Software Engineer
http://pk.linkedin.com/in/gchishti

@Ugobyte
This pod install made my workspace to be generated, you should try it out.

source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => true
platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '~> 5.1’
end

@gnchishti @Dod2 I was doing 'pod update'. I should've been doing 'pod install'. Thanks @Dod2 , it works.

screen shot 2016-11-07 at 7 54 21 pm

Now, i'm getting 'UnityAds/UnityAds.h' file not found. Why is Unity rearranging stuff?

Delete unity framework and bundle by removing reference and than add again.
Error will get removed hope it helps

On Tuesday, November 8, 2016, UgoBoss [email protected] wrote:

Now, i'm getting 'UnityAds/UnityAds.h' file not found. Why is Unity
rearranging stuff?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/playgameservices/play-games-plugin-for-unity/issues/1461#issuecomment-259014302,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD5niqrLzTXI0Nnz_45tcMRRr2PJ7331ks5q78rKgaJpZM4KjVOj
.

gnc
Software Engineer
http://pk.linkedin.com/in/gchishti

I use Unity 5.4.2f2 and create a new project. I only import Google play games 0.9.35 package and create a simple scene the export to iOS with this settings

I open the folder and there is not .xcworkspace file so I open the Podfile and change it from

source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '~> 5.0'
end

to

source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => true
platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '~> 5.1'
end

And then run pod install

Now I have .xcworkspace file and I open it with Xcode 8.1 on macOS 10.12.1. If I don't change any thing and run I will error

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
objc-class-ref in gpg(GPGClearcutLogger.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
objc-class-ref in gpg(GIPNetworkImage.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Now I try to fix by deleting GoogleSignIn.framework

(Select it and click minus button to delete)

And then remove reference

(Select reference and delete)

Pop up open and click Remove Reference

Now I go to Product > Clean and run again but still get error

Does anybody get the same issue and know how to fix?

I get stuck here quite a long time :(

if you're getting that error then the framework is still in xcode.
Also, try changing your pod file to

@aitc07 you skipped a step

change your pod file to

platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
end

@Tekuzo My Pod file is exactly like this

platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '~> 5.1'
end

I run pod install then open .cxworkspace file and delete GoogleSignIn.framework and the reference. I run project and get error

Now I am back to the Terminal and run pod install one more time then run project. I get other error

To sum up, here is what I do:

  1. build project on Unity
  2. use your Pod file above
  3. run pod install
  4. open .xcworkspace file and delete GoogleSignIn.framework and reference
  5. run project and get error: link to image
  6. I try to run pod install again
  7. run project and now I get other error: link to image

Any idea what I was wrong here?

@aitc07 your podfile is different than mine.

I said

platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '5.1'
end

you are doing

pod 'GooglePlayGames', '~> 5.1'

try to make that change and see if it helps, that is how I got my project to work.

It works like a charm. I can't believe that I made such a stupid mistake. Thank @Tekuzo You are my lifesaver.

@aitc07 I'm still getting error!

screen shot 2016-11-15 at 8 25 24 pm

My podfile

screen shot 2016-11-15 at 8 26 10 pm

@Ugobyte
Do you delete GoogleSignIn.framework and reference?

@aitc07 Oops! Just did, and it works! Thanks.

Question for all:
Why do we have to delete GoogleSignIn.framework?
I plan on implementing the multiplayer feature into my game, will i not need the Google Sign in for that?

My game signs into GPGS just fine and I am able to unlock achievements and view them, so I am not completely sure what is going on here.

@aitc07 Glad that it worked for you
I am shocked that such a small change is what makes the difference between your game failing to build and my game building successfully.

@Tekuzo Nice to know. Thanks

Quick question. Has anyone been able to successfully login with google on ios 9 using the pod GooglePlayGames 5.1?

GPG 5.1 for some reason uses the GoogleSignIn 2.2.0 dependency which apparently doesn't implement the correct in-app browser tab pattern for the auth request on ios 9+.

Both gpg 5.0 and 5.1.1 use the GoogleSignIn 4.0, but, as we know, both fail to successfully compile.

Same for me, GooglePlayGames 5.1 uses GoogleSignIn 2.2.0. This version makes a build successful, but actually, sign in is not possible because of browser issue.

@Dod2 @kiwiwalks I can login with my iPhone 5s running iOS 9.3.5. All functions work well. I only get a notice

img_2506

I really hope that the GPGS Unity Plugin gets patched so that it will authenticate without the embedded browser then if they are going to be retiring that method of OAuth.

Thank you @aitc07. So it IS possible to login somehow.

This is what I get when I try to sign in using "Social.localUser.Authenticate"

image

@aitc07 I did steps and I passed the error above. But i got a new error:

Pods/GTMOAuth2/Source/Touch/GTMOAuth2ViewControllerTouch.m:331:41: Use of undeclared identifier 'GTMOAuth2ErrorTokenUnavailable'; did you mean 'kGTMOAuth2ErrorTokenUnavailable'?

What should I do?

@viguysentertainment I didn't get this error so I cannot give you any advice. But you can post more info about your issue maybe you will get help from some smart guys here.

@aitc07 Here my error is :
screen shot 2016-12-06 at 4 06 26 pm
I don't know where "GTMOAuth2ErrorTokenUnavailable" is.
Please give me some advices !

@vutunglinh can you show me your pod file?

@aitc07 This is my pod file:

source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => true
platform :ios, '8.0'

target 'Unity-iPhone' do
pod 'GooglePlayGames', '~> 5.1’
end

@vutunglinh
You should use

pod 'GooglePlayGames', '5.1'

instead of

pod 'GooglePlayGames', '~> 5.1’

@aitc07 Oh, thanks you very much!
But one more question: How is the difference between 'GooglePlayGames', '5.1' and pod 'GooglePlayGames', '~>5.1'?

You want to use GooglePlayGames 5.1.2 - which has some dependencies locked to older versions of the dependencies. Is this for an already published game on iOS? I ask because new players can no longer create Google Play Game profiles on iOS: https://android-developers.googleblog.com/2016/12/games-authentication-adopting-google.html.

Was this page helpful?
0 / 5 - 0 ratings