본문 바로가기

전체 글148

.xcodeproj란? 안녕하세요 ◠‿◠ 고고입니다. .xcodeproj vs .xcworkspace Project를 생성하면 .xcodeproj라는 파일로 보이지만 디렉토리가 생성됩니다. Workspace는 여러 개의 Project를 담아 관리할 수 있도록 해주는 개념입니다. Workspace는 대부분 CocoaPods을 처음 사용할 때 접해보았을 것입니다. CocoaPods는 본래의 프로젝트와는 별도로 Project를 만들어서 라이브러리 의존성을 관리할 수 있도록 해주는 도구입니다. 이런 workspace는 .xcworkspace라는 디렉토리입니다. .xcodeproj project.pbxproj - 실제 프로젝트의 설정을 담은 파일입니다. 해당 파일을 열어보면 프로젝트 내부에서 생성된 파일들을 파일 유형에 따라 refer.. 2021. 11. 9.
[Swift] 스택 안녕하세요 ◠‿◠ 고고입니다. 스택 스택은 블록을 아래부터 위로 쌓아 올리는 구조를 가지고 있습니다. LIFO(Last-in, first-out), 후입선출. 가장 마지막에 삽입한 데이터를 가장 먼저 사용하게 됩니다. 서류를 예로 들 수 있습니다. 함수 (1) 삽입 (Push) : Push는 맨 위에 데이터가 저장 됩니다. (2) 삭제 (Pop) : 데이터를 삭제하는 것을 Pop이라 합니다. Pop도 맨 위 데이터가 삭제됩니다. (3) 읽기 (Peek) : 마지막 위치(top)에 해당하는 데이터를 읽습니다. 이 때, top의 변화는 없습니다. 구현 public struct Stack { private var storage: [Element] = [] public init() { } public init(.. 2021. 11. 9.
[WWDC21] Host and automate your DocC documentation 영상 : https://developer.apple.com/videos/play/wwdc2021/10236/ Host and automate your DocC documentation - WWDC21 - Videos - Apple Developer Find out how you can easily host your Swift package and framework DocC documentation online. We'll take you through configuring your web... developer.apple.com 안녕하세요 ◠‿◠ 고고입니다. Hosting Documentation 1. Developer Documentation 창에서 Export하기 Export해서 나온 .doccarc.. 2021. 11. 8.
[WWDC21] Meet DocC documentation in Xcode 영상 : https://developer.apple.com/videos/play/wwdc2021/10166/ Meet DocC documentation in Xcode - WWDC21 - Videos - Apple Developer Discover how you can use DocC to build and share documentation for Swift packages and frameworks. We'll show you how to begin generating... developer.apple.com 안녕하세요 ◠‿◠ 고고입니다. DocC(Document Compiler)는 쉽게 말하자면 Apple Developer Documentation처럼 패키지를 문서화할 수 있는 것입니다. Quick.. 2021. 11. 7.
The Magic of Sourcery 번역 Sourcery란 Swift용 코드 생성 툴입니다. 대부분의 개발자가 "보일러 플레이트"라고 부르는 매우 반복적인 자동 생성 코드에 적합합니다. Ex) Equatable 구현 Hashable 구현 struct 생성자 Lens 구현 역주 : Mock과 Stub도 만들 수 있습니다. 간단하게 기본적인 Mac command line 앱부터 시작하겠습니다. 이 앱에는 간단한 타입이 있습니다. struct Person { var firstName: String var lastName: String var birthDate: Date var age: Int { return Calendar.current.dateComponents([.year], from: birthDate, to: Date()).year ?? -1.. 2021. 11. 7.
Nimble library not found for -lswiftXCTest 안녕하세요 ◠‿◠ 고고입니다. https://github.com/Quick/Nimble/issues/863를 보고 임시방편으로 Podfile 밑에 이걸 추가하니 오류가 해결되었습니다. post_install do |installer| installer.pods_project.targets.each do |target| if target.name == "Nimble" target.build_configurations.each do |config| xcconfig_path = config.base_configuration_reference.real_path xcconfig = File.read(xcconfig_path) new_xcconfig = xcconfig.sub('lswiftXCTest', 'lXCT.. 2021. 11. 7.