4

-------------------use version---------------------------

Unity 5.5.0f3

Xcode 8.2.1

cocoapods 1.2.0

current-build/GooglePlayGamesPlugin-0.9.36.unitypackage


I Added GooglePlayGamesPlugin to Unity project.

However, an error was found.

I have not been able to solve the problem for two weeks...

Screenshot of the problem

1

3 Answers 3

1
  1. Follow this comment: change it in your Podfile directly:

"pod 'GoogleSignIn', '>= 4.0.2'" to "pod 'GoogleSignIn', '< 5.0.0'"

OR

you change it in the GoogleSignInDependencies.xml (for future rebuilds of the XCode project):

File: /Assets/GoogleSignIn/Editor/GoogleSignInDependencies.xml

"`<iosPod name="GoogleSignIn" version=">=4.0.2" ...>`" to
"`<iosPod name="GoogleSignIn" version="< 5.0.0" ...>`"


If '<' symbol becomes red, then change it to '&lt;'
  1. Add Cocoapods to the Xcode workspace from iOS Resolver Settings

  2. Make XCode build from Unity by selecting Xcode Workspace

  3. Open .xcworkspace, not .xcodeproj

  4. Add -ObjC as Other Linker Flags in target's build settings

  5. Select Pods project, then select "GoogleUtilities" from left side under TARGETS, then select "Build Phases" tab and add "GoogleSignIn.framework" and "GoogleSignIn.bundle" under "Link Binary With Libraries" by clicking + sign

NOTE on point 6: As Unity adds the GoogleSignIn framework and bundle in Pods, but it couldn't able to add it's reference, so we have to do it explicitly. Remember these files are in your Pods folder

enter image description here

0

This seems to have been raised on a Github post and the provided solution was as follows:

This could be that the postprocessing of the pbxproject file did not complete successfully. You can check the Unity console log for this.

Make sure you are:

  1. opening the .xcworkspace file.
  2. OTHER_LDFLAGS in build settings include $(inherited)
  3. HEADER_SEARCH_PATHS in build settings include $(inherited)
  4. OTHER_CFLAGS in build settings include $(inherited)
  5. ENABLE_BITCODE in build settings is set to NO
  6. Libraries/Plugins/iOS/GPGSAppController.mm (or Libraries/GPGSAppController.mm) has compiler flags that include -fobjc-arc
0

This error only for missing iOS GoogleSignIn.framework.

So, download the latest framework version from developers.google.com.

Extract the zip file. there this two files drag and drop in your xcode project's Frameworks folder. Then project clean and build.

  1. GoogleSignIn.framwork
  2. GoogleSignInDependencies.framework

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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