Code Monkey home page Code Monkey logo

Comments (6)

jverkoey avatar jverkoey commented on July 21, 2024

In your build settings instructions, you recommend copying the headers to a uniquely named folder, such as "${PROJECT_NAME}Headers". But that folder doesn't exist. Adding a new build phase to create it before the copy is convenient. Might even be worth defining an additional shell variable used by both so they don't get out of sync.

The uniquely-named headers folder automatically gets created when Xcode copies any headers to it, so we don't need to explicitly create the folder ourselves.

Some extra explanation of the value of copying the headers in the library build target might be informative for some people. Headers in a framework which refer to other headers should use the framework or library #import style "".

Good point, I'll elaborate more on the reasoning behind this.

Some library developers, rather lazily, use search path-relative paths in their #imports in interface files. Such imports won't work for projects which use the framework. Of course it's fine to use project-relative paths in implementation files.

Also a good point for clarification.

It might also be worth noting that frameworks use a flat layout for headers, all located in the same folder, unlike a lot of system-style include folders which have sub-folders.

Agreed.

from ios-framework.

kyle-herzog avatar kyle-herzog commented on July 21, 2024

To go along with @bgulanowski's comment on build phases and the directory for public header files, I found an problem with my current version of XCode, v4.5.1, and it's default template for a Cocoa Static Library. I had the hardest time finding the option for defining a public/private/project scope for a header file. It wasn't until I when into the build phases and added a "Copy Headers" phase that I was given this feature within XCode. Along with the scope of a header, when that build phase is missing from the project one cannot check the header file's Target Membership.

Perhaps noting in the README that this build phase is required, and to add upon the phase missing, will help other novice XCode developers like myself.

from ios-framework.

 avatar commented on July 21, 2024

I am blocked on the same step. I don't find how can i change the .h to public. Where are the "copy headers" options?
I'm using Xcode 4.5

from ios-framework.

 avatar commented on July 21, 2024

I've found it!

from ios-framework.

vemek avatar vemek commented on July 21, 2024

@Kyzog thank you - I had a very frustrating time trying to figure this out before reading your comment. I think it would be very helpful to include this information in the tutorial for current-version Xcode users.

from ios-framework.

 avatar commented on July 21, 2024

Hello,

I think that you can had note which explain than build phase "Copy Header" MUST BE MOVED BEFORE "Prepare Framework" script if you want that your "Public Headers Folder Path" exist when the script is processing.

Thanks a lot for this tuto!
Regards

from ios-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.