{"id":20564016,"url":"https://github.com/clintjang/cocoapods-tips","last_synced_at":"2025-08-22T08:31:22.418Z","repository":{"id":49750754,"uuid":"129773714","full_name":"ClintJang/cocoapods-tips","owner":"ClintJang","description":"iOS 라이브러리를 관리하는 CocoaPods Tip정보 모음입니다.","archived":false,"fork":false,"pushed_at":"2019-01-01T03:38:13.000Z","size":1146,"stargazers_count":201,"open_issues_count":0,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-28T00:22:41.996Z","etag":null,"topics":["cocoapods","cocoapods-tips","gitignore","guide","pod","podfile","pods","tips","xcworkspace"],"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}},"created_at":"2018-04-16T16:28:38.000Z","updated_at":"2024-06-27T09:34:40.000Z","dependencies_parsed_at":"2022-09-10T19:50:59.021Z","dependency_job_id":null,"html_url":"https://github.com/ClintJang/cocoapods-tips","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%2Fcocoapods-tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fcocoapods-tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fcocoapods-tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClintJang%2Fcocoapods-tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClintJang","download_url":"https://codeload.github.com/ClintJang/cocoapods-tips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230575851,"owners_count":18247484,"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":["cocoapods","cocoapods-tips","gitignore","guide","pod","podfile","pods","tips","xcworkspace"],"created_at":"2024-11-16T04:23:31.701Z","updated_at":"2024-12-20T11:07:51.880Z","avatar_url":"https://github.com/ClintJang.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CocoaPods 유용한 정보 모음입니다.\n[![License](http://img.shields.io/badge/License-MIT-green.svg?style=flat)](https://github.com/clintjang/cocoapods-tips/blob/master/LICENSE) [![CocoaPods tips](https://img.shields.io/badge/CocoaPods-Tips-orange.svg?style=flat)](https://cocoapods.org/) [![Swift 4](https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat)](https://swift.org) \n\n[CocoaPods](https://cocoapods.org/)를 감사하게 사용하고 있습니다. 😁\u003cbr /\u003e\n사용하면서 유용했던 정보들을 잘 정리해 두고 싶어서 작성했습니다.\u003cbr /\u003e\n계속 잘 정리해서 처음 사용하시는 분들 혹은 익숙하지 않은 분들에게 도움이 될 수 있도록 하겠습니다. 😊\n- 기본적인 설치, 프로젝트 실행에서 유용한 팁까지 정리해봅니다.\n- 내부에 모듈화 시켜서 사용하는 셈플도 메모하면서 넣어둘 예정입니다.\n\u003e CocoaPods는 Swift 및 Objective-C 프로젝트의 라이브러리 관리자입니다. 45,000 개가 넘는 라이브러리가 있으며 300 만 개가 넘는 App에 사용됩니다. CocoaPod는 프로젝트에서 편리하게 라이브러리를 사용하는 데 도움을 줄 것입니다.\n\n- iOS에서는 추가로 [**Carthage(카르타고)**](https://github.com/ClintJang/sample-ios-carthage) 라는 비슷한 방식도 있습니다. 워크스페이스를 만드는 방식이 아닌 Embbed Framework를 이용하는 방식이죠.\n- android에서의 Maven, Gradle 과 비슷하게 생각하시면 됩니다.\n\u003cbr /\u003e\u003cbr /\u003e\n\u003e\u003e 단, 너무 무분별할 라이브러리 사용은 지양합시다. \u003cbr /\u003e\n자신이 감당할 수 있는 수준으로 사용합시다. \u003cbr /\u003e\nswift는 버전이 계속 변하고 있습니다. 만약 라이브러리 개발하신 분께서 업데이트가 늦거나 업데이트를 하지 않는 상황이 왔을 때, 그걸 대응할 자신이 있어야겠죠?\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n## 목차\n[# 기본적인 설치방법](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-기본적인-설치방법)\u003cbr /\u003e\n\n[# 프로젝트 생성과 초기셋팅방법](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-프로젝트-생성과-초기셋팅방법)\u003cbr /\u003e\n\n[# 맥용 프로그램](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-맥용-프로그램)\n\u003cbr /\u003e\n\n[# 팟 셋팅이 꼬였을때](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-팟-셋팅이-꼬였을때)\n\u003cbr /\u003e\n\n[# 저장소별 무시 목록 작성하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-저장소별-무시-목록-작성하기)\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003e 터미널 명령어\n\n[#1-1 버전정보 확인하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-1-버전정보-확인하기)\u003cbr /\u003e\n\n[#1-2 최신버전으로 업데이트 하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-2-최신버전으로-업데이트-하기)\u003cbr /\u003e\n\n[#1-3 버전 바꾸기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-3-버전-바꾸기)\u003cbr /\u003e\n\n[#1-4 환경정보 보기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-4-환경정보-보기)\u003cbr /\u003e\n\n[#1-5 install vs update](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-5-install-vs-update)\u003cbr /\u003e\n\n[#1-6 오직 한개의 원하는 라이브러리만 업데이트 하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-6-오직-한개의-원하는-라이브러리만-업데이트-하기)\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003e Podfile 작성 팁\n\n[#2-1 def 사용](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-1-def-사용)\u003cbr /\u003e\n\n[#2-2 Debugging 에서만 사용하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-2-Debugging-에서만-사용하기)\u003cbr /\u003e\n\n[#2-3 git의 repository에서 직접 가져오기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-3-git의-repository에서-직접-가져오기)\u003cbr /\u003e\n\n[#2-4 xcode에서 pods 프로젝트 경고 없애기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-4-xcode에서-pods-프로젝트-경고-없애기)\u003cbr /\u003e\n\n[#2-5 로컬 폴더에 라이브러리 소스를 다운받고 pods 라이브러리 연결하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-5-로컬-폴더에-라이브러리-소스를-다운받고-pods-라이브러리-연결하기)\u003cbr /\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003e 코코아팟츠에 자신의 라이브러리 등록하기\n\n[#3-1 코코아팟츠에 자신의 라이브러리 등록해본 과정](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#3-1-코코아팟츠에-자신의-라이브러리-등록해본-과정)\u003cbr /\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\n## [# 기본적인 설치방법](https://guides.cocoapods.org/using/getting-started.html)\n\n\u003e Ruby gem이 필요합니다. CocoaPods는 Ruby로 제작되었으며 macOS에서 사용할 수있는 기본 Ruby로 설치할 수 있습니다. \n\n\ncocoapods 를 설치합니다.\n```\n$ sudo gem install cocoapods\n```\n\n설치 후에 setup을 실행해서 CocoaPods master repo 를 설정합니다.\n- setup : Setup the CocoaPods environment 이라 적혀있네요. \n- 필요한 파일을 다운로드해서 Pods를 이용할 준비를 합니다.\n```\n$ pod setup\n```\n\n기본적인 사용을 위한 설정을 완료했습니다. 이제 xcode에 라이브러리 설치가 가능합니다.\n초기 프로젝트, Pods 최신버전, 베타버전, 버전 변경은 아래에서 확인해주세요.\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [# 프로젝트 생성과 초기셋팅방법](https://guides.cocoapods.org/using/using-cocoapods.html)\n\n1. 프로젝트를 생성합니다.\n2. 프로젝트의 해당 폴더로 이동합니다.\n\t1. 프로젝트.xcodeproj 파일이 있는 폴더로 이동합니다.\n\n```\n$ cd 프로젝트경로 \n```\n3. Podfile 파일을 생성합니다.\n```\n$ pod init\n```\n\n4. Podfile 파일을 편집합니다.\n\t1. 능력 것 편집 합니다. (tool 이나 vi 등등)\n```\ntarget '프로젝트명' do\n  # 스위프트를 사용하지 않고 동적 라이브러리를 이용하지 않는다면 아래 구문을 주석처리 합니다\n  use_frameworks!\n\n  # 대표적인 네트워크 라이브러리입니다.\n  pod 'Alamofire'\n\n  # 스넵킷이라는 오토레이아웃을 소스 코드 구현을 용이하게 해주는 라이브러리입니다.\n  pod 'SnapKit'\nend\n```\n\n5. 참고로 지원하는 라이브러리가 있는지 찾아 볼때?\n```\n$ pod search 라이브러리명\n```\n \n6. Pod를 이용해서 라이브러리 설치하기\n```\n$ pod install\n```\n7. 만들어진 워크스페이스 파일 실행\n\t1. 콜솔 명령어가 아닌 그냥 파일을 찾아 실행하면 됩니다.\n```\n$ . 프로젝트명.xcworkspace\n```\n- or 그냥 클릭으로 프로젝트명.xcworkspace 파일 실행 \n\n\u003cimg width=\"280\" height=\"135\" src=\"/Image/xcworkspace_ok.png\"\u003e\u003c/img\u003e\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [# 맥용 프로그램](https://cocoapods.org/app)\n\n- 다운로드 링크 : https://cocoapods.org/app\n\t1. 제일 밑으로 스크롤 하면 하단에 \"Download CocoaPods.app\" 라는 버튼이 있습니다.\n\t2. 클릭하면 최신 버전의 프로그램을 받을 수 있습니다.\n\nGUI에서 Podfile 관리와 Pod Install, Update가 가능합니다.\n- 이미지로 보면? 실행했을 때 시작화면입니다.\n\n\u003cimg width=\"366\" height=\"322\" src=\"/Image/cocoapodsApp00.png\"\u003e\u003c/img\u003e\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [# 팟 셋팅이 꼬였을때](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-Pod셋팅이-꼬였을때)\n\n이것은 제가 사용하는 방법입니다.\n- Podfile 파일이 있는 폴더 기준입니다.\n1. Pods 폴더포함 모두 삭제\n2. Podfile.lock 파일 삭제\n3. 프로젝트명.xcworkspace 파일 삭제\n4. 프로젝트명.xcodeproj에 마우스를 올리고 오른쪽 클릭, 아래 진행\n\t1. 패키지 내용보기\n\t2. project.pbxproj 과 기타 파일들이 보여질 것입니다.\n\t3. project.pbxproj만 남기고 다른 파일 모두 삭제\n\t\t1. project.pbxproj 파일 1개는 꼭 남기세요.\n\t\t2. 나머지는 과감하게 지우세요.\n\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n\t\u003cth\u003e삭제 전 프로젝트의 폴더\u003c/th\u003e \n    \u003cth\u003e삭제 전 프로젝트 파일의 패키지 내용\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \t\u003ctd\u003e\u003cimg width=\"275\" height=\"84\" src=\"/Image/pod_error_before01.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"333\" height=\"82\" src=\"/Image/pod_error_before02.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \t\u003ctd\u003e\u003cimg width=\"305\" height=\"136\" src=\"/Image/pod_error_before03.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"324\" height=\"77\" src=\"/Image/pod_error_before04.png\"\u003e\u003cbr /\u003e휴지통으로~\u003cbr /\u003e\u003cimg width=\"264\" height=\"102\" src=\"/Image/pod_error_before05.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr /\u003e\n\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n\t\u003cth\u003e삭제 후 프로젝트의 폴더\u003c/th\u003e \n    \u003cth\u003e삭제 후 프로젝트 파일의 패키지 내용\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \t\u003ctd\u003e\u003cimg width=\"272\" height=\"58\" src=\"/Image/pod_error_after01.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=\"327\" height=\"82\" src=\"/Image/pod_error_after02.png\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n5. Podfile이 있는 폴더에서 다시 Install Or Update 실행\n\t1. 전 보통 Install을 합니다.\n\n```\n$ pod install\nor\n$ pod update\n```\n\n\n6. 만들어진 프로젝트명.xcworkspace를 실행해서 확인합니다.\n\n- 만약 위 방법으로 안된다면\n\n1. Xcode 실행\n2. 상단 메뉴에서 Xcode - Preferences 실행\n3. Location 탭에 -\u003e Derived Data 가 있어요. \n\t1. /Users/사용자명/Library/Developer/Xcode/DerivedData .. 그리고 화살표 누르면 폴더로 이동하는 데\n\t2. DerivedData 이 폴더 전체를 지우세요. \n\t\t1. 안전하는.. 빌드 오류가 발생하는 프로젝트의 DerivedData 만을 삭제하면 됩니다.\n\t\t2. DerivedData 폴더 전체를 지우면 EditorKit(문법 강조 및 자동완성이 동작하지 않는 치명적인 부작용)이 문제가 있다고 하는 내용을 봤는 데, 저는 반대로 자동완성이 되지 않는 경우에 DerivedData 이 폴더 전체를 지우고 해결되는 경우를 많이 경험했습니다.  \n\u003cbr /\u003e\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [# 저장소별 무시 목록 작성하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#-저장소별-무시-목록-작성하기)\n\n.gitignore 파일을 생성해 두면 편리합니다. \u003cbr /\u003e\n.gitignore 파일이란 Git 버전 관리에서 제외할 파일 목록을 지정하는 파일입니다.\u003cbr /\u003e\n. 표시는 숨김파일을 의미합니다.\u003cbr /\u003e\n```\nFinder에서 아래 단축키를 사용하면 숨겨진 파일이 보여집니다.\n\n단축키 : shift +command + .\n```\n\ngit 파일이 있는 최상위 디렉토리에서 터미널을 실행시켜 내용을 작성합니다.\n\n1. .gitignore 파일을 생성한다.\n```\n$ touch .gitignore \n```\n2. 만들어졌는 지 확인한다면? \n```\n$ ls -a \n```\n3. 편한 방법으로 해당 파일을 편집합니다.\n```\n$ vi .gitignore\n```\n\n내용의 셈플을 [샘플 .gitignore](https://github.com/ClintJang/cocoapods-tips/blob/master/.gitignore)은 아래와 같습니다.\n- .gitignore\n```\n# Pods 관련 (pod install or pod update 해서 자동 생성된 파일들) \nPodfile.lock\nJWSCocoapodsTips.xcworkspace\t\nJWSCocoapodsTips/Pods/\t\t\t\n\n# xcodeproj 안의 불필요파일\n*.xcuserstate\nxcschememanagement.plist\ncontents.xcworkspacedata\n\n# 필요한 내용 더 추가 \n```\n\n4. 설정이 되면 이제 git commit 할때 관련 불필요한 파일은 나타나지 않을거에요~\n\n그리고 이런설정을 쉽게 할 수 있는 킹왕짱 사이트가 있습니다. \u003cbr /\u003e\n그것은 깃이그노어 닷 아이오를 웹 주소에 치시면 됩니다. \u003cbr /\u003e\n- 링크 : http://gitignore.io/ \u003cbr /\u003e\n그리고 아래 이미지와 같이 검색어를 추가하고 \"Create\" 버튼을 누르시면 자동 완성된 코드가 나옵니다.\u003cbr /\u003e\n여기에 필요한 내용을 좀 더 추가하시면 멋진 소스관리가 되실 것 입니다.\u003cbr /\u003e\n\n\u003cimg width=\"458\" height=\"133\" src=\"/Image/pod_gitignore_create.png\"\u003e\n\u003cbr /\u003e\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#1-1 버전정보 확인하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-1-버전정보-확인하기)\n\n\n버전을 확인합니다.\n\n```\n$ pod —-version\n```\n\nGems 의 상세한 버전을 원할 경우 입니다.\n```\n$ gem which cocoapods\n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [#1-2 최신버전으로 업데이트 하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-2-최신버전으로-업데이트-하기)\n\n\n최신버전으로 설치합니다.\n\n```\n$ [sudo] gem install cocoapods --pre\n```\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [#1-3 버전 바꾸기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-3-버전-바꾸기)\n\n제거하고 설치를 하려면 아래와 같이 하면 됩니다.\n1. 먼저, 삭제합니다.\n\n```\n$ [sudo] gem uninstall cocoapods\n```\n\n2. 원하는 버전으로 설치합니다.\n\n```\n$ [sudo] gem install cocoapods -v 1.3.1\n```\n\n\u003cbr /\u003e\n\npods가 설치되어있고, 바로 버전을 바꾸고 싶다면!\n```\n$ pod _1.3.1_ setup\n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [#1-4 환경정보 보기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#1-4-환경정보-보기)\n\nPod 설정 정보가 보고 싶다면\n1. 임의 경로에서 실행\n\t1. Stack : CocoaPods버전, Ruby버전, RubyGems버전, Xcode 버전, Git버전, Ruby lib경로, Repositories 등등.. 여러 정보를 확인할 수 있습니다.\n\t2. Installation Source : pod 설치 경로\n\t3. Plugins : 관련 플러그인 정보\n```\n$ pod env\n```\n\n2. Podfile이 있는 경로에서 실행\n\t1. 1번의 내용에 이어서 Podfile 정보도 같이 출력됩니다.\n```\n$ cd 프로젝트경로\n$ pod env\n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#1-5 install vs update](https://guides.cocoapods.org/using/pod-install-vs-update.html)\n\u003e Podfile.lock 기준으로 업데이트 하느냐 마느냐의 차이입니다. \u003cbr /\u003e\n둘다 기본적으로 Podfile 기준으로 진행합니다.\n\n- \"pod install\" \n\t- Podfile.lock 파일을 기준으로(고려해서) 설치를 합니다.\n\t- 기존에 설치된 라이브러리의 변경점이 있더라도 Podfile.lock에 기존 설정정보가 있다면 업데이트 하지 않습니다. (remove 후에 install 다시해야됩니다.)\n- \"pod update\"\n\t- 모든 Pod 라이브러리를 Pod 저장소(Repositories)에서 새로운 버전이 있으면 최신으로 업데이트 합니다.\n\t- Podfile에 '~\u003ex.y' 과 같이 제한을 걸었다면, 제한 된 버전까지만 업데이트가 되겠지요.\n\n### 저는 사용할 때는..\nPodfile 에 작성할 때는 pod 'MyPod', '~\u003e1.2' 제한을 두어서 항상 자동 최신으로 자동업데이트가 되지 않도록 해두도록 노력하고, update 보다는 install 을 우선 사용합니다. \n\n그리고 필요하면 아래의 1-6에서 개별 업데이트도 가능하니, 라이브러리별 업데이트만 사용하기도 합니다. \n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#1-6 오직 한개의 원하는 라이브러리만 업데이트 하기](https://guides.cocoapods.org/using/pod-install-vs-update.html)\n\n\u003e \u003e 업데이트 다음에 라이브러리 명을 적습니다. \n\n```\n$ pod update [PODNAME]\n```\nex)\n\n```\n$ pod update AFNetworking\n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#2-1 def 사용](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-1-def-사용)\n\n\n아래와 같이 def-end 를 이용해서 사전 정의된 값을 가져와서 사용할 수 있습니다.\n- 재사용성과 깔끔한 정리~\n\n```\ndef network_pods\n\n  # 대표적인 네트워크 라이브러리입니다.\n  pod 'Alamofire'\n  # Alamofire를 사용할 때 상단 상태 바에 통신중일때 기본 인디케이터가 나타나도록 합니다.\n  pod 'AlamofireNetworkActivityIndicator'\n  # Alamofire를 이용할 때 로그를 쉽게 볼 수 있습니다.\n  pod 'AlamofireActivityLogger'\nend\n\ndef core_pods\n\n  # 스넵킷이라는 오토레이아웃을 소스 코드 구현을 용이하게 해주는 라이브러리입니다.\n  pod 'SnapKit'\n  \n  # 유용한 날짜 관련 라이브러리입니다.\n  pod 'SwiftDate'\nend\n\ntarget '프로젝트명' do\n  # 스위프트를 사용하지 않고 동적 라이브러리를 이용하지 않는다면 아래 구문을 주석처리 합니다\n  use_frameworks!\n\n  # 이렇게 위에 정의된 내용을 사용합니다.\n  network_pods\n  core_pods\nend\n```\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [#2-2 Debugging 에서만 사용하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-2-Debugging-에서만-사용하기)\n\nDebugging-에서만-사용하기\n\n```\npod '라이브러리명', :configurations =\u003e ['Debug']\n```\nor 다른 옵션도 가능하죠.\n\n```\npod '라이브러리명', '~\u003e 4.0', :configurations =\u003e ['Debug']\n```\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n## [#2-3 git의 repository에서 직접 가져오기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-3-git의-repository에서-직접-가져오기)\n\ngit에 직접 접근해서 가져오기\n\n```\npod '라이브러리명', :git =\u003e 'https://github.com/라이브러리경로'\n```\nor 그 안의 브런치의 최신 라이브러리가 필요하다면\n\n```\npod '라이브러리명', :git =\u003e 'https://github.com/라이브러리경로', :branch =\u003e '브런치명'\n```\nor tag 정보까지의 라이브러리가 필요하다면?\n\n```\npod '라이브러리명', :git =\u003e 'https://github.com/라이브러리경로', :tag =\u003e '1.0.0'\n```\n\nor 원하는 commit된 부분까지가 필요하다면?\n\n```\npod '라이브러리명', :git =\u003e 'https://github.com/라이브러리경로', :commit =\u003e '0e380832ab'\n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#2-4 xcode에서 pods 프로젝트 경고 없애기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-4-xcode에서-pods-프로젝트-경고-없애기)\n\nPodfile에서 \"inhibit_all_warnings!\" 만 추가하면 간단하게 경고가 사라집니다.\n1. inhibit_all_warnings! 코드 추가 \n```\n\ntarget '프로젝트명' do\n  # 스위프트를 사용하지 않고 동적 라이브러리를 이용하지 않는다면 아래 구문을 주석처리 합니다\n  use_frameworks!\n  \n  # xcode에서 pods의 모든 프로젝트 경고 없애기\n  inhibit_all_warnings!\n\nend\n```\n\nor 라이브러리 별로(개별로).., 원하는 라이브러리만 경고를 사라지게 하고 싶다면?\n\n```\npod '라이브러리명', :inhibit_warnings =\u003e true\n```\n\n2. pod install을 다시 하고\n```\n$ pod install\n```\n\n3. 빌드실행\n\u003e 빌드는 워크스페이스 파일을 실행해서 xcode에서 해야죠~ \n\n- 테스트해 본 상세 내용 : [링크 클릭!](https://github.com/ClintJang/cocoapods-tips/blob/master/JWSCocoapodsTips/Podfile)\n\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#2-5 로컬 폴더에 라이브러리 소스를 다운받고 pods 라이브러리 연결하기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#2-5-로컬-폴더에-라이브러리-소스를-다운받고-pods-라이브러리-연결하기)\n\u003e 회사 여건상, Github에 연결할 수 없다면..\u003cbr /\u003e\n혹은 Mac에 다운 받아 놓고, 그 경로의 소스를 연결하고 싶다면\n\n```\npod '라이브러리명', :path =\u003e '내폴더기준에서 라이브러리 최상위 폴더 위치'\n```\n\n예시로 하나의 진행을 해보면.. (RxSwift 라이브러리 하위 버전이 필요하다면)\n\n1. [RxSwift Github 사이트](https://github.com/ReactiveX/RxSwift)에서 [Releases 탭](https://github.com/ReactiveX/RxSwift/releases)을 클릭합니다.\n\n\u003cimg width=\"537\" height=\"186\" src=\"/Image/pod_ path_ex_01.png\"\u003e\u003c/img\u003e\n\n2. 원하는 버전 (전 임의의 4.3.0 버전)의 소스 (Zip) 다운로드 \n\n\u003cimg width=\"244\" height=\"260\" src=\"/Image/pod_ path_ex_02.png\"\u003e\u003c/img\u003e\n\n3. 원하는 위치에 압축 풀기\n\t* 예시를 위해 현재 프로젝트는 cocoapods-tips/JWSCocoapodsTips, \n\t* 예시를 위한 라이브러리 위치는 cocoapods-library/RxSwift-4.3.0에 설정\n\n\u003cimg width=\"325\" height=\"94\" src=\"/Image/pod_ path_ex_03.png\"\u003e\u003c/img\u003e\t\n\t \n4. podfile 파일 수정 (해당 내용 추가)\n\n```\npod 'RxSwift', :path =\u003e '../../cocoapods-library/RxSwift-4.3.0'\n```\n\n5. 끝으로 터미널에서 pod 명령어 실행 😀\n\n```\n$ pod install\n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## [#3-1 코코아팟츠에 자신의 라이브러리 등록해본 과정](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#3-1-코코아팟츠에-자신의-라이브러리-등록해본-과정)\n\u003e 2017년 10월 18일 테스트 진행했던 과정을 정리한 것입니다.\n\n참고한 유튜브 동영상 링크 : https://www.youtube.com/watch?v=gNMNeqXKnzw\n\n- 참고한 링크 1 : https://guides.cocoapods.org/making/index.html\n- 참고한 링크 2 : https://magi82.github.io/ios-regist-cocoapods/\n\n코코아팟츠는 설치되어있을 거라는 가정하게 아래는 진행사항입니다.\n\n```\n# Go Go!\n1. pod lib create 프로젝트명 : Demo Application이 생성된다.\n - http://guides.cocoapods.org/making/using-pod-lib-create.html : 여기를 참고 하라고 알려줌\n - 질문에 답은.. swfit, yes, none, no.. 통상 이리 하게 된다. 처음에 저도 같은 선택을 했음.\n2. 그리고 github에 프로젝트를 생성한다.\n3. 이후 터미널에서 생성한 레파지토리에 프로젝트를 추가한다.\n\n…or create a new repository on the command line\n\necho \"# 프로젝트명\" \u003e\u003e README.md\ngit init\ngit add README.md\ngit commit -m \"first commit\"\ngit remote add origin https://github.com/ClintJang/프로젝트명.git\ngit push -u origin master\n…or push an existing repository from the command line\n\ngit remote add origin https://github.com/ClintJang/프로젝트명.git\ngit push -u origin master\n\n.. 실제\n3.1. cd 프로젝트명의 폴더\n3.2. git remote add origin https://github.com/ClintJang/프로젝트명.git\n3.3. git add .\n3.4. git commit -m \"Create project via pod\"\n3.5. git push -u origin master\n3.6. 잘 올라갔는 지 레파지 토리 확인\n\n4. 다시 example의 xcode 실행파일로 돌아와서 Podspec Metadata폴더안의 프로젝트명.podspec를 수정한다.\n\n5. pod lib lint 프로젝트명.podspec : 오류가 있는 지 검증한다.\n\n5.1. pod lib lint --verbose : 과정을 보려면\n5.2. pod lib lint --verbose --no-clean : 클린 빌드 하려면\n5.3. pod lib lint --allow-warnings : 경고는 무시하려면\n\n5.4. 프로젝트 passed validation : 이 메시지를 봐야된다.\n5.4.1. 잘 되었는 지 확인은 다른 프로젝트에서 pod를 추가해 보면 된다.\n5.4.2. podfile에 pod '프로젝트명', :path =\u003e '경로/경로/프로젝트명'\n5.4.3. 해당 콘솔에서 pod install\n\n6. git status : 반영할 것이 있는 지 확인한다.\n6.1. git add . : 추가\n6.2. git status :  녹색 확인\n6.3. git commit -m \"해당 수정내역\"\n6.4. git status : 이젠 없을 것임...\n\n7. git tag 0.1.0 -a 버전 정보를 맞춘다. \n7.1. 작성할 내용 추가하고 esc :x로 나온다.\n7.1.1. 귀찮으면 git tag 0.1.0 : 까지 한다.\n7.2. git status 로 상태를 확인한다. push 할 것이 있을 것이다...\n7.3. 혹은 그냥 github site에서 release Tap을 찾아서 거기서 직접 작성해서 같은 버전을 추가한다.!!!\n7.4. 잘 적용되면 git tag 로 확인 \n\n\n8. git push --tags\n8.1.  * [new tag]         0.1.0 -\u003e 0.1.0 메시지를 확인해야된다.\n\n9. pod trunk register 메일주소 '이름' --description='상세'\n9.1. 반드시 메일에서 가서 웹 링크를 클릭해야됩니다!!!!!!! 그리고 \n\n10. pod trunk push\n10.1. 경고가 많으시다면... pod trunk push --allow-warnings\n\n아래의 메시지를 보시면 성공!!! (If you see the message below, you will succeed !!!)\n 🎉  Congrats\n\n 🚀  프로젝트명(\"Project Name\") (0.1.0) successfully published\n 📅  October 18th, 15:34\n 🌎  https://cocoapods.org/pods/프로젝트명(\"Project Name\")\n 👍  Tell your friends!\n \n \n # end\n - Fun day!\n \n```\n\n[Top으로 가기](https://github.com/ClintJang/cocoapods-tips/blob/master/README.md#목차)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjang%2Fcocoapods-tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclintjang%2Fcocoapods-tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjang%2Fcocoapods-tips/lists"}