2

I'm new to xcode and cocoa.

According to the Framework Programming Guide, there is a certain directory structure that I should follow when making a framework. I recently started a framework project using xcode, and was surprised to find that this directory structure was not provided for me automatically.

From the Programming Guide: (so that you don't have to clidk on that link if you don't want to)

Listing 1 A simple framework bundle

MyFramework.framework/
MyFramework  -> Versions/Current/MyFramework
Resources    -> Versions/Current/Resources
Versions/
    A/
        MyFramework
        Resources/
            English.lproj/
                InfoPlist.strings
            Info.plist
    Current  -> A

Do I need to make this directory structure by hand? I've built the framework product and included it in another project, following the steps in this question. While the project does build, Frameworks/MyFramework.framework/ is empty.

My own explorations have lead me to realize that the file system described above is created in the Product (see comment below). This changes the question: Why is Frameworks/MyFramework.framework/ empty, despite that all the of public headers exist in the framework Product?

Thanks!

Community
  • 1
  • 1
Ziggy
  • 21,845
  • 28
  • 75
  • 104
  • After building the framework, when I click on MyFramework.framework in Products and I click the arrow next to the full path in the File Inspector, then I am taken to the that directory in Finder. Exploring that directory I find that the file system above actually exists there, along with the public headers. Great! So the problem is perhaps not in my framework. The problem is that my project is not looking in the right place for those headers? Hmm... – Ziggy Aug 06 '11 at 01:32
  • Hi, I have the same question about the directory structure of the framework, do you have created the structure manually? I'm developing on a framework and when I build the framework there is no Version and "A" folder. Do you have some hint? – Mat Oct 16 '17 at 09:48
  • Sorry @Mat, this was 6 years ago and I haven't touched xcode in a long time... tbh I'm not even sure what "framework" means in this context :/ – Ziggy Oct 16 '17 at 17:15

1 Answers1

0

The problem was that I hadn't set the role of the headers to public. Once I did that, then I was able to see all the files in the framework.

Ziggy
  • 21,845
  • 28
  • 75
  • 104