objective c - iOS static library does not work -


i followed instructions in article create static library:

http://developer.apple.com/library/ios/#technotes/iosstaticlibraries/articles/creating.html

i built iphone simulator target. built successfully, imported new project wanted use it. imported fine , there no problems, library doesn't work. there no library methods i'm calling; rather purpose of library swizzle uiviewcontroller viewdidappear method piece of code gets executed every time uiviewcontroller appears. piece of code not getting called, despite library being included in "link binary libraries" build phase.

i know problem isn't code because if import raw .m , .h source files not library, works fine.

did library contain categories?

if so, think should follow these steps work:

  1. in xcode, double-click target's name under "targets" in project window.
  2. choose build settings panel.
  3. scroll down "other linker flags" build setting under linking collection , set value "-all_load -objc".

please refer corresponding apple documentation

here related question: objective-c categories in static library


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -