How do I setup Carthage to use my own Frameworks that are in private repository like Stash (Bitbucket)?

蓝咒 提交于 2019-11-28 23:25:44

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

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!