Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Packaging a Bundle with a static library

I have a static library that includes some xibs. These will basically be the same across projects. I'd like to include the xibs as part of the library. I can include their veiwcontrollers, reference these controllers in the calling project but then there isn't a xib to load. When I right click the xib in the library project, it can't be part of the target.

I thought about creating a CFPluginBundle but that creates a new project. I'd loose all of my IBOutlet and IBAction references. What is the best way to reuse xibs that also have outlets and actions to specific controllers?

like image 713
4thSpace Avatar asked Apr 30 '09 04:04

4thSpace


2 Answers

Here more discussion about it: Can you reference Xib files from static libraries on the iPhone?

like image 175
23 revs, 14 users 49% Avatar answered Sep 19 '22 21:09

23 revs, 14 users 49%


I had the same problem when I wanted to export my project as a library for other developers to use. I found the perfect solution to my view and it seems it will answer yours too.

There is an xcode plugin that allows you to build your project as a library which includes the resources as well.

https://github.com/kstenerud/iOS-Universal-Framework

I do not know the guys that built this plugin, but it works like a charm

like image 31
Ronen Morecki Avatar answered Sep 21 '22 21:09

Ronen Morecki