Re: Proper setup for embedded framework
Re: Proper setup for embedded framework
- Subject: Re: Proper setup for embedded framework
- From: Lou Zell <email@hidden>
- Date: Tue, 16 Aug 2016 07:50:52 -0700
Thanks Quincey,
The easy thing to check is to look at the build phases for the app, and
> make sure that the framework is listed in the Target Dependencies phase.
When I tap on the plus sign next to the Target Dependencies build phase,
the framework target is not listed as an option. That is, targets from the
sibling project (the framework project) are not found by whatever Xcode's
default rules are.
Apple's doc on workspaces states:
Each workspace has its own build directory. Because all of the files in all
> of the projects in a workspace are in the same build directory, all of
> these files are visible to each project.
So it seems to me this should be possible. I.E. one workspace, multiple
projects, one project is a framework that is a dependency for all other
sibling projects. Here's a distilled sample project:
https://github.com/lzell/WorkspaceExperiment
I'm wondering if there is a build setting to edit or what that will make
targets from sibling projects be recognized as possible dependencies
On Mon, Aug 15, 2016 at 8:18 PM, Quincey Morris <
email@hidden> wrote:
> On Aug 15, 2016, at 19:28 , Lou Zell <email@hidden> wrote:
>
>
> 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.
>
>
> The easy thing to check is to look at the build phases for the app, and
> make sure that the framework is listed in the Target Dependencies phase.
>
> If you switch the scheme device in your workspace window from (say)
> simulator to device, then build or run, you should see the app target get
> re-linked (along with re-compilations for changed files). When that
> happens, does the framework target also get re-linked? You can look at the
> build transcript in the Report navigator to be sure. If not, then the
> dependency mechanism isn’t working as you’d expect. If so, the the path to
> where the embedded framework can be found is probably
> architecture-specific. (Look in the General tab of the project info of the
> app.)
>
> If, when you want to switch the scheme device, you also switch to the
> framework target and rebuild it manually, then switch back to the app
> target, do you get the right framework or the wrong one? That should tell
> you whether it’s a dependency issue or a path (or other referencing) issue.
>
> 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".
>
>
> This isn’t going to work. There isn’t (there wasn’t, and there isn’t
> AFAIK) a way of building a multi-architecture framework in Xcode that
> crosses platform boundaries, and the simulator platform is macOS even when
> the target OS is iOS. So, this approach would solve the problem between
> (say) 32- and 64-bit architectures on different devices, but not for device
> vs. simulator.
>
>
>
_______________________________________________
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