Need help compiling XMLSEC under xCode

Dear friends,

I have an xCode project that needs to sign an XML file, and in shell I can achieve the result by running this command:

export LD_LIBRARY_PATH=/opt/local/lib; /opt/local/bin/xmlsec1 sign --id-attr:Id infNFe --output /path/to/signed.xml --pkcs12 /path/to/my/p12.pfx --pwd XXXXPASSWORDXXXX --trusted-pem /path/to/my.pem /path/to/unsigned.xml

When installing XMLSEC via Mac Ports, files are linked in /opt directory as you an notice by running the command:

bernardo$ otool -L /opt/local/bin/xmlsec1
/opt/local/bin/xmlsec1:
/opt/local/lib/libxmlsec1.1.dylib (compatibility version 4.0.0, current version 4.13.0)
/opt/local/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.26.0)
/opt/local/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.8.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)

Unfortunately Apple demands now that apps must be sandboxed, and so my app does not have access to /opt directory, and I can not install XMLSEC on the users file system.

I have visited Compiling and linking on Unix.: XML Security Library Reference Manual and I find it very hard to understand what I need to do is to bundle XMLSEC into my xCode project, and make XMLSEC run within my sandboxed app.

I understand it is possible, but my knowledge is limited to objective C and other Mac Os X technologies.

I am willing to pay for getting help on bundling XMLSEC into my xCODE application. I am not rich, but I hope a kind person can help me with this.

Thank you for any suggestions,

Bernardo H�hl
Rio de Janeiro - Brazil

There are two types of major license types for open-source libraries, BSD like and GNU like.
BSD libraries can be simply statically linked to your XCode binary redistributable while GNU licensed libraries have to be distributed in dynamically linkable format creating some complexity.

You also have to keep in mind that you need to distribute whole dependency tree (dependency libraries of libraries, etc).

Check out the official documentation how to bundle dynamic libraries with your application: https://developer.apple.com/library/mac/\#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html