Xcode 8 Beta-현재 Swift 구문으로 변환 실패 : 테스트 호스트를 찾을 수 없습니다
Xcode 8의 변환 마법사를 사용하려고 할 때 오류 메시지가 나타납니다. 재부팅, 새로운 코드 다운로드 및 DerivedData 파일 삭제 후이 오류를 피할 수 없습니다.
현재 스위프트 구문으로 변환 실패 : 테스트 호스트를 찾을 수 없습니다
Swift 2.3과 Swift 3의 두 가지 옵션을 모두 시도했습니다. 버전을 선택한 후 즉시 해당 오류가 발생합니다.
다음은 오류의 스크린 샷입니다.
이것은 나를 위해 일했다 :
- 왼쪽 브라우저에서 Xcode 프로젝트를 선택하십시오.
- 프로젝트
General
탭 에서 테스트 대상을 클릭 하십시오. - "테스트"를 공개하십시오. 내 프로젝트에서 "호스트 애플리케이션"풀다운 버튼이 비어있었습니다. 적절한 호스트 응용 프로그램을 선택하십시오.
- 지금 테스트 대상을 작성하십시오. 성공하면 구문도 변환해야합니다.
I had this problem after installing the Xcode 8 beta so I assume this is related.
It cost me a bit of time to find the "Host Application" pulldown mentioned in the otherwise very helpful answer by iluvcapra.
So this is what he meant:
This is where you find the pulldown menu. Select your main target.
I find easy fix for this, just edit your Scheme and disable tests.
And run conversion again.
+1 iluvcapra
Alternatively, use text editor to remove the following two items from your MyAppSwift.xcodeproj/project.pbxproj file, search for TEST_HOST
Now, re-open your project and run the convert wizard again.
4EFFFAE51B53D5D8003CD25A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "AF SwiftTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "FA SwiftTests";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AF Swift.app/AF Swift";
};
name = Debug;
};
4EFFFAE61B53D5D8003CD25A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = "AF SwiftTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "FA SwiftTests";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AF Swift.app/AF Swift";
};
name = Release;
};
Please try these Steps:
- Select your project on the left side of Xcode.
- Go to Targets and select your Project Tests.
- Select the General Tab and select Host Application drop down and choose your Host Application.
- Convert or Run your project.
Trying these steps worked for me.
In my case I deleted my tests target, then re-added it using the + below targets and selecting "iOs Unit Testing Bundle"
For some reason this got a compile error, so I changed the "Per-configuration Intermediate Build Files Path: for my test target to $(PROJECT_TEMP_DIR)/$(CONFIGURATION) for both debug and release. This allowed the compile to work.
Fix this in 3 steps:
- First delete your test target
- The select Edit -> Convert -> To current Swift syntax... and perform the conversion
- Then add a new test target
'IT박스' 카테고리의 다른 글
T-SQL을 사용하여 하위 문자열의 마지막 항목 색인 찾기 (0) | 2020.07.22 |
---|---|
왜 SQL을 좋아하지 않습니까? (0) | 2020.07.22 |
APK가 서명되었거나 "디버그 빌드"인지 확인하는 방법 (0) | 2020.07.22 |
div를 세로로 가운데에 배치하는 방법은 무엇입니까? (0) | 2020.07.22 |
사용자 지정 MSBuild 작업을 만들 때 C # 코드에서 현재 프로젝트 디렉토리를 얻는 방법은 무엇입니까? (0) | 2020.07.22 |