I was wondering if there is something like private pods in Carthage
, I have a couple of frameworks and I'm currently using git submodules
, I started using Carthage
for a new project and is pretty nice but so far I just configured it to manage third party Frameworks dependencies. I've checked the carthage documentation but is not that clear on how to set it up.
Does Carthage
work only with Github
repos? Can it work with Atlassian-Stash
(now Bitbucket
)? If so how?

- 1,665
- 1
- 22
- 32
3 Answers
So I finally found out how to setup Carthage with a Atlassian-Bitbucket
on the Cartfile
i Just need to define the dependency origin which is the git repository
Enterprise git repository like Atlassian-Stash(Bitbucket)
git "https://stashRepo"
it also works with ssh://
Or local project
git "file:///directory/to/project" "branch"
UPDATE
Carthage has now added extra documentation on how the OGDL works in the Cartfile

- 1,665
- 1
- 22
- 32
-
3git "file:///directory/to/project" "branch" – harshit2811 Feb 14 '17 at 11:34
-
1You must commit to your local branch as well. Uncommitted changes will not be built. – Mike Taverne Nov 09 '19 at 17:17
Solutions to Carthage Development Framework
To code a framework in a way similar to developing using CocoaPods Development Pods, there are solutions ready to used with Carthage.
Solution 1 - The Local Path Way
This solution is quiet convenient than alternative solutions.
Step 1. Add local path into Cartfile
For example,
Add local path into Cartfile
git "PATH_TO_LOCAL_DEVELOPING_FRAMEWORK_SOURCE_ROOT_DIRECTORY" "BRANCH_NAME"
Step 2. Update Carthage dependency
For example,
Update Carthage dependency using Cartfile
$ carthage update $DEVELOPING_FRAMEWORK_NAME --platform iOS --cache-builds --configuration Debug
To debug with breakpoints or to develop a framework in main project, add developing framework project reference $(DEVELOPING_FRAMEWORK).xcodeproj
into the main application, and build the main app in Xcode.
Caution
Remove developing overhead (such as the changes in $(MAIN_APP_NAME).xcodeproj/project.pbxproj
due to the addition of developing framework project reference) before committing the changes to remote repo.
Solution 2 - The Symbolic Linking Way
Tested Environment
- Xcode 10.1
- macOS 10.13.6

- 3,384
- 5
- 40
- 64
Cartfile source location
github
- GitHub repository
github "<owner>/<repo>" //GitHub.com
github "https://<path>" //GitHub Enterprise Server
git
- Git repository
git "https://<path>" //remote
git "ssh://<command>" //ssh connection
git "file:///<path>" "<branch_name>" //local
binary
- precompiled binary
binary "https://<path>.json" //remote
binary "file:///<path>.json" //local
Please note that file:/
is used for local files which is useful for developing/debugging dependency. Do not forget to commit changes before using git

- 29,217
- 8
- 193
- 205