Hello,
I'm working on a network package for our application. And I have an error when running my Unit Tests with ApproovSession in my dependencies.
Here are the contents of my Package.swift
file:
let package = Package(
name: "NetworkModule",
platforms: [.iOS(.v13)],
products: [
.library(
name: "NetworkModule",
targets: ["NetworkModule"]),
],
dependencies: [
.package(url: "https://github.com/Moya/Moya",
from: "15.0.3"),
.package(url: "https://github.com/apollographql/apollo-ios.git",
from: "1.2.1"),
.package(url: "https://github.com/approov/approov-service-alamofire.git", // NEW LINE ADDED
from: "3.1.1")
],
targets: [
.target(
name: "NetworkModule",
dependencies: [.product(name: "RxMoya", package: "Moya"),
.product(name: "Apollo", package: "apollo-ios"),
.product(name: "ApproovSession", package: "approov-service-alamofire")]),// NEW LINE ADDED
.testTarget(
name: "NetworkModuleTests",
dependencies: ["NetworkModule"],
resources: [.copy("Data/JSONs")]),
]
)
Just by added these two lines, it's impossible for me to run my tests anymore. Here is the error:
xctest[16990:83658] [loading] Error loading /Users/*****/Library/Developer/Xcode/DerivedData/*****-cxcxmeclusvrvtcsbnxlylzmfyry/Build/Products/Debug-iphonesimulator/NetworkModuleTests.xctest/NetworkModuleTests (170): dlopen(/Users/*****/Library/Developer/Xcode/DerivedData/*****-cxcxmeclusvrvtcsbnxlylzmfyry/Build/Products/Debug-iphonesimulator/NetworkModuleTests.xctest/NetworkModuleTests, 0x0109): Library not loaded: @rpath/Approov.framework/Approov
I also tried on a real device too and I got the same result.
Do I integrated incorrectly ? Does it work differently for a Package
?
Thank you for your help.