iosstatic-librariescocoahttpserver

Cocoa Static Library - Some Third Party Source Files Are Not Working Properly


First of all I want to clarify that I may have not address the problem clearly as stated in the title of my problem. Please forgive because I really don't know how to express this.

I am building a Cocoa Static Library that includes Cocoa Http Server in it. The library was built successfully and when I use it in my project, I was also able to use the methods of the Cocoa Http Server. My app runs an http server that plays music on wifi speakers. Once the music starts playing, which means the speaker starts reading data from my server, this error is occurring.

enter image description here

The strange thing is, if I add the CocoaHttpServer to my App Project. This will never occur. The problem will be solved.

But this really confuses me. The lib contains exactly the same CocoaHttpServer, but still "unrecognized selector occurs". What is the difference between using a 3rd party lib in my library and using a 3rd party lib in my App Project?

I hope I explained my situation well. To summarize:

Problem occurs when:

Problem solved when:

Please help. Many Thanks!


Solution

  • You are using a categories in your static lib.

    Read this: Building Objective-C static libraries with categories