Evelyn
Evelyn

Reputation: 65

Can I include an assets bundle INSIDE of my iOS Dynamic Framework?

This (pre iOS 8) tutorial on creating frameworks for iOS mentions packaging assets (images, etc) as a bundle that lives outside of the framework product. The .framework and bundle are two separate items...

This is not ideal because, to use the framework you must drag two items into your Xcode project: both the framework package AND the bundle. Dragging an extra item is too much work and I don't want my users to suffer such a fate...

I want my framework package to CONTAIN my assets bundle so anyone who uses the framework only has to drag-drop a single item (the .framework file).

Is this possible?

Upvotes: 3

Views: 2700

Answers (1)

Beau Nouvelle
Beau Nouvelle

Reputation: 7252

That's one of the great benefits of using the new dynamic frameworks, you can most certainly include any assets your framework may need and this includes:

  • Images
  • Configuration files.. plists, .txt, etc.
  • Audio
  • Xibs

There was an Apple WWDC 2014 Session that covered this.

ASCII version here.

However, while dynamic frameworks like these have been supported for a while in OSX, it has only been available for iOS since iOS 8.

Upvotes: 3

Related Questions