Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6: No Frameworks Folder in Project Navigator

Tags:

I am using Xcode 6 and following an Xcode version 4 tutorial so things are different here and there.

There doesn't seem to be a Frameworks folder in my project navigator and so when I downloaded some .framework files and added them manually in the build phase of my project editor, I had no Frameworks folder to save them in and just let them fall into the top of my project navigator. So they are there, just not in a special folder, and it doesn't look good.

So should Xcode 6 have a frameworks folder automatically, or do I need to create one myself? And if so, how can I do that? (I've only added new files so far).

like image 917
cheznead Avatar asked Oct 19 '14 15:10

cheznead


People also ask

How do I add a framework to my workspace in Xcode?

To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu.

Where can I find linked frameworks and libraries?

If you're building for iOS, tvOS, or watchOS: On your application targets' “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk.


2 Answers

In Xcode 6, the Frameworks folder is not added by default. You can drag and drop your .framework files into the project navigator (tick 'Copy items if needed'), then select them all > right click > "New Group from Selection" and name the folder 'Frameworks'.

Also, make sure the frameworks are added into the Project > Build Phases > Link Binary With Libraries. If not, drag them there from your newly created 'Frameworks' folder.

like image 150
Sebyddd Avatar answered Oct 26 '22 23:10

Sebyddd


In short, no, you shouldn't need to create a Frameworks group yourself as Xcode is doing stuff automatically for you...

Apple are slowly, gently pushing developers in the direction of newer Clang features with the goal of making native iOS development more approachable for newbies who don't have previous experience of compiling and linking with C-based languages.

You'll find that Objective-C projects created with Xcode 6 have new build settings enabled by default including Link Frameworks Automatically (CLANG_MODULES_AUTOLINK) and Enable Modules (C and Objective-C) (CLANG_ENABLE_MODULES).

Suggested reading:

  • Modules (Clang documentation)
  • @import vs #import - iOS 7 (excellent Stack Overflow answer)
like image 45
Quintin Willison Avatar answered Oct 27 '22 01:10

Quintin Willison