Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such module only when archiving

Tags:

xcode

ios

I'm using xcode 7.3.1 at the moment. I have a workspace set up with an iOS app project and two framework projects.

  1. MyiOSApp (imports 2 and 3)
  2. AppSharedFramework (imports 3)
  3. CompanySharedFramework (This we will split into its own thing one day)

I can build each of these projects fine when running on the simulator, I can also build then all for Profiling (which uses the release build). But as soon as I try archive either 1 or 2 the build fails with "No such module 'CompanySharedFramework'"

I've been struggling to get this to archive for quite some time, what could cause this issue during archive, but not during run/profile builds.

Any thoughts?

like image 577
Craigt Avatar asked Jul 27 '16 14:07

Craigt


Video Answer


1 Answers

In my main project, a long time ago, I created a new "configuration schema" called "AppStore" that was duplicated from Xcode's default "Release" configuration. I added an entire Xcode project (a framework project) to my project. I was able to @import MyFramework; when "Running" because both projects had "Debug" as the schema for "Running" the app. When I went to Archive it, my main project was setup to use "AppStore" config (as opposed to the default of "Release") and my sub project did not have an "AppStore" config. Once I added "AppStore" to the sub project based on "Release", when I went to archive it worked great, built fully, because both projects now had the AppStore schema and the main project is the one saying to use that config when archiving, so when I just created it in the sub project things started working like you'd expect.

like image 84
John Erck Avatar answered Oct 10 '22 09:10

John Erck