Several sample projects are provided with the download files for the Dylib edition of Debenu Quick PDF Library for Mac OS X. We recommend that you start your evaluation of Debenu Quick PDF Library on Mac using these sample projects as they provide a useful guide for how to initialise the library inside an Xcode project and the various necessary settings.

The dylib for Debenu Quick PDF Library has a dependency on the Delphi restributable (libcgunwind.1.0.dylib) and both the .dylib files use @rpath for their install_path. Both dyblib files must use the same path in order for the application to function correctly. The dylib for Debenu Quick PDF Library is 32-bit only and so the XCode project must be set to 32-bit mode.

If you add the Debenu Quick PDF Library dylibs into the “Linked Frameworks and Libraries” section of your Xcode project this will cause the app to try to attach to the dylib statically and as a result generate an error message. You should instead attach the dylibs dynamically.

In the Xcode samples you’ll notice we have a Copy Files section in the Build Phases. This has two entries, copying the dylibs to the Frameworks folder.

Then your code can get the path of the Frameworks folder at runtime to initialize Debenu Quick PDF Library:

    NSBundle* mainBundle = [NSBundle mainBundle];
    NSString* dylibPath = [mainBundle privateFrameworksPath];
 
    dylibPath = [dylibPath stringByAppendingPathComponent:@"libDebenuPDFLibraryDylib0912.dylib"];
    DebenuPDFLibraryDylibClass0912* DQPL = [[[DebenuPDFLibraryDylibClass0912 alloc] initWithDylibFileName:dylibPath]autorelease];

dylibPath = [dylibPath stringByAppendingPathComponent:@"libDebenuPDFLibraryDylib0912.dylib"];
DebenuPDFLibraryDylibClass0912* DQPL = [[[DebenuPDFLibraryDylibClass0912 alloc] initWithDylibFileName:dylibPath]autorelease];