I created Configuration.storekit
file, and it work for Run on ios simulator.
But when i'm trying to run UITest, it always fails on initing SKTestSession(configurationFileNamed: "Configuration")
with error:
caught error: "Error Domain=SKTestErrorDomain Code=4 "File not found" UserInfo={NSLocalizedDescription=File not found}"
Here is my code
import XCTest
import StoreKitTest
class MyProjectUITests: XCTestCase {
override func setUpWithError() throws {
continueAfterFailure = false
}
override func tearDownWithError() throws {
}
func testExample() throws {
if #available(iOS 14.0, *) {
let session = try SKTestSession(configurationFileNamed: "Configuration")
session.disableDialogs = true
session.clearTransactions()
}
// UI tests
*****
}
}
If i'm trying to @testable import MyProject
it fails with another errors:
Missing required modules: 'Amplitude', 'FBSDKCoreKit', 'Firebase'
I even tried to add Target Membership
for Configuration.storekit
file in MyProjectUITests target.
Can anyone say, how could I init SKTestSession(configurationFileNamed: "Configuration")
without getting errors?