Use a fork of Restkit on github via CocoaPods?

前端 未结 2 1224
迷失自我
迷失自我 2020-12-23 07:33

restkit is using in a different way the oauth2 protocol, I need to change the code to be able to use it in my way:

From:

// OAuth 2 valid request
if          


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 07:59

    You certainly can. Take a look at https://github.com/CocoaPods/CocoaPods/wiki/Dependency-declaration-options

    If RestKit included its .podspec file in the repository then you could just change your Podfile to point to your fork i.e.

    pod 'RestKit', :git => 'https://github.com/you/RestKit.git'
    

    Unfortunately RestKit does not include its .podspec. Instead copy RestKit.podspec from https://github.com/CocoaPods/Specs/blob/master/RestKit/0.10.2/RestKit.podspec and add it to your project. Edit the .podspec to use your fork as its source. You can then specify a local .podspec in your Podfile:

    pod 'RestKit', :podspec => 'local/path/to/RestKit.podspec'
    

    Alternately you might just add this .podspec to your fork and use the former dependency declaration.

提交回复
热议问题