• 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: [SOLVED] Custom iOS framework links fine for Debug Config, but not for Release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] Custom iOS framework links fine for Debug Config, but not for Release


  • Subject: Re: [SOLVED] Custom iOS framework links fine for Debug Config, but not for Release
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 11 May 2016 10:46:37 -0400

Ahhhh. Now I see why you needed this.

Thanks David.  I'm sure this will be of use on my end when I need to make ad-hoc distros of my product.

I also remembering Jens asking if there was any resource out there - or book - to explain how to make a framework on IOS.

It seems that in our vast amount of spare time, we should put together a how to document and cross reference it with the other 3 or so iOS "how to make your own framework" guides that are out in the wild.

Later this eve, I'll try and send the three or so guides that I used.

The really important thing is that as info becomes outdated on iOS, it is really really important to know which versions of iOS the solution works for.

All too often, the guides that we find are targeted for iOS releases that were several years ago and if you no longer care about supporting iOS 4, there are much better approaches.

Happy to hear you beat the beast into submission.  Now we have one more human who has an idea how to do this.





Sent from my iPhone

> On May 11, 2016, at 10:01 AM, David Hoerl <email@hidden> wrote:
>
> Again, a big thanks to Jens and Alex for help and inspiration!
>
> In the end, the solution was to pray for a miracle, then have it happen!
>
> I have no idea what I finally did to get the link to work, but all of a sudden all my custom frameworks link just fine. Sigh.
>
> ---
>
> I'd like to share some of what I (painfully) learned about custom framework over the past few days:
>
> - if you have more configurations in your app than in the framework, you need to use a "mapping" trick to get the non-standard configs to link to either Release or Debug: http://stackoverflow.com/a/21579912/1633251
>
> - in the Umbrella header, included headers must be located in the Public folder, and you reference them within the Umbrella header as
>
> #import <ModuleName/Header.h>
>
> - the Export file (EXPORTED_SYMBOLS_FILE) **does** work - I just didn't have enough classes defined in my project to verify that it was. Per Jen's advice, Objective C classes should be specified as:
>
> .objc_class_name_MyClassName
>
> - if you want Lazy loading - that is, you want the framework to load when needed and not at launch, it **must** be marked as Optional:
>
> "A Required framework will always be loaded into memory, but an Optional framework will be loaded only if needed. The initial load of the application will be faster if a large library that is never [* I assume this also means rarely *] needed is designated as Optional."
>
> The above buried in the following link (but not in the "Frameworks Guide!):
>
> https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/AddingaLibrarytoaTarget.html
>
> I observe that in Debug, custom Optional frameworks load immediately upon launch. In Release I observed that they loaded lazily. To uncover when the load does occur, add a class method to one of your framework's classes:
>
> + (void)load {
>  NSLog(@"!!! JUST LOADED BLAH BLAH !!!");
> }
>
> This is a good thing to do so you uncover unexpected loads.
>
> - David
>
> PS: I plan to find out whether marking some of my included Apple frameworks as "Optional" might reduce launch time (and memory consumption) - my app has a slew of them.

 _______________________________________________
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: 
 >Custom iOS framework links fine for Debug Config, but not for Release (From: David Hoerl <email@hidden>)
 >Re: Custom iOS framework links fine for Debug Config, but not for Release (From: Jens Alfke <email@hidden>)
 >[SOLVED] Custom iOS framework links fine for Debug Config, but not for Release (From: David Hoerl <email@hidden>)

  • Prev by Date: [SOLVED] Custom iOS framework links fine for Debug Config, but not for Release
  • Next by Date: Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
  • Previous by thread: [SOLVED] Custom iOS framework links fine for Debug Config, but not for Release
  • Next by thread: Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
  • Index(es):
    • Date
    • Thread