I've added MKStoreKit version 4.99 to my project using cocoapods. My Podfile consists of:
platform :ios, '6.0'
pod 'MKStoreKit', '~> 4.99'
MKStoreKit has a configuration file called MKStoreKitConfigs.h that needs to be modified on a per-project basis, and I've modified the file appropriately. What will happen when MKStoreKit releases a new version, say 5.0, and I execute pod update
? Will my changes be overwritten? Could you describe why yes or why no?
Yes, pod update will overwrite your changes. What you could do is fork the project on Github make the changes in your fork and point Cocoapods to the fork. See Use a fork of Restkit on github via cocoaPod? on how to do that.
As I understand it's a known problem and also as one said: "this is kind of bad practice to configure 3rd party lib in header file".
So at first you can take a look at this commit. IMO this is a better way to configure it.
Also you can add your fork as a Pod using:
pod 'MKStoreKit.MyFork', :path => 'MKStoreKit.MyFork.podspec'
EDIT:
Thanks to rounak for noticing, :local
is now :path
. From cocoapods docs:
Using this option (
:path
) CocoaPods will assume the given folder to be the root of the Pod and will link the files directly from there in the Pods project. This means that your edits will persist between CocoaPods installations. The referenced folder can be a checkout of your favourite SCM or even a git submodule of the current repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With