• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Building an iOS Framework - should its framework/library links be Required or Optional?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building an iOS Framework - should its framework/library links be Required or Optional?


  • Subject: Re: Building an iOS Framework - should its framework/library links be Required or Optional?
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 04 May 2016 17:04:25 -0400

I just suffered through this and will be happy to share what my project is using.

For iOS, I am building a framework that has a dependency and builds a static lib that it links to and includes in the framework.  Then all the asset libs, XIBs, sounds, storyboards and plists are copied in to the framework.  Wrappers for loading requested items from the framework are supplied internally based on type. Image, XIB, storyboard, or general file.

UI elements can be displayed on demand above the hosting app and storyboards can be instantiated and dismissed on demand to provide module like functionality.

Finally, the project that creates this has a framework target and an iOS app target.

The iOS app target does two things.  One is to locate the framework by identifier and load the first view controller of the storyboard within the framework when a button in app's first view controller is tapped.

This serves as piece of mind that from outside the framework, we can access assets within and open   an arbitrary view controller.

The framework also exposes a singleton to serve the purpose of starting it up from outside in the hosting app and this approach can be used as well.

This hosting app is what I use to start up and launch the framework to test features in lieu of building the framework and putting it in any real hosting app.


If an activation key is required for the framework, standard hashing methods can create a hash against the identifier of the hosting app or part of the identifier of the hosting app to prevent the framework from being snarfed and used by anyone.

Yeah, this is a little (cough) more than you asked, but it's kind of where making a framework leads to.

I'm happy to share what I learned if any of the above sparks your interest.

Cheers,
Alex Zavatone


Sent from my iPhone

> On May 4, 2016, at 2:03 PM, David Hoerl <email@hidden> wrote:
>
> Subject says it all. My understanding was that for static libraries, the linkage should be "Optional", and the list of required frameworks & libraries made available to adopters of the static library (so they could "Required" link to them.
>
> Just curious as to what the procedure is for a Framework (since I'm starting to develop one now :-).
>
> Thanks!
> David
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Building an iOS Framework - should its framework/library links be Required or Optional? (From: David Hoerl <email@hidden>)

  • Prev by Date: Re: Building an iOS Framework - should its framework/library links be Required or Optional?
  • Next by Date: Re: Xcode compilation order
  • Previous by thread: Re: Building an iOS Framework - should its framework/library links be Required or Optional?
  • Next by thread: Xcode compilation order
  • Index(es):
    • Date
    • Thread