*Solved* Test Target: `No such module 'ApolloAPI'`

Lost for ideas what’s going on here, but I’m in the process of upgrading to 1.x and have codegen generating a SwiftPM package with a test framework (TestMocks).

 products: [
    .library(name: "SomeAPI", targets: ["SomeAPI"]),
    .library(name: "SomeAPITestMocks", targets: ["SomeAPITestMocks"]),
  ],

When trying to build the tests (errors on building SomeAPI I’m getting the following error

No such module 'ApolloAPI'

in a code generated file from SomeAPI at the exported import

 @_exported **import** `ApolloAPI`

I’ve followed what’s here Project configuration - Apollo GraphQL Docs and linked against SomeAPITestMocks and ApolloAPI as well as ApolloTestSupport

Lost for ideas at this point.

HAZAAH!

Problem solved, issue was out of order linking.

Hmm maybe its not solved, could of been derived data masking the issue.

Cleared derived data and having this issue again.

You need to declare dependency for apollo in your targets.

Also make sure you’re setting the generated code properly inside Sources or the path defined in the Package.swift