Comments (6)
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.
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.
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.
I've found it!
from ios-framework.
@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.
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)
- Serenity.framework/Serenity (No such file or directory) HOT 2
- nested .bundle's possible? HOT 3
- Can I rename the framework or I need to create new project and target? HOT 2
- Unable to embed a static library in the Framework target HOT 1
- .a is not being created during build HOT 1
- Issue post start up.
- There are xcdatamodel files in frameworks, how can I package the mom files into resource bundle? HOT 1
- Using [NSBundle bundleForClass] gives bad path HOT 1
- Framework is not building for all architecture in Xcode 6.1 HOT 2
- Can I use cocoapods in my framework? HOT 4
- Missing cache file warnings for the framework built in Xcode 7 HOT 2
- Xcode 7 does not have armv7s in $(ARCHS_STANDARD) HOT 1
- XCode 7.1 Archive upload failure
- Error when creating Universal Build HOT 1
- Error when creating Universal Build HOT 1
- Header Files Visiblity
- Show dog breed and dog name in Admin.
- Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.3 Compiler
- Update README to include instructions on how to create a 'pure build' without third party libraries HOT 2
- Will it generate dSYM file?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios-framework.