I'm implementing Google Cloud Messaging in my Swift iOS app. I was following this guide: https://developers.google.com/cloud-messaging/ios/client?ver=swift
First I changed the pods file, then I ran pod install. This worked fine. Since Swift needs a bridging header to include the ObjC Library I extended my header like suggested in the guide to
#import <Google/CloudMessaging.h>
But the import fails - file not found.
I noticed the fact that CloudMessaging.h is not in the Google folder directly but in Google/CloudMessaging. Unfortunately the import of
#import <Google/CloudMessaging/CloudMessaging.h>
works neither.
Here is a screenshot of what my pods look like
Did anyone notice the same problem? Any Ideas to fix it? Project builds fine except that the GCM classes are not found since the header is not found.
Digging deeper:
I tried to add CloudMessaging from scratch: I ran pod init and changed the podfile to
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
target 'Google Cloud Push iOS' do
pod 'Google/CloudMessaging'
end
target 'Google Cloud Push iOSTests' do
end
then it works
If I use my podfile
source 'https://github.com/CocoaPods/Specs.git'
#platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 1.3'
pod 'ObjectMapper', '~> 0.14'
pod 'AlamofireObjectMapper', '~> 0.7'
pod 'HanekeSwift'
pod 'Google/CloudMessaging'
the error remains