V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
GhostClock
V2EX  ›  C

到底怎么用 Pod 获取 Gmai 的 SDK

  •  
  •   GhostClock · 2015-07-06 21:20:22 +08:00 · 1140 次点击
    这是一个创建于 3425 天前的主题,其中的信息可能已经有所发展或是发生改变。

    $ pod init

    $pod 'Google-API-Client/Gmail', '~> 1.0'

    $ pod install

    Google的文档是这么说的,但是每次第二步就会有问题,更别说Install了,

    ghost$ pod 'Google-API-Client/Gmail', '~> 1.0'
    [!] Unknown command: Google-API-Client/Gmail,
    Did you mean: plugins

    Usage:

    $ pod COMMAND
    
      CocoaPods, the Cocoa library package manager.
    

    Commands:

    + init       Generate a Podfile for the current directory.
    + install    Install project dependencies to Podfile.lock versions
    + ipc        Inter-process communication
    + lib        Develop pods
    + list       List pods
    + outdated   Show outdated project dependencies
    + plugins    Show available CocoaPods plugins
    + repo       Manage spec-repositories
    + search     Searches for pods
    + setup      Setup the CocoaPods environment
    + spec       Manage pod specs
    + trunk      Interact with the CocoaPods API (e.g. publishing new specs)
    + try        Try a Pod!
    + update     Update outdated project dependencies and create new
                 Podfile.lock
    

    Options:

    --silent     Show nothing
    --version    Show the version of the tool
    --verbose    Show more debugging information
    --no-ansi    Show output without ANSI codes
    --help       Show help banner of specified command
    

    bogon:PortalWaitList ghost$ pod install
    Analyzing dependencies

    CocoaPods 0.38.0.beta.2 is available.
    To update use: gem install cocoapods --pre
    [!] This is a test version we'd love you to try.

    For more information see http://blog.cocoapods.org
    and the CHANGELOG for this version http://git.io/BaH8pQ.

    Downloading dependencies
    Generating Pods project
    Integrating client project

    [!] [!] The Podfile does not contain any dependencies.

    具体应该怎么搞?
    这是Gmail的文档网址
    https://developers.google.com/gmail/api/quickstart/ios

    6 条回复    2015-07-07 09:15:00 +08:00
    GhostClock
        1
    GhostClock  
    OP
       2015-07-06 21:34:50 +08:00
    难道就没人知道吗?Orz
    vixvix
        2
    vixvix  
       2015-07-06 23:06:20 +08:00
    pod 'Google-API-Client/Gmail', '~> 1.0'
    这个放Podfile里。
    pod的文档还是很好懂的...
    GhostClock
        3
    GhostClock  
    OP
       2015-07-07 07:54:32 +08:00
    @vixvix 这么说要在这个工程目录下创建一个Podfile这个文件夹?
    GhostClock
        4
    GhostClock  
    OP
       2015-07-07 08:16:03 +08:00
    @vixvix 应该是把
    pod 'Google-API-Client/Gmail', '~> 1.0'
    这一行放在Podfile,但是放在哪个地方呢?还是随便放?

    # Uncomment this line to define a global platform for your project
    # platform :ios, '6.0'

    target 'Test' do

    end

    target 'TestTests' do

    end
    Dashit
        5
    Dashit  
       2015-07-07 08:53:47 +08:00
    @GhostClock 你先去看下pod怎么用的吧。
    ldp940622
        6
    ldp940622  
       2015-07-07 09:15:00 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1190 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:33 · PVG 02:33 · LAX 10:33 · JFK 13:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.