iOS framework resource files

2.8k views Asked by At

I have created a framework with bundle files. Bundle files are under resource folder inside the framework. So my problem was whenever someone need to integrate the framework in their project then they have to drag and drop the bundle file from framework resource folder to project. Is possible to programmatically link the framework resource file and read it inside the project?

1

There are 1 answers

0
Tao-Nhan Nguyen On

To include the resource bundle, select the target of your framework, and in the Build Phases > Copy bundle resources, click on the + button and add any resource bundle which you wish to have packaged into your framework.

When you build the framework, the resource will be copied. Make sure that this file exists though or you'll get a build error.

If you go in "Edit Schemes" for your framework project, in the "Build" section, you can add the resource file, so that when you will build the framework, it will also rebuild the resource bundle.