Embed framework showing up in Project Navigator since Xcode 9?

Has anyone else noticed a change recently, somewhere around the release of Xcode9, with the behavior when you embed a framework in a project (iOS in my case)?


The Behavior I Recall

Click "+" button next to Embedded Frameworks section of project settings and choose a framework from the list.

Framework shows up in the Embedded Frameworks pane of the project settings. No change in the project navigator.


The Behavior I'm Seeing

Click "+" button next to Embedded Frameworks section of project settings and choose a framework from the list.

Framework shows up in the Embedded Frameworks pane of the project settings.

A reference to the framework shows up at the top level of the project (just under the blue icon) in the Project Navigator.

Dragging that new reference to any other Group (yellow folder icon), with or without a folder reference, creates a copy of the framework reference.


This seems like an odd change and the primary issue is that it restricts the ability to organize things in the Project Navigator, e.g. keeping all your Frameworks in a "Dependencies" group.

Yes. I was just about to make a thread about this.


If I add a pre-built framework to my project and I try to move it to a "Group without folder" Xcode still makes a copy. Naturally I don't want this, as i'll end up having copies of the same framework in many projects unnecessarily, which means when I update the framework I'll have many different places to visit.


I guess I have to leave it at the top level of the project for now to avoid the copy, but it really doesn't belong in my face all the time. Did you file a bug on this?

>Dragging that new reference to any other Group (yellow folder icon), with or without a folder reference, creates a copy of the framework reference.


Blue indicates an actual Finder folder. Yellow means a 'fake' folder, used as a visual organizational convenience for the dev, and does not mean files have been (yet again) duplicated in the Finder.


If that process results in actual file duplications in the Finder, it sounds like a bug to me and you should file one against the tools via the bug reporter link, below right.

There's a workaround to fix this:
Issue:
When adding a framework to

Embedded Binaries
in a project, a reference will be added to the Project Navigator. However, when attempting to move this to a different directory a copy will be created instead.

Fix:

  • Tap on the framework reference you want to keep
  • Look at the
    File Inspector
    (Top right corner) and find the
    Location
    drop-down
  • Tap the drop-down and change from
    Relative to Group
    to
    Relative to Build Products
  • Drag the framework reference you want to keep to
    Embedded Libraries
  • Select the other framework reference and delete it
Embed framework showing up in Project Navigator since Xcode 9?
 
 
Q