Search code examples
iphonegoogle-cloud-messagingxcode7-beta4

GCM in iphone app using swift


enter image description here

I am developing an iPhone app using Xcode 7 beta 4 in Swift 2.0

I am trying to implement GCM push notifications following the google doc here

I have followed and completed the steps upto "Add the configuration file to your project". Now when I am trying to add "#import < Google/CloudMessaging.h >" in the file. I am getting error. The error is Consecutive statements on a line must be separated by ';' I think the import statement is not working. Can some one please tell me how I can do it in the correct way?


Solution

  • The "#import <Google/CloudMessaging.h>" needs to be in your bridging header (which is a .h file), not in your .swift file.

    You do have a bridging header file, don't you?