• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Proper setup for embedded framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proper setup for embedded framework


  • Subject: Proper setup for embedded framework
  • From: Lou Zell <email@hidden>
  • Date: Mon, 15 Aug 2016 19:28:29 -0700

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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Proper setup for embedded framework
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Class is implemented in both
  • Next by Date: Re: Proper setup for embedded framework
  • Previous by thread: Re: Launch, connect, communicate
  • Next by thread: Re: Proper setup for embedded framework
  • Index(es):
    • Date
    • Thread