Hello,

tl;dr; what is the proper way to have a framework project as a dependency
in another project in the same workspace?

I have a framework A that gets embedded in an iOS app B.  My Xcode
workspace has different projects for A and B.  The framework A will be
distributed, but it is also used as the foundation for a sample app (B).
Standard stuff, I think.

So I tap on Project Navigator > Project B > Target > General and hit the
plus sign next to "Embedded binaries".  Sure enough Framework A shows up
and I think all is well.  However, when I run on a device I see this error:

dyld: Library not loaded: @rpath/HarpCommoniOS.framework/HarpCommoniOS
  Referenced from:
/var/containers/Bundle/Application/<snip>/HarpApp.app/HarpApp
  Reason: no suitable image found.  Did
find: 
/private/var/containers/Bundle/Application/<snip>/HarpApp.app/Frameworks/HarpCommoniOS.framework/HarpCommoniOS:
mach-o, but wrong architecture

So it looks like when I embed a binary through the general tab, it is only
of the currently built binary located in derived data!  I have tried
rebuilding the framework for a device, but then I get the same error on the
simulator.
I've also tried building the framework for all architectures as a
workaround but then I get an error at runtime about: "no matching
architecture in universal wrapper".  And this feels like a step that
shouldn't be necessary.

My goal: build the app B and have it compile the embedded framework A for
the same architecture!  Is there a doc out there on how to do this? Or does
someone know the secret build setting sauce?

Thanks!
Lou
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to