I\'m trying to install Google Cloud Messaging for my iOS application (using swift). I\'ve added it to my Podfile like so:
# Uncomment this line to define a
I had a similar problem. My pod was 0.37.2 . I updated to 0.38.2 as mentioned in https://github.com/googlesamples/google-services/issues/22. got it solved .
With Cocoapods V 0.38.2 it is now possible to use GMC, or any other Objective-C frameworks with Swift frameworks like Alamofire
Make sure that you use use_frameworks!
in the podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '8.2'
use_frameworks!
target 'Project' do
pod 'Google'
pod 'Google/CloudMessaging'
pod 'Alamofire'
end
target 'ProjectTests' do
end
I'm using a Swift project too and i'm only using Objective-C frameworks, because Swift & Objective-C frameworks didn't work for me yet.
Try install GCM only without use_frameworks!
and without the Alamofire framework (written in Swift)
# Uncomment this line to define a global platform for your project
# platform :ios, '8.2'
target 'Project' do
pod 'Google'
pod 'Google/CloudMessaging'
end
target 'ProjectTests' do
end
I ran into some problems when I'm importing GCM in the bridging header file. I'm curious if you encounter the same problems.
Solution for Google Cloud Messaging when the BridingHeader or GGLInstanceIDDelegate is not working, is to install 'Google' pod 'Google'
Remove the pod from which are showing in warning and issue gona solve
There is problem with Google/CloudMessaging pod itself. This pod cannot be build as framework, because of some static dependencies. You can try Carthage to build you swift dependencies.
I met same problem with Google/Analytics
pod.
This issue may be resolved in the latest version of CocoaPods.
See this: https://github.com/CocoaPods/CocoaPods/issues/3194