0

I am currently trying to implement Google Cloud Messaging library to my IOS app. I am following the instructions from here.

However I am having issues with bridging header. This is how my project structure looks like

But when I try to build the project, it says

GoogleCloudMessaging.h file not found

I also tried the header like this:

#import <Google/CloudMessaging.h>

But it did not work as well. How do I successfully import that to my project?

The Cook
  • 1,403
  • 3
  • 17
  • 33
  • Did you add it in Build Phase as a compile source? – farzadshbfn Jun 21 '16 at 07:31
  • I did, I know it works because it successfully navigates in to header file and tries to import GoogleCloudMessaging, then fails. – The Cook Jun 21 '16 at 07:33
  • if you are working on swift project and use gcm then you just need to use pod not import like that – Nitin Gohel Jun 21 '16 at 07:33
  • I imported with pod actually. But instructions said I needed a bridging header. I added pod 'Google/CloudMessaging' line to my Podfile. Successfully builded the project. After that I usually import the added library and it works. But google cloud messaging did not show up on imports. – The Cook Jun 21 '16 at 07:36

2 Answers2

0

I had the same issue a few minutes ago. I resolved it by searching 'bridging' and found another bridging header file. I then #imported the line of code in there. Let me know if this helps.

0

Like the solution to this SO question, try to update your cocoa pods and check if the error is gone. Also check this SO question Failed to import bridging header and Xcode not automatically creating bridging header? for more information and maybe another workaround to your problem.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31