Adding GooglePlayGames API To Xcode Results In Multiple Architecture I386 Errors
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?
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.
Related Questions
- → Function Undefined in Axios promise
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Click to navigate on mobile devices
- → Playing Video - Server is not correctly configured - 12939
- → How to allow api access to android or ios app only(laravel)?
- → Axios array map callback
- → Access the Camera and CameraRoll on Android using React Native?
- → Update React [Native] View on Day Change
- → Shopify iOS SDK - issue converting BuyProductVariant to BuyProduct
- → BigCommerce and shopify API
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → React Native - Differences between Android and IOS
- → What is the difference between React Native and React?