Не удалось собрать XCFramework, поскольку XCTestAttachment не является типом члена класса XCTest. ⇐ IOS
Не удалось собрать XCFramework, поскольку XCTestAttachment не является типом члена класса XCTest.
I created a XCFramework for point-free-snapshot with the help of swift-create-xcframework tool. I used the following command:
swift create-xcframework --package-path . --stack-evolution --configuration debug --output xcframeworks-debug --platform ios --xc-setting ENABLE_TESTING_SEARCH_PATHS=YES The above command created the XCFramework successfully, but when imported in a test target it fails with the following error.
Failed to build module 'SnapshotTesting' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
and Xcode reports inside the private.swiftinterface the following errors:
'XCTAttachment' is not a member type of class 'XCTest.XCTest' 'XCTestCase' is not a member type of class 'XCTest.XCTest' Looks like XCTest is not recognized. Is there a way to overcome this building issue? On GitHub the only dirty solution I found was to erase all XCTest types with Any and then downcast it in code. But for me looks like this issue is related to ENABLE_TESTING_SEARCH_PATHS build setting.
May someone shed a light to this? Thank you in advance.
Источник: https://stackoverflow.com/questions/780 ... er-type-of
I created a XCFramework for point-free-snapshot with the help of swift-create-xcframework tool. I used the following command:
swift create-xcframework --package-path . --stack-evolution --configuration debug --output xcframeworks-debug --platform ios --xc-setting ENABLE_TESTING_SEARCH_PATHS=YES The above command created the XCFramework successfully, but when imported in a test target it fails with the following error.
Failed to build module 'SnapshotTesting' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
and Xcode reports inside the private.swiftinterface the following errors:
'XCTAttachment' is not a member type of class 'XCTest.XCTest' 'XCTestCase' is not a member type of class 'XCTest.XCTest' Looks like XCTest is not recognized. Is there a way to overcome this building issue? On GitHub the only dirty solution I found was to erase all XCTest types with Any and then downcast it in code. But for me looks like this issue is related to ENABLE_TESTING_SEARCH_PATHS build setting.
May someone shed a light to this? Thank you in advance.
Источник: https://stackoverflow.com/questions/780 ... er-type-of
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение