0

I am now learning how to create a static library for ios system, and the development tool I am using now is Xcode. The following link gives a wonderful example to illustrate how to create and use a static library for ios system. However, that article did not explain the situation where the static library contains more than one classes. I, however, want to export two classes in the static library StaticLib and ABTest as the following picture shows:

enter image description here

I have no difficulty in producing the static library, but when I check its head files via Finder

enter image description here

I was wondering what I should do to make sure all the head files in the library are stored in the include folder, which comes with the static library (shown in the above picture). Many thanks.

feelfree
  • 11,175
  • 20
  • 96
  • 167
  • 1
    You have to make the header file *public* so it's copied during "installation". It's in the project settings somewhere, but cannot remember exactly where. – trojanfoe Sep 13 '13 at 15:50

1 Answers1

1

In your target build settings you need to add a Copy Headers Build Phase

In Xcode 5 it looks like this: enter image description here

For more information on the difference between these types, see this answer: https://stackoverflow.com/a/8016333/143911

Community
  • 1
  • 1
nrj
  • 1,701
  • 2
  • 22
  • 37
  • thanks, however, I am now using xcode 4.6, and I cannot find this option in the build phase. – feelfree Sep 13 '13 at 16:32
  • Now that you know what needs to be done, maybe google for how to do it in your version of Xcode? https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/Setting%20the%20Role%20of%20a%20Header%20File.html – nrj Sep 13 '13 at 17:38