Ad

Adding GooglePlayGames API To Xcode Results In Multiple Architecture I386 Errors

- 1 answer

So I'm trying to add Google Play Games into my app, but I'm struggling to get their sample code to work. I've seen this issue mentioned a couple times on stack overflow, but I have yet to find a definitive answer.

I'm following the manual instructions listed here: https://developers.google.com/games/services/ios/quickstart

and adding them to the buttonclicker code here: https://github.com/playgameservices/ios-basic-samples

What results is a 32 Undefined symbols for architecture i386 errors like the ones below.

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GTLCollectionObject", referenced from:
      _OBJC_CLASS_$_GTLGamesEventDefinitionListResponse in gpg(GTLGamesEventDefinitionListResponse.o)
      _OBJC_CLASS_$_GTLGamesLeaderboardListResponse in gpg(GTLGamesLeaderboardListResponse.o)
      _OBJC_CLASS_$_GTLGamesPlayerAchievementListResponse in gpg(GTLGamesPlayerAchievementListResponse.o)
      _OBJC_CLASS_$_GTLGamesPlayerEventListResponse in gpg(GTLGamesPlayerEventListResponse.o)
      _OBJC_CLASS_$_GTLGamesPlayerLeaderboardScoreListResponse in gpg(GTLGamesPlayerLeaderboardScoreListResponse.o)
      _OBJC_CLASS_$_GTLGamesRoomList in gpg(GTLGamesRoomList.o)
      _OBJC_CLASS_$_GTLGamesTurnBasedMatchList in gpg(GTLGamesTurnBasedMatchList.o)
      ...
  "_OBJC_CLASS_$_GTLObject", referenced from:
      _OBJC_CLASS_$_GTLGamesManagementHiddenPlayer in gpg(GTLGamesManagementHiddenPlayer.o)
      _OBJC_CLASS_$_GTLGamesManagementPlayer in gpg(GTLGamesManagementPlayer.o)
      _OBJC_CLASS_$_GTLGamesAchievementDefinition in gpg(GTLGamesAchievementDefinition.o)
      _OBJC_CLASS_$_GTLGamesAchievementIncrementResponse in gpg(GTLGamesAchievementIncrementResponse.o)
      _OBJC_CLASS_$_GTLGamesAchievementSetStepsAtLeastResponse in gpg(GTLGamesAchievementSetStepsAtLeastResponse.o)
      _OBJC_CLASS_$_GTLGamesAchievementUpdateResponse in gpg(GTLGamesAchievementUpdateResponse.o)
      _OBJC_CLASS_$_GTLGamesCategory in gpg(GTLGamesCategory.o)

I've added the GoogleSignIn.framework, gpg.bunde, and gbg.framework to the project.

I searched for some of these (like GTLCollectionObject) and could not find where it is referenced in the project.

I've tried it on a device, tried removing the 64-bit architecture, and a host of other things, but I'm stuck at 32 errors. What am I missing with this set up?

Ad

Answer

You need to add the GoogleOpenSource.framework as well.

This is covered in steps 3 and 4 of https://developers.google.com/games/services/ios/quickstart#option_2_manual_installation

  • Download and extract the latest Goservices/ios/quickstart#option_2_manual_installation" >https://developers.google.com/games/services/ios/quickstart#option_2_manual_installation

    • Download and extract the latest Google+ iOS SDK from the Google+ Downloads page.
    • Copy the following items from the Google+ SDK into your project: GoogleOpenSource.framework

    Just out of curiosity, why no use Cocoapods? It does a great job of adding the required frameworks to the project without all the hassle of downloading from multiple sites and then copying them into the project.

Ad
source: stackoverflow.com
Ad