Error with Google Play Game Service on iOS - ios

I am getting this error:
ERROR: GPGSAppController.mm GIDSignIn.h File not found error
I am using Google Play Game Service plugin for Unity for leaderboard and Achievements, and every thing is working fine in android but when I build to IOS and try to run my project to an iOS device I keep getting this error and I couldn't find a solution to it for hours now.
I tried to deleted everything related to Google Play service (After creating a back up of course) and the app installed and worked ok, except it was a bit laggy but that is a another issue. So I'm sure the problem comes from Google Play Service, but I have no clue how to fix it. Again I'm new to Xcode and iOS development in general and even Mac.
I also get this message after building the project in Unity:
TO FINISH CONFIGURING THE EXPORTED XCODE PROJECT
Add these frameworks:
AddressBook.framework
AssetsLibrary.framework
CoreData.framework
CoreTelephony.framework
CoreText.framework
Security.framework
libc++.dylib
libz.dylib
Add the following bundles and frameworks from the Google Plus
and the Google Play Games C++ SDKs. These can be downloaded from
https://developers.google.com/games/services.
GoogleOpenSource.framework
GoogleSignId.bundle
GoogleSignId.framework
gpg.bundle
gpg.framework
Note: Make sure the bundles are copied to application. This can be
verified under Build Phases/Copy Bundle Resources.
Add the '-ObjC' linker flag. To do this, select the top-level project
object, select the 'Unity-iPhone' build target, then go to the
Build Settings tab. Search for Other Linker Flags and add
the '-ObjC' flag to that list.
** Note: To run in the simulator, use Unity 4.6.8 or greater.
ios_instructions on plugin repository
But I have no idea how to do any thing above as am not familiar with iOS development. Any help is appreciated.

#aimozs answer was right for indicating where to add required files, a few google search gave me the answers;
From instructions (didn't work for me, scroll down)
AddressBook.framework
AssetsLibrary.framework
CoreData.framework
CoreTelephony.framework
CoreText.framework
Security.framework
libc++.dylib
libz.dylib
These can all be located directly when linking frameworks. (In my case, libc++.dylib and libz.dylib were already linked, and I couldn't find them somehow, but regenerating your xcode project should add these two again.
GoogleOpenSource.framework
I've found it here:
https://developers.google.com/+/mobile/ios/getting-started#step_1_creating_the_console_name_project
GoogleSignId.bundle
GoogleSignId.framework
Found them in:
https://developers.google.com/identity/sign-in/ios/sdk/
(I grabbed latest version Google Sign-In SDK 3.0.0)
gpg.bundle
gpg.framework
I found them here:
https://developers.google.com/games/services/downloads/sdks
(Grabbed Play Games C++ SDK Version 2.1)
Also, the following part of the message seemed important:
Make sure the bundles are copied to application
I tried to copy bundle files to root of the project, but I still get the same error.
Solution: CocoaPods and the podfile!
I saw the PodFile in xcode project directory!.
Here you go; make sure you followed these steps:
https://github.com/playgameservices/play-games-plugin-for-unity#ios-setup
Then see https://cocoapods.org/
sudo gem install cocoapods
pod repo update
pod install
open Unity-iPhone.xcworkspace
Way better than manually copying files everywhere! ;)
Note: I also had to disable bitecode because I was having a linker error concerning GoogleOpenSource:
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)
It doesn't seem to be compiled with bitcode enabled, solution in here: how to ENABLE_BITCODE in xcode 7?
Build, enjoy and focus on making awesome games!
Linked questions
There's also a small discussion here:
http://forum.unity3d.com/threads/googleplus-googleplus-h-file-not-found-gpgsappcontroller-mm-xcode.294398/
A similar issue on UnityAnswers:
http://answers.unity3d.com/questions/1098655/gpgsappcontrollermm-gidsigninh-file-not-found-erro.html

Im going through that aswell, and for #1 it has to be done in xcode, here's a screenshot of how to add those libs
And that is for #3
Hope that helps :) and I'll get back to you about #2 when I've found out about it ;)

Related

'GADURewardedInterstitialAd.h' file not found -error xcode-

Recently I tried to build my xcode project from Unity3D export, but after 400/500 tasks, a major error appear:
GADURewardedInterstitialAd.h file not found
I've tried:
restart xcode
re import GoogleMobileAds SDK IOS(latest update 8.7.0)
change admob version in Unity (5.4.0 or 6.0)
sure, cleaning the project (before launch "archive")
remove the "GoogleMobileAds.xcframework" from "Frameworks" folder and add it again
try the method "framework search paths" in Build Setting (UnityFramework)
try to YES (Enable Modules C & Objective-C)
try to modify architecture (why not)
try to add in OTHER LINKER FLAGS "-ObjC"
No luck, still the same error, any ideas to solve this? thanks.
My solution to various errors of this type was to import the GoogleMobileAds via CocoaPods and not manually. This is because first of all it does everything by itself, and then because it installs you in the project the version of the GMA of iOS supported by the unity plugin (or else sometimes you may find yourself with the version of the unity plugin that does not support the too recent version of the package for iOS)
I suggest you try initially with version 5.4.0 of the plugin, as 6.0.0 and 6.0.1 I saw on GMA's GitHub that some users encounter various errors on Xcode, then maybe if it works you can try with a plugin most recent. What version of Unity do you use? (I built with 2020.3)
I leave you the links of two of my videos that I made that explain (1) how to install/update CocoaPods, (2) how to import GMA via CocoaPods.
I want to say that I have no intention of advertising my content, I have a tiny channel with some videos to help those like me who have had various problems starting to program or use Unity, I do not monetize. You are obviously free to look for information on the internet regarding what was said before and not to watch the videos, which I repeat I have linked only to help.
(1)
Install/update CocoaPods ,
(2)
Import GMA using CocoaPods
In this other link (which leads to a documentation page of the GMA package for iOS), you can read the note from Google that suggests the use of CocoaPods:
Link

Build error with XCode 9.0 of a Ionic project

I have a problem building my ionic project on iOS with xcode, the sources get compiled correctly (or atleast it seems so) but when "Apple Mach-O Linker" try to link my obj files, I get an error saying 256 duplicate symbols for architecture arm64 and then I do not manage to understand the logs (logs below) since it refer to cordova generated files from the typescript ionic project
Here is what i tried :
Creating a new ionic blank project to see if it was a problem with XCode configuration itself (it works with a blank project)
Cleaning up the whole DerivedData folder
Pod deintegrate and install
cordova clean ios && cordova platform remove ios && cordova platform add ios
Opening explicitely .xcworkspace file
Changing enable bitcode from YES to NO
Changing the build path to somewhere else than DerivedData
Changing "Build Active Architectures Only" to YES
None of them worked and I feel like i'm out of solutions and energy, is there anyone with other solutions or ideas ?
here is the error log : https://codepaste.net/d2qzh2
I didn't put the whole log there (only the beginning, the end, and a small part at the middle because the whole middle is kind of the same)
here is my package.json that may help aswell : https://codepaste.net/4ckbha
Thanks for your time
UPDATE
Found out that my problem isn't linked to console (even tho i shouldn't have console) but to cordova-plugin-add-swift-support so that when cordova platform add ios build the xcode project, it build it with swift conversion, and then i have the same problem described upper, followed all of the answers on the possible duplicate question but nothing worked out
Managed to fix it, I had two plugins colliding with each other, my solution to find the problem was to create a blank project and re-add my plugins one by one until i see which one was in fault and then do the same backward to find the other one in fault
the two plugins were ionic-deploy and cordova-plugin-ionic which is obvious now that i think of it

React native facebook login in ios undefined symbols for architechture x864

I'm trying to add facebook login on react native latest version 0.49 by follow this tutorial
https://github.com/facebook/react-native-fbsdk
I did step by step and see some videos on youtube and did exactly but I still get the same 28 errors
I guess maybe it's because in the link Binary with Libraries I can't see the FBSDK, even I added it as explained on tutorial to Frameworks folder
I saw some posts in stack overflow e.g
React Native iOS build failed : Undefined symbols for architecture x86_64
but without any help.
thanks.
There is an issue with XCode 9, where when you drag and drop any files, it does not get added to the target.
You need to manually add them to your target in File inspector now.
This can happen not only with frameworks but other files as well. To prevent this issue, whenever you want to add any file or resource to your XCode project, you should first add that file/resource to the project folder and then right-click and then add to your XCode project using Add Files to ..

Import React Native dependency to existing iOS app manually

It seems like just about every tutorial and blog post out there has you integrating RN into an existing app using CocoaPods. Adding CocoaPods support isn't a possibility for our existing iOS app - we are relying on Carthage for dependency management already which doesn't seem to be supported by RN.
So, I went through the process of adding the dependencies manually by attempting to recreate the iOS app that is produced when using the RN CLI (react-native init):
-Add the React.xcodeproj from node_modules/react-native to my Libraries folder, and also add the other Libraries from node_modules/react-native/Libraries, such as RCTActionSheet.xcodeproj. Then, I added all of those to the 'Link Binary With Libraries' section in Build Phases.
-Updated 'Other Linker Flags' to -ObjC -Ic++.
...My app build is still failing with "RCTRootView.h file not found".
Does anyone have experience with just adding RN manually to an existing iOS project, that might be able to provide a definitive list of steps for adding it manually to an existing project?
In addition to the other steps, I also needed to update the HeaderSearchPaths setting to point to the React folder in node_modules: http://i.imgur.com/jK0IMZN.jpg

Unable to use Google Analytics for iOS

I don't know what Happens to the code or google.
I just Downloaded the Sample App for Google Analytics for Google.
I downloaded it via pod using:
pod try Google
and chooses the option for Analytics.
After downloading when I build the project I am getting Linker Error.
Fully Stuck Tried All The way available in SO.
Removed -ObjC Flag
Removed -force-load Flag
Changed Load Common Section from Yes to NO
But none of the way help me Out. What is the issue with it.
Here is the Screen shot of the Error:
Here is the Following reason of this ERROR :
*Note - Integrated GooGle Analytic without CocoaPods.
If latest GA(Google Analytics) sdk is using then better to upgrade to Xcode 7 otherwise it will give you duplicate error (even if configured properly)
Running with Xcode 6.2 or < Xcode 7 then better to download September (August) Release Sdk.
Go with Xcode and select GA folder and right click - choose show in Finder then all files should be there . If yes then check is there two different copy exists in other folder .
Thanks
It basically says that there are functions duplications in the project...
Make sure the following:
The project does not have #import for .m files by mistake
In the projects build phases there are no file names duplications
There are no initialized variables in .h files e.g "int
variableA = 5"
If none of the above works, remove in project settings Other Linker
Flags "-ObjC", that will allow to load the same functions more then
one time.

Resources