1

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

enter image description here

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

Kara
  • 5,650
  • 15
  • 48
  • 55
rcpfuchs
  • 712
  • 1
  • 9
  • 25

1 Answers1

4

updating cocoa pods fixes this issue

rcpfuchs
  • 712
  • 1
  • 9
  • 25
  • some how i fixed this issue. But after building that my project this error comes. This file is present in my project. Please anyone tell me any fix. GoogleUtilities/Libraries/libGTM_NSData+zlib.a(GTMNSData+zlib.o)' does not contain bitcode. – Grigo Dec 07 '15 at 09:39
  • try to disable bitcode. google libs do not have it. like this dude sais: http://stackoverflow.com/a/32640217/1432320 – rcpfuchs Feb 17 '16 at 17:22
  • Google added Bitcode on this data 2016-01-25 -- v1.2.0 Add Bitcode markers. – Stalin Pusparaj Aug 11 '16 at 10:29