Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GooglePlus.h not found / PlayGameServices.h not found. #9

Closed
TheClarkster opened this issue Jan 12, 2014 · 8 comments
Closed

GooglePlus.h not found / PlayGameServices.h not found. #9

TheClarkster opened this issue Jan 12, 2014 · 8 comments

Comments

@TheClarkster
Copy link

I've work hours on this now. I think I've run out of ideas on how to fix this.

GPGSAppController.m
Lexical or Preprocessor Issue
'GooglePlus/GooglePlus.h' file not found

GPGSAchOrLbDelegate.h
Lexical or Preprocessor Issue
'PlayGameServices/PlayGameServices.h' file not found

It looks to me like the Frameworks are not being seen. But I can't find anything else to do, I've tried it all.

Everything is set up correctly, for iOS in Unity. I've built to an Xcode project, I've added every Framework listed in the documentation.

I dragged the 5 files to the project:
GoogleOpenSource.framework
GooglePlus.bundle
GooglePlus.framework
PlayGameServices.bundle
PlayGameServices.framework

I've double/triple/quadruple checked that they ARE included in Build Phases -> Link Binary With Libraries.

The .bundles are also in the project.

I've added the -ObjC flag to the Other Linker Flags.

Latest OS X Mavericks and Latest Xcode 5.0.2

I've wiped, re-uilt, re-created the xcode project, cleaned, built. Done everything at least 5 times over. Clean checkout from my repository and did it again. Clean install of Unity. Simulator and device builds, with the correct choice in Unity beforehand. Every possible thing I can think of. But it just comes down to an error while compiling because it can't find the .h files. Which has to mean the framework isn't linking. I've reached the end of my ideas.

Am I missing something really trivial and stupid?

Thank you for any help you can give me. This works great on Android, I published a game with it two weeks ago, and am in the Top 10 New Apps and Games in Canada! I'd like to get it running on iOS now.

Thanks!

@kromenak
Copy link

I was running into similar issues when adding Google Play Services this past week. Rest assured, it does work, but it is quite a pain to get setup and running. I'm not too good with XCode or Obj-C, but here were a couple gotchas that I ran across that may be causing your issue. I don't have my work in front of me at the moment, but I'll try to explain as best I can.

  1. You should be able to open the Google frameworks and see the header files that the compiler claims are missing. Checking that the headers are indeed there is a good first step. I don't see any reason they wouldn't be, but double check.

  2. I had an issue where my frameworks were copied into the project, but XCode was treating them as normal folders instead of frameworks. As you probably know, frameworks should have a small yellow toolbox icon next to them. I just deleted them and re-added them to fix this - not sure how I caused it to occur in the first place.

  3. I also had a more subtle issue where the framework appeared to be added correctly, but compiling would fail (listing very similar errors to yours). It turned out that XCode was looking for the framework in the system framework directory, not the directory it was actually in, causing the header to turn up missing. Following the steps at https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Tasks/IncludingFrameworks.html might help. You can try adding the directory to "Framework Search Paths". Also, if you can locate the log output for the compilation process, you can check that the compiler is being passed the framework at the correct location.

Sorry I don't have a more straightforward answer for you, but hopefully something here will point you in the right direction!

@TheClarkster
Copy link
Author

Oh wow. Thank you! It was actually option #1!

That combined with my lack of OS X knowledge. I did use my Macbook for a long time before, I had assumed it was just another one of those 'special' directories I couldn't see into unless I explicitly wanted to, or that Xcode was hiding the contents of frameworks.

But the framework was completely empty. I have no idea how that could have happened. It was a straight download from Google.

But it actually compiles now, and starts. And then deadlocks. But that's another problem for another day.

Thank you so much for your help.

@0x5d
Copy link

0x5d commented May 24, 2014

@TheClarkster could you please tell how you fixed it? Having a similar problem in version 0.9.

@iLyxa3D
Copy link

iLyxa3D commented May 30, 2014

Having a similar problem

@0x5d
Copy link

0x5d commented May 30, 2014

Could you ellaborate? I solved mine.

@TheClarkster
Copy link
Author

Sorry I didn't see your reply earlier @castillobg My problem was a dumb one. I think because I had extracted the zip file on a Windows computer something was lost. The bundle I added was completely empty. So I re-downloaded on OSX and extracted it, everything worked after that.

@chetanisinanand
Copy link

Simplest solution is to drag 'GooglePlus.framework' from 'unity-iPhone' project(Hopefully, you've already added it there) to 'BuildPhases > Link Binary With Library' Section every time after Unity Build process.

@claywilkinson
Copy link

The latest version of the plugin (0.9.21) uses Cocoapods to manage the dependencies. If you install cocoapods, then all the dependent frameworks are added to the xcode workspace automatically. The README file has all the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants