我正在尝试安装GCM示例Xcode项目,遵循Google开发人员页面https://developers.google.com/cloud-messaging/ios/start上的说明。
但是,在第1步中,这个消息失败了:
[!] Invalid `Podfile` file: [!] The specification of `link_with` in the Podfile is now unsupported, please use target blocks instead..全文如下:
$ 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的经验,所以任何建议都很感激。
发布于 2016-05-18 13:44:55
转到路径:"/private/var/folders/lx/78jh00l90p95cs1cy_545t2r0000gn/T/CocoaPods/Try/Google/Samples/gcm“,然后打开pod文件并将其更新为
# 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'然后,吊舱安装
https://stackoverflow.com/questions/37300439
复制相似问题