首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iOS GCM示例的无效Podfile

iOS GCM示例的无效Podfile
EN

Stack Overflow用户
提问于 2016-05-18 13:01:50
回答 1查看 713关注 0票数 0

我正在尝试安装GCM示例Xcode项目,遵循Google开发人员页面https://developers.google.com/cloud-messaging/ios/start上的说明。

但是,在第1步中,这个消息失败了:

代码语言:javascript
复制
[!] Invalid `Podfile` file: [!] The specification of `link_with` in the Podfile is now unsupported, please use target blocks instead..

全文如下:

代码语言:javascript
复制
$ pod try Google --no-repo-update

Trying Google
1: Samples/admob/AdMobExample.xcodeproj
2: Samples/analytics/AnalyticsExample.xcodeproj
3: Samples/appinvites/AppInvitesExample.xcodeproj
4: Samples/gcm/GcmExample.xcodeproj
5: Samples/signin/SignInExample.xcodeproj
Which project would you like to open
4
Performing CocoaPods Installation

[!] Invalid `Podfile` file: [!] The specification of `link_with` in the Podfile is now unsupported, please use target blocks instead..

 #  from /private/var/folders/d5/f4qpz1r530xbw5cyrbfk094h0000gp/T/CocoaPods/Try/Google/Samples/gcm/Podfile:10
 #  -------------------------------------------
 #  # and delete the link_with command.
 >  link_with 'GcmExample', 'GcmExampleSwift'
 #  ------------------------------------------

我尝试按照错误消息中的建议修改podfile,但是Podfile是重新生成的,即使在与--no-repo-update option一起运行时也会产生相同的错误。

我以前没有使用过Pods的经验,所以任何建议都很感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-18 13:44:55

转到路径:"/private/var/folders/lx/78jh00l90p95cs1cy_545t2r0000gn/T/CocoaPods/Try/Google/Samples/gcm“,然后打开pod文件并将其更新为

代码语言:javascript
复制
# GcmExample
 target 'GcmExample' do
  platform :ios, '7.0'
   pod 'Google/CloudMessaging'
end
# If using CocoaPods 1.0.0+, use the new target syntax.
#target 'GcmExample'
#target 'GcmExampleSwift'

# and delete the link_with command.
#link_with 'GcmExample', 'GcmExampleSwift'

然后,吊舱安装

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37300439

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档