{"id":20564095,"url":"https://github.com/clintjang/sample-ios-carthage","last_synced_at":"2025-04-14T15:10:14.132Z","repository":{"id":99120050,"uuid":"162787520","full_name":"ClintJang/sample-ios-carthage","owner":"ClintJang","description":"iOS 라이브러리 관리도구인 Carthage 를 적용해본 샘플입니다.  미디엄에 글을 쓰고 예제 소스 링크를 위해 만들었습니다.","archived":false,"fork":false,"pushed_at":"2018-12-29T01:50:46.000Z","size":1412,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T15:10:04.706Z","etag":null,"topics":["carthage","exemple","ios","medium","sample","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClintJang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-22T06:28:11.000Z","updated_at":"2020-08-26T05:44:23.000Z","dependencies_parsed_at":"2023-06-04T00:00:32.503Z","dependency_job_id":null,"html_url":"https://github.com/ClintJang/sample-ios-carthage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fsample-ios-carthage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fsample-ios-carthage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fsample-ios-carthage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fsample-ios-carthage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClintJang","download_url":"https://codeload.github.com/ClintJang/sample-ios-carthage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904640,"owners_count":21180835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","exemple","ios","medium","sample","swift"],"created_at":"2024-11-16T04:23:53.187Z","updated_at":"2025-04-14T15:10:14.123Z","avatar_url":"https://github.com/ClintJang.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS Carthage Sample\niOS 라이브러리 관리도구인 Carthage 를 적용해본 샘플입니다. \u003cbr /\u003e\n미디엄에 글을 쓰고 예제 소스 링크를 위해 만들었습니다.\n\n# [Cartage(카르타고) 사용 설명 링크](https://medium.com/@jang.wangsu/ios-swift-%EC%B9%B4%EB%A5%B4%ED%83%80%EA%B3%A0-carthage-%EB%9E%80-%EC%82%AC%EC%9A%A9%EB%B2%95%EC%9D%80-%EC%98%88%EC%A0%9C-%EB%94%B0%EB%9D%BC%ED%95%98%EA%B8%B0%EA%B9%8C%EC%A7%80-127e71fdd253)\n\u003e 미디엄에 카르타고 설정 방법을 설명한 링크를 작성해 두었습니다.\u003cbr /\u003e\n자세한 설명은 링크를 참고해주세요.\n- [https://medium.com/@jang.wangsu/ios-swift-카르타고-Carthage-란-사용법은-예제-따라하기까지-127e71fdd253](https://medium.com/@jang.wangsu/ios-swift-카르타고-Carthage-란-사용법은-예제-따라하기까지-127e71fdd253)\n\n# 실행시 참고 사항\n## Brew \n\u003e macOS 용 패키지 관리자인 Brew 가 설치 되어있어야 합니다.\n\n```\n$ brew update\n// 미설치시\n$ brew install carthage\n// 설치가 된 경우\n$ brew upgrade carthage\n```\n\n## Carfile\n\u003e Carfile 을 작성합니다.\n\n- RxSwift 만 라이브러리로 추가했습니다.\n\n```\ngithub \"ReactiveX/RxSwift\"\n```\n- [파일 링크](https://github.com/ClintJang/sample-ios-carthage/blob/master/Cartfile) \n\n## 라이브러리 설치\n\u003e Carthage Update 명령을 통해 업데이트 합니다.\n\n```\n$ carthage update\n\nor \n\n// Tip : iOS 폴더만 생성하기\n$ carthage update --platform iOS\n```\n\n- Framework 파일이 생겼습니다.\n\n\u003cimg width=\"400\" src=\"/Image/carthage_create_framework01.png\"\u003e\u003c/img\u003e\n\n\n그리고 프로젝트를 실행해서 \n`Link Binary With Libraries`, `Linked Frameworks and Libraries` 에서 생성된 Framework 중 사용할 Framework를 추가해 줍니다.\n\n- Link Binary With Libraries\n\n\u003cimg width=\"400\" src=\"/Image/carthage_add_framework_01.png\"\u003e\u003c/img\u003e\n\n- or Linked Frameworks and Libraries\n\n\u003cimg width=\"400\" src=\"/Image/carthage_add_framework_01.png\"\u003e\u003c/img\u003e\n\n\n마지막으로 Run Script 를 추가해서 \nFramework 를 가져올 수 있도록 하여줍니다.\n\n\u003cimg width=\"400\" src=\"/Image/carthage_runscript_01.png\"\u003e\u003c/img\u003e\n\n\n1. Run Script 에 추가 : `/usr/local/bin/carthage copy-frameworks`\n\n\u003cimg width=\"400\" src=\"/Image/carthage_runscript_02.png\"\u003e\u003c/img\u003e\n\n2. input files 에 추가 : `$(SRCROOT)/Carthage/Build/iOS/라이브러리명.framework`\n\n\u003cimg width=\"400\" src=\"/Image/carthage_runscript_03.png\"\u003e\u003c/img\u003e\n\n## 실행\n- [ViewController.swift](https://github.com/ClintJang/sample-ios-carthage/blob/master/JWSCarthageSample/ViewController.swift) 에 코드를 추가하고 빌드/실행\n\n```\nimport UIKit\nimport RxSwift \t// 추가한 라이브러리\nimport RxCocoa\t// 추가한 라이브러리\n\nclass ViewController: UIViewController {\n\n    var disposeBag =  DisposeBag()\n    @IBOutlet weak var testButton: UIButton!\n    @IBOutlet weak var testLabel: UILabel!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        testButton.rx.tap\n            .subscribe(onNext:{ [weak self] _ in\n                guard let self = self else { return }\n                self.testLabel?.text = \"\u003e\u003e\u003e\u003e 클릭했군!!\" })\n            .disposed(by:disposeBag)\n        \n    }\n}\n```\n\n** 정상동작 ** ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjang%2Fsample-ios-carthage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclintjang%2Fsample-ios-carthage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjang%2Fsample-ios-carthage/lists"}