From 4d6c8469c5794c4a8593e2d9c374cf744d9b5dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Eche=CC=81gut?= <> Date: Mon, 19 Sep 2022 17:10:11 +0200 Subject: [PATCH] fix(): update get bundle with SPM --- Pod/Native/NativeRunner.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Pod/Native/NativeRunner.swift b/Pod/Native/NativeRunner.swift index cb7582b..4376285 100644 --- a/Pod/Native/NativeRunner.swift +++ b/Pod/Native/NativeRunner.swift @@ -15,7 +15,11 @@ open class NativeRunner { public class func runScenario(featureFile: String, scenario: String?, testCase: XCTestCase) { testCase.state.loadAllStepsIfNeeded() - let path = Bundle(for: type(of: testCase)).resourceURL?.appendingPathComponent(featureFile) + var bundle = Bundle(for: type(of: testCase)) + #if SWIFT_PACKAGE + bundle = Bundle.module + #endif + let path = bundle.resourceURL?.appendingPathComponent(featureFile) let featureFilePath = requireNotNil(path, "Path could not be built for feature file: \(featureFile)") let features = loadFeatures(path: featureFilePath)