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
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'