我正在尝试在iOS项目上集成GoogleCloudMessaging(GCM)。 (Cocos2d-x v3.2)
按照Google的说明,(https://developers.google.com/cloud-messaging/ios/client
我使用cocoapods,但失败,并出现以下错误。

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

- `GoogleCloudMessaging` required by `Podfile`


这是我测试过的。


在cocos2dx项目(v3.2)上安装GCM->失败。
创建一个非cocos2dx项目并安装GCM->成功
在cocos2dx项目上安装GoogleAnalytics->成功。
使用v3.7创建一个cocos2dx项目并安装GCM->失败。


我尚不知道为什么安装GCM会失败,但GoogleAnalytics不会。
有没有人成功将GCM集成到iOS?

编辑

这是我的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

最佳答案

我可以通过参考cocos2d-x论坛中的帖子来解决此问题。
在Xcode项目设置中将Deployment Target更改为7.0或更高版本将清除此问题。

09-17 05:45