0

I have a static library project, in which now I need to include some resources, so I want to turn it into a framework. I need to include those resources inside framework, without the need to rely on separate resource bundle, for several reasons:
-to prevent the resources from tampering with
-for simplicity of usage of my framework

Now, in every tutorial I've read, the resources were supplied as separate bundle. This answer states that it isn't possible, but it's almost 5 years old. Has anything changed in that matter? Is it possible to include resources inside framework, without exposing them to framework's users? I am using Objective-C and deployment target is iOS 9.

mag_zbc
  • 6,801
  • 14
  • 40
  • 62
  • Your question is tagged as being about a static library but you're also asking about a framework. With a framework, it "just works". – Phillip Mills Jul 14 '17 at 12:51
  • @PhillipMills I already have a static library project, but now I need to include some resources in it. Edited original question – mag_zbc Jul 14 '17 at 12:54
  • Create a real framework project (or target in your current project), include your sources and resources, and build that instead of your static library. (I actually did this about a month ago for a large library. It's not terribly difficult.) – Phillip Mills Jul 14 '17 at 13:02
  • @PhillipMills I added "Cocoa Touch Framework" target to my project, it created a header file. In That header I try to include headers from my static library, but it gives me an error: "Include of non-modular header inside framework module". In Build Settings I already set "Allow Non-modular Includes in Framework Modules" to YES, but the error remains. – mag_zbc Jul 14 '17 at 13:20
  • Also, the headers from static lib are exposed as public in Build Phases -> Headers – mag_zbc Jul 14 '17 at 13:30

1 Answers1

0

Apple has introduced cocoa touch framework, which lets you include resources as well.

SJ3040
  • 156
  • 6
  • I have an existing static library project, but now I need to include some resources as well. How to turn it into a Cocoa Touch Framework? – mag_zbc Jul 14 '17 at 12:56