#ios #xcode #xctest
Вопрос:
Версия Xcode: 13.1
Я пытаюсь использовать модульный тест, но он плохо работает.
Когда до pod install
нормы модульный тест работает хорошо, как показано ниже.
import XCTest ... gt; func testPrint(){ print("test") }
Но это еще не все. Я использую свой код. так что импортируйте его.
import XCTest @testable import MY_PROJECT_NAME gt; func testPrint(){ print("test") }
И я использую множество библиотек, pod install
или pod update
, а затем,
Когда я запускаю модульный тест, он ожидает(приостановить?) Testing...
около 10~(мин) и, наконец, я получил эти журналы
LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set
Я не знаю и не смог найти
- Что
file
написано - Где установить
Filename
Я искал здесь, но не знаю, что установить.
MY_PROJECT.xcodeproj/xcshareddate/MY_PROJECT.xcscheme
MY_PROJECT.xcodeproj/xcuserdata/MY_MAC_NAME.xcuserdatad/xcschemes/xcschememanagement.plist
Что я могу попробовать?
Ответ №1:
Я использовал Podfile
неправильно.
до
platform :ios, '12.0' target 'PROJECT' do use_frameworks! # libraries ... target 'PROJECTTests' do # ... end end
после
platform :ios, '12.0' use_frameworks! target 'PROJECT' do # libraries ... end target 'PROJECTTests' do # libraries ... end