iOS : Could not build module <framework-name>

26,234

Solution 1

you can try delete DerivedData dir.

where is DerivedData?(xcode 8)

go to File > workspace Settings, you'll see DerivedData path.

DerivedData path in xcode 8

enter image description hereenter image description here

Solution 2

Check whether the framework you are integrating is supporting your project architecture.

To see the framework supported architecture, use Terminal and navigate to Framework folder.

use, "lipo -info myFramework.framework/MyFramework"

And, if you want to use the framework files in your project, check whether the files are available in Framework/Headers Folder.

Getting this error :

Screenshot

Try, "file myFramework.framework/MyFramework" in Terminal

Solution 3

I think you does not need to compile CommonLibrary.framework again. So you can try to remove it from Embedded Binaries list. And make sure the path of CommonLibrary.framework is in your Framework Search Paths.

Solution 4

I also had this problem: 1. My 'GoodLuck' framework had two headers: GoodLuck.h and GLAdder.h 2. Project which import this framework couldn't compile

Solution: Import GLAdder.h in GoodLuck.h, rebuild the framework. It works.

Solution 5

I also had this problem, due to a typo in my GCC_PREPROCESSOR_DEFINITIONS, which therefore invalidated all of my code.

First helpful warning was multiple "Macro Name must be an identifier" followed by multiple "Could not build module" messages.

Share:
26,234
Jayprakash Dubey
Author by

Jayprakash Dubey

Blog : http://jayprakashdubey.blogspot.in LinkedIn : http://in.linkedin.com/in/jpdubey Tweet : @JayprakashDube2

Updated on July 28, 2021

Comments

  • Jayprakash Dubey
    Jayprakash Dubey almost 3 years

    I've got Library from another team. I'm trying to use library in our project and while do so getting an error Could not build module 'Common Library' (name of framework)

    Screenshot 1

    Below are solutions that I worked on but didn't helped :

    1. Delete Derived data content. Clean and Build.
    
    2. Framework is added in 'Link binary with libraries' of Build phases.
    
    3. While adding framework checkmarked : Target and Copy content to folder.
    

    Even I tried this stackoverflow-link but didn't got any break-through!

    screenshot 2

    screenshot 3

    The only thing that worked was deleting Objective-C bridging header path in Swift compiler - code generation section of build settings in Project.

    However, thereafter I'm not able to get Common interface to create instance (i.e. Common dosen't appears in drop-down list)

    Below is framework structure.

    Screenshot 6

    Any other fix?