0
votes

I've bee really struggling with this bug the past few days.

So I have a workspace we can call XYZWorkspace.

Then I have an app project in this workspace called XYZ.

Then I have a Cocoa Touch Framework in this workspace called XYZCore (which contains reusable non-UI files)

Lastly, I have Cocoapods set to install Alamofire on the XYZCore framework.

I have XYZCore listed as an Embedded Framework of the XYZ app project target.

Here is my issue, when I build the XYZCore framework, Alamofire gets imported properly. However, when I build the XYZ app target, I get the error "No such module 'Alamofire'" in the XYZCore.

I know that Pods is set up properly on the XYZCore framework because when I build that scheme, everything succeeds. I think I don't have something set up correctly from connecting XYZCore to XYZ app.

Other information: I have custom configuration files set up for the XYZ app project that import the Pods configuration files.

Some checklist steps I've performed:

  1. Made sure building from the workspace
  2. Marked the Schemes for both the framework and app target as Shared
  3. Deleted Derived Data and Cleaned build folder

I've even gone as far as restart the project completely to make sure I didn't miss a step, however something is still connected correctly. I've done this setup on other projects without any issues, could someone help me?

1

1 Answers

0
votes

this usually happens when your frameworks are not set-up correctly on the target's Build Phases settings page. Have you checked that under Target/Build Phases/Embed-Frameworks // Link-Binary-With-Libraries everything is added correctly? If so can you provide with screenshots of those screens, also maybe try running 'pod install' again on your root folder, it has worked for me several times.