Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

dreampiggy
Copy link
Collaborator

@dreampiggy dreampiggy commented Aug 29, 2018

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 the Example/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 the Info.plist from the original Pods project, then everything work.

Addtional consideration

Now, the SDWebImageFLPlugin.xcodeproj use Cartfile to manage its dependency. But Example/SDWebImageFLPlugin.xcworkspace use Podfile to manage its dependency. During each of release, we should both modify Podspec as well as Info.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

…e don’t want to remove Example/Pods from gitignore
@bpoplauschi bpoplauschi merged commit 8256c75 into master Aug 29, 2018
@bpoplauschi bpoplauschi deleted the feature_carthage branch August 29, 2018 07:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Carthage installation not working
2 participants