gonzaloaune / GCMPushPlugin

Push notifications for Cordova (GCM & Native support)
MIT License
37 stars 20 forks source link

Xcode (6.4) Build Fails #3

Closed shanto closed 9 years ago

shanto commented 9 years ago

With pod 'Google/CloudMessaging'

With unmodified source, Xcode build fails with:

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GCMConfig", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJC_CLASS_$_GCMService", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJC_CLASS_$_GGLContext", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJC_CLASS_$_GGLInstanceID", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJC_CLASS_$_GGLInstanceIDConfig", referenced from: objc-class-ref in GCMPushPlugin.o "_kGGLInstanceIDAPNSServerTypeSandboxOption", referenced from: -[GCMPushPlugin didRegisterForRemoteNotifications:] in GCMPushPlugin.o "_kGGLInstanceIDRegisterAPNSOption", referenced from: -[GCMPushPlugin didRegisterForRemoteNotifications:] in GCMPushPlugin.o "_kGGLInstanceIDScopeGCM", referenced from: -[GCMPushPlugin didRegisterForRemoteNotifications:] in GCMPushPlugin.o -[GCMPushPlugin onTokenRefresh] in GCMPushPlugin.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Replacing #import <Google/CloudMessaging.h> with #import <Google/GGLContext+CloudMessaging.h> reduces the number of errors, but it still fails to build:

GCMPushPlugin.m:89:68: Receiver type 'GGLConfiguration' for instance message is a forward declaration GCMPushPlugin.m:199:64: Receiver type 'GGLConfiguration' for instance message is a forward declaration

Am I missing any required step or configuration?

Thanks

gonzaloaune commented 9 years ago

Yeah I've seen that error before, I don't remember what was exactly but check if you have this things as me, I've created a new project and I have these things:

screen shot 2015-08-12 at 1 05 09 am

In Other Linker Flags have $(inherited) In Enable Modules have Yes In iOS Deployment Target 7.1

Hope that helps.

shanto commented 9 years ago

That helps. Thanks.

Vahn84 commented 8 years ago

i have the same errot that shanto had

Undefined symbols for architecture armv7: "_kGGLInstanceIDScopeGCM", referenced from: -[GCMPushPlugin didRegisterForRemoteNotifications:] in GCMPushPlugin.o -[GCMPushPlugin onTokenRefresh] in GCMPushPlugin.o "_kGGLInstanceIDRegisterAPNSOption", referenced from: -[GCMPushPlugin didRegisterForRemoteNotifications:] in GCMPushPlugin.o "_kGGLInstanceIDAPNSServerTypeSandboxOption", referenced from: -[GCMPushPlugin didRegisterForRemoteNotifications:] in GCMPushPlugin.o "_OBJCCLASS$_GGLInstanceIDConfig", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJCCLASS$_GGLInstanceID", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJCCLASS$_GCMConfig", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJCCLASS$_GCMService", referenced from: objc-class-ref in GCMPushPlugin.o "_OBJCCLASS$_GGLContext", referenced from: objc-class-ref in GCMPushPlugin.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

shishircc commented 8 years ago

@gonzaloaune , that helped me too ! Thanks !