This repository has been archived by the owner on Aug 3, 2022. It is now read-only.
Add carthage support by creating a standalone Xcode project #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
because we don’t want to remove Example/Pods from gitignore.
Issue to fix
Fix #5
Reason
To be compatible for carthage, since this repo was built with
pod lib create
, it supports it by default, however, the cost is that you should add all the code in theExample/Pods
, into git repo but not ignore them.I don't want to add
Example/Pods/*
into the git repo, which will contains many code from third-party depedency, and it may cause unnecessary merge conflict during branch switch.Solution
Another solution, just create a standalone Dynamic Framework Xcode project, then all thing done. We use
Cartfile
to manage the dependency for this Xcode project.So, for Carthage support, I remove the pod tempalte
_Pod.xcodeproj
file, and create a new standalone one, just adding all the source files and theInfo.plist
from the original Pods project, then everything work.Addtional consideration
Now, the
SDWebImageFLPlugin.xcodeproj
useCartfile
to manage its dependency. ButExample/SDWebImageFLPlugin.xcworkspace
usePodfile
to manage its dependency. During each of release, we should both modifyPodspec
as well asInfo.plist
to update the version. When new third-party libs was introduced (But I guess it's not possible from this plugin's design). We need to sync the dependency library's version number. This is not so convient, but it's the current best solution for a both Cocoapods && Carthage compatible solution based on the https://github.com/CocoaPods/pod-template