Custom module build error

You must Login before you can answer or comment on any questions.

Hi,

Attempting to build a native iOS module. The module depends on ImageIO framework , but I can't seem to get it to include it. The module does work if I add it to the Titanium.xcodeproj in the specific sdk-version. I have added the framework to the project, and module.xcconfig looks like this:

OTHER_LDFLAGS=$(inherited) -framework ImageIO

Is there anything else I should be aware of?

2 Answers

Accepted Answer

HI Jonas, what is the exact problem? including the framework for specific SDK could be reason for SDK dependency in framework design.

— answered 8 months ago by Ashish Nigam
answer permalink
2 Comments
  • Ok, so I think I figured it out - partly because of your question/answer, about linking static libraries. So instead of writing this:

    OTHER_LDFLAGS=$(inherited) -framework ImageIO

    you have to split it up like this

    OTHER_LDFLAGS[sdk=iphoneos*]=$(inherited) -framework ImageIO OTHER_LDFLAGS[sdk=iphonesimulator*]=$(inherited) -framework ImageIO

    This is my first attemt at building a native iOS module, so I'm sure that explains why I don't understand why this is necessary. My assumption was that the single line OTHER_LDFLAGS covers both simulator and iphoneos, and therefore would be the same as iphoneos* and iphonesimulator* .

    — commented 8 months ago by Jonas Funk Johannessen

  • ok, no that is not the case, some of the frameworks are made conditional and are linked only with those SDK... as titanium made generic library so if that find any framework with these conditional check is ignoring them for all other too.... specifying for specific simulator or iOS device... tell titanium too about those conditions...

    — commented 8 months ago by Ashish Nigam

Your Answer

Think you can help? Login to answer this question!