Install the latest Google-api-objectivec-client with Cocoapods

Asked 1 months ago, Updated 1 months ago, 4 views

I would like to install the Google-api-objectivec-client below with Cocoapods.
https://code.google.com/p/google-api-objectivec-client/

Cocoapods install 1.0.422 (Rev422).
https://github.com/CocoaPods/Specs/tree/master/Specs/Google-API-Client

We are currently looking for a way to install the latest Rev446.

In github, if you add:head, it will be the latest commit, but
I'm having trouble finding a way with svn.

Podfile
source'https://github.com/CocoaPods/Specs.git'

platform:ios, '7.1'
Inhibit_all_warnings!

pod 'google-api-objectivec-client',:head

Environment
xcode 6.3
cocoapods 0.37.2

ios objective-c cocoapods

2022-09-30 11:44

1 Answers

I think it's easy to write your own Podspec that references the latest revision and install it using it.

Below is probably the minimum installable Podspec.As I looked at the link above, there were more descriptions of the original Podspec, so I probably need to write more.

Pod::Spec.new do|s|
  s.name= "Google-API-Client"
  s.version="1.0.446"
  s.ios.deployment_target="5.0"

  s.source={svn:'http://google-api-objectivec-client.googlecode.com/svn/trunk/', revision:'446'}
  s.dependency 'gtm-http-fetcher', '~>1.0.141'
  s. dependency 'gtm-oauth2', '~>1.0.125'

  s.requires_arc=false
end

From the Podfile side, use it as follows:

 pod 'Google-API-Client', :podspec=>'./Google-API-Client.podspec'

This example shows that Podfile and Google-API-Client.podspec are in the same directory.Some people manage it using Gist, and you can use source to specify a custom Spec repository, so you can use it.


2022-09-30 11:44

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.