1

I updated my project pods to get the latest version of Google Messaging, but now I'm getting multiple errors while building my project:

Use of undeclared type 'GGLInstanceIDDelegate'
Use of undeclared type 'GCMReceiverDelegate'
Use of unresolved identifier 'GGLContext'
Use of unresolved identifier 'GGLContext'
Use of unresolved identifier 'GCMConfig'
Use of unresolved identifier 'GCMService'
Use of unresolved identifier 'GCMPubSub'
Use of unresolved identifier 'GGLInstanceIDConfig'
Use of unresolved identifier 'GGLInstanceID'
Use of unresolved identifier 'kGGLInstanceIDRegisterAPNSOption'
Use of unresolved identifier 'kGGLInstanceIDAPNSServerTypeSandboxOption'
Use of unresolved identifier 'GGLInstanceID'
Use of unresolved identifier 'kGGLInstanceIDScopeGCM'
Use of unresolved identifier 'GCMService'
Use of unresolved identifier 'GCMService'
Use of unresolved identifier 'GGLInstanceID'Use of unresolved identifier 'kGGLInstanceIDScopeGCM'

Here is the result of the pod update command:

Analyzing dependencies
Downloading dependencies
Using GGLInstanceID (1.2.1)
Installing Google 2.0.4 (was 2.0.4)
Using GoogleCloudMessaging (1.2.0)
Using GoogleIPhoneUtilities (1.2.1)
Using GoogleInterchangeUtilities (1.2.1)
Installing GoogleMaps 2.0.1 (was 1.13.2)
Installing GoogleMobileAds (7.8.0)
Using GoogleNetworkingUtilities (1.2.1)
Using GoogleSymbolUtilities (1.1.1)
Using GoogleUtilities (1.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 10
total pods installed.

And here is the content of my podfile:

target 'myProject' do
source 'https://github.com/CocoaPods/Specs.git'
pod 'GoogleMaps'
pod 'Google/CloudMessaging'

end

I tried to run pod update again but the result remains the same. Perhaps a modification on the API entry points is needed?

I don't know exactly what can I do, any help will be more than appreciated!

Synchro
  • 35,538
  • 15
  • 81
  • 104
tiamat
  • 879
  • 2
  • 12
  • 35

2 Answers2

0

Based from this thread, if you encountered Use of undeclared type 'GGLInstanceIDDelegate' error, make sure you add a bridge header in Build Settings.

You have to set the Bridging Header in the Xcode Build Settings under "Swift Compiler Generation" -> "Objective-C Bridging Header" like this:

"$(SRCROOT)/$(PROJECT_NAME)/ObjCBridgingHeader.h"

You can check my answer in other SO post. It states that error Use of unresolved identifier usually occurs when your new class has a different Target(s) from the other one. It might have a testing target and the other doesn't. You have to include all of your classes in the testing target or none of them.

Check these related SO threads which might help:

Hope this helps!

Community
  • 1
  • 1
abielita
  • 13,147
  • 2
  • 17
  • 59
0

Finally I found the reason why I had those errors while updating my pods...

Google updated from GCM to Firebase and changed their API entry points, so I need to change everything to match Firebase new Cloud messaging implementation !

tiamat
  • 879
  • 2
  • 12
  • 35