3

I have a swift framework project(let's call it Framework1), inside it use some 3rd party objective c files. I use module instead of umbrella file because of ambientlight's answer in this post

I create a subfolder(let's call it MiscModule), put module.modulemap under that folder, include all oc headers, and configure the Build Setting. The framework build fine, I can get framework build.

But after I put Framework1 in app project, build the app. It complain about "Module MisModule not found".

I saw the Framework1-swift.h file have an line of "@import MisModule". I had thought MisModule is build into binary in Framework1's bundle.

Do I miss something?

Lazydev
  • 81
  • 1
  • 5

2 Answers2

0

When you built it, those files that in modules did not be embedded into the framework, it would change the relative path to absolute path.

such as import YourModule change $SRCROOT/... to User/YourProject/

so, not use custom module in framework, it will change the import paths to absolute path.

Your can build a framework for the oc files.

Yan
  • 287
  • 3
  • 11
-1

Sometimes cleaning Xcode, restarting both the simulator and xcode, and then trying to run again helps. If worst comes to worst, try heading into finder and doing a deep-clean. Delete ~/Library/Developer/Xcode/DerivedData/

Dowland Aiello
  • 440
  • 8
  • 18