[iOS] carthage 사용하기 + swift-ipfs-api 빌드하기

in #carthage6 years ago (edited)

carthageCocoaPods과 함께 많이 사용하는 iOS 라이브러리 관리툴입니다.

저는 개인적으로 Cocoapods을 많이 사용하는 편이었습니다.

그러나 최근에 Swift의 등장으로 CocoaPods의 빌드속도가 상당히 느렸습니다.

더군다나 경험상 Objective-C와 Swift를 동시에 개발해야되는 상황에서는 빌드 속도가 더욱더 느렸습니다.

그로인해 더욱 주목받게된 라이브러리 관리툴이 carthage입니다.

carthage에 익숙하지 않은 상태에서 IPFS(InterPlanetary File System) 테스트하는데 발생한 문제를 해결하는 방법을 공유합니다.

IPFS에서 배포한 오픈소스로 테스트 해볼려고 했던 소스입니다.

https://github.com/ipfs/swift-ipfs-api

carthagebrew로 설치 하실 수 있습니다.

$ brew update
$ brew install carthage

설치를 하고 나서 다운받은 소스의 압축을 풀어봅니다.

CocoaPods은 $ pod update로 업데이트 할수 있지만 carthage는 아래와 같은 명령어로 설정한 소스를 업데이트 / 빌드 할 수 있습니다.

$ carthage update

저는 한동안 다른 업무를 보느라 Xcode를 관리 안했는데요.
이로 인해 빌드중 에러가 발생했습니다. 😭

A shell task (/usr/bin/xcrun xcodebuild -project /Users/jik/Downloads/swift-ipfs-api-1.1.0/Carthage/Carthage/Checkouts/SwiftGMP/SwiftGMP.xcodeproj CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 72:
xcrun: error: unable to find utility “xcodebuild”, not a developer tool or in PATH

해결 방법은 다음과 같습니다.

Xcode > Preferences > Locations > Command Line Tools 선택이 안되어서 그런겁니다.

Xcode를 업데이트 했다거나, 새로 설치 했을때 나올 수 있는 현상입니다.


#mycreditchain에서 개발자로 먹고 살고 있고, #iOS, #BlockChain, #ICO, #Cryptocurrency‎에 관심이 많습니다.

Sort:  

Congratulations @jakejeong! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Congratulations @jakejeong! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Use your witness votes and get the Community Badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!