Skip to content

Steps to use this library on an swift package for iOS? #70

Open
@zocario

Description

@zocario

Hello, I tried using your library to build an iOS package.

For that I've downloaded the dylib files for arm64 and x86 and created an xcframework using this command:
xcodebuild -create-xcframework -library ./pdfium-ios-arm64/lib/libpdfium.dylib -headers ./pdfium-ios-arm64/include -library ./pdfium-ios-x64/lib/libpdfium.dylib -headers ./pdfium-ios-x64/include -output ./pdfium.xcframework

Then I've modified the package.swift file of my package to include the framework as binary target:

  ...
    targets: [
        .binaryTarget(name: "PDFium", path: "artifact/pdfium.xcframework"),
    ]
   ...

The project compiles, runs, but when I tried to open a document nothing is happening.. no crash but I have the error FPDF_ERR_FILE. While using an other library with .a binaries I don't have the same issue so I'm wondering if I missed anything while generating the framework? Do you have a documentation to include those binaries in a swift package?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions