GoogleCloudMessaging integration on iOS using cocoapods

Hello everyone. :smile:
I’m trying to integrate GoogleCloudMessaging(GCM) on iOS project. (Cocos2d-x v3.2)
As per the google’s instruction, (https://developers.google.com/cloud-messaging/ios/client)
I use cocoapods but failed with following error.

$ pod install
Updating local specs repositories
Analyzing dependencies
[!] Unable to satisfy the following requirements:

- `GoogleCloudMessaging` required by `Podfile`

Here are what I tested.

  • install GCM on cocos2dx project (v3.2) -> failed.
  • create a non-cocos2dx project and install GCM -> succeeded
  • install GoogleAnalytics on cocos2dx project -> succeeded.
  • create a cocos2dx project using v3.7 and install GCM -> failed.

This is my Podfile.

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'SampleApp iOS' do
        pod 'GoogleCloudMessaging'
end

target 'SampleApp Mac' do

end

I don’t have any clue yet why installing GCM is failed but GoogleAnalytics is not.
Is there anyone who succeed integrating GCM on iOS?

Seems like GoogleCloudMessaging require minimum iOS version to be 7.0

1 Like

Thanks for your answer MikhailSh!
I could solve this problem by changing Deployment Target to 7.0 in Xcode project setting.