iOS Error Undefined symbol Testing.Trait
사용 언어: Swift 5
사용 버전: Xcode Version 16.4 (16F6)
사용 버전: Xcode Version 16.4 (16F6)
iOS 오류 Undefined symbol Testing.Trait를 알아보겠습니다.
Xcode를 최신 버전으로 업데이트해서인지, OS를 최신 버전으로 업데이트해서 인지, 잘 되던 빌드가 갑자기 안되었습니다.
오류 내용은 다음과 같습니다.
Showing Recent Messages
Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Could not find or use auto-linked framework 'Testing': framework 'Testing' not found
Could not parse or use implicit file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbol: associated type descriptor for Testing.Trait.TestScopeProvider
Undefined symbol: protocol descriptor for Testing.SuiteTrait
Undefined symbol: method descriptor for Testing.SuiteTrait.isRecursive.getter : Swift.Bool
Undefined symbol: (extension in Testing):Testing.SuiteTrait< where A: Testing.TestScoping>.scopeProvider(for: Testing.Test, testCase: Testing.Test.Case?) -> A?
Undefined symbol: base conformance descriptor for Testing.SuiteTrait: Testing.Trait
Undefined symbol: protocol descriptor for Testing.TestScoping
Undefined symbol: method descriptor for Testing.TestScoping.provideScope(for: Testing.Test, testCase: Testing.Test.Case?, performing: @Sendable () async throws -> ()) async throws -> ()
Undefined symbol: protocol descriptor for Testing.Trait
Undefined symbol: method descriptor for Testing.Trait.scopeProvider(for: Testing.Test, testCase: Testing.Test.Case?) -> A.TestScopeProvider?
Undefined symbol: associated conformance descriptor for Testing.Trait.Testing.Trait.TestScopeProvider: Testing.TestScoping
Undefined symbol: method descriptor for Testing.Trait.prepare(for: Testing.Test) async throws -> ()
Undefined symbol: method descriptor for Testing.Trait.comments.getter : [Testing.Comment]
Undefined symbol: (extension in Testing):Testing.Trait.prepare(for: Testing.Test) async throws -> ()
Undefined symbol: async function pointer to (extension in Testing):Testing.Trait.prepare(for: Testing.Test) async throws -> ()
Undefined symbol: (extension in Testing):Testing.Trait.comments.getter : [Testing.Comment]
Undefined symbol: protocol descriptor for Testing.TestTrait
Undefined symbol: base conformance descriptor for Testing.TestTrait: Testing.Trait
Linker command failed with exit code 1 (use -v to see invocation)
Testing을 찾을 수 없다니, 너무 황당했어요.
많은 시행착오 끝에 알아낸 해결법입니다.
프로젝트를 눌러주시고 TARGETS에서 프로젝트를 선택 후, Build Phases로 갑니다.
거기에 Link Binary With Libraries 영역이 있습니다.
'+'를 누른 후, 아까 없다는 라이브러리 이름 'testing'을 검색해서 Add 해 줍니다.
그다음 이것을 Required가 아닌 Optional로 변경해 줍니다.
왜냐하면 이 라이브러리는 테스트할 때만 필요하니까요.
그럼 빌드를 다시 해봅시다.
굿.
끝.
카테고리: iOS
댓글
댓글 쓰기
궁금한 점은 댓글 달아주세요.
Comment if you have any questions.