jverkoey / iOS-Framework

How to create, develop, and distribute iOS Static Frameworks quickly and efficiently
2.61k stars 281 forks source link

Unable to embed a static library in the Framework target #103

Closed loretoparisi closed 10 years ago

loretoparisi commented 10 years ago

I have a static library from Google Analytics in the framework (see the attachments). I added the .a file in the "Link Binary With Libraries and the

GAI.h

library file to the public headers section. Anyway in the dependent app that includes the framework (embedding GAI) I have the error

 Undefined symbols for architecture armv7:
      "_OBJC_CLASS_$_GAI", referenced from:
       objc-class-ref in ObjectiveLyricsTouch(MXMGAMetrics.o)
     "_kGAIScreenName", referenced from:
         -[MXMGAMetrics trackPage:] in ObjectiveLyricsTouch(MXMGAMetrics.o)
        -[MXMGAMetrics trackEvent:] in ObjectiveLyricsTouch(MXMGAMetrics.o)

NOTE. The object file

MXMGAMetrics.o

is in the project scope of the framework headers. Even if I add its header

MXMGAMetrics.h

as public header I get the same visibility error.

Did I miss anything else? Thanks.

schermata 2014-09-23 alle 16 32 45

loretoparisi commented 10 years ago

I solved the issue. It was due to a wrong path in the source files (drag & drop from another project without moving the real files, very tricky)