FLYNNLABAboutMeCodingActivityStudy 2024초등수학
swift 와 cocoapods 프로젝트의 test에서 project module을 로드 실패시
swift, ios, xctest

ISSUE

import XCTest
import topic

class SchemeHandlerTest: XCTestCase {
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }

    func testExample() {
        // This is an example of a functional test case.
        XCTAssert(true, "Pass")
    }

    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measureBlock() {
            // Put the code you want to measure the time of here.
        }
    }

}

cocoapods를 연동한 프로젝트에서 TDD를 하려고 유닛테스트 파일을 만들면 내가 만든 모듈이 임포트 되지 않는 이슈가 발생했다.

RESOLVE

Build Settings 부분을 계속 확인해 보다가 겨우 해결책을 찾았다. PROJECT > somemodule > Info > Configurations > Based on Configuration File 에서 Based on Configuration File 부분을 맞는 phase에 할당을 한다.