0

I am using Google instructions link to integrate GCM with iOS app .

I integrated Cocoapod file in my project as per the instructions.Now after installation I am getting bellow error in GGLConfiguration.h and GGLInstanceID.h as in below screenshot:

Getting this issue when adding this below snippet in appdelegate.m

  #import "AppDelegate.h" 

 //***** this code *****//
  @interface AppDelegate ()
  @property(nonatomic, strong) void (^registrationHandler)
       (NSString *registrationToken, NSError *error);
  @property(nonatomic, assign) BOOL connectedToGCM;
  @property(nonatomic, strong) NSString* registrationToken;
  @property(nonatomic, assign) BOOL subscribedToTopic;
  @end


 and in appdelegate.h

 #import <Google/CloudMessaging.h>
  //***************/

enter image description here

If anyone has faced similar problem please help me ..

Any help is appreciated.

soumya
  • 3,627
  • 9
  • 33
  • 65

2 Answers2

3

Looks like you need to enable modules for your Objective-C project.

In your build settings, it looks like this:

And more information can be seen in this very related question.

p.s.

I'm not sure what modules being disabled has to do with a "1003" error, b.t.w. What part of your code does that error come from? Do you have multiple questions you're combining together?

Community
  • 1
  • 1
Michael Dautermann
  • 86,557
  • 17
  • 155
  • 196
  • thank you for your response .. Actually,I am trying to fix my issue using "pod try Google" sample app which pops up 1003 ..As You have mentioned, my app settings is set to "Enable modules == YES" – soumya Aug 17 '15 at 07:43
  • so is everything working okay now? or do you need to enter in a separate question about the 1003 error (which you edited away from this question)? – Michael Dautermann Aug 17 '15 at 07:49
  • Still the same @import issue ..hope this can be due to missing "GoogleServices-Info.plist" in my project – soumya Aug 17 '15 at 07:57
  • Please see my updated question once to help in resolving my issue – soumya Aug 17 '15 at 08:24
  • Check your other targets (e.g. the Cocoapods ones) and see if "Enable Modules" is set to "`NO`" accidentally. – Michael Dautermann Aug 17 '15 at 08:29
0

Solved My issue by replacing:

   @import UIKit

   @import Foundation

   // to

   #import <UIKit/UIKit.h>

   #import <Foundation/Foundation.h>

for more info: Please refer this

soumya
  • 3,627
  • 9
  • 33
  • 65