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      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to