Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ffi bindings for swift #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: ffi bindings for swift #53

wants to merge 1 commit into from

Conversation

Jasonvdb
Copy link

@Jasonvdb Jasonvdb commented Feb 22, 2024

Script for building a xcframework so Pkarr can be used in any swift project.

Still need to create a uniffi export in ffi/src/lib.rs for each function you want to expose and handle errors properly.

sh ffi/scripts/build_swift.sh

Drag ffi/bindings/pkarrbindings.swift and ffi/swift/Pkarr.xcframework into your xcode project and use:

let record = await resolve(publicKey: "pk:o4dksfbqk85ogzdb5osziw6befigbuxmuxkuxq8434q89uj56uyy")

Example app here: https://github.com/Jasonvdb/pkarr-ios/
Simulator Screenshot - iPhone 15 - 2024-02-22 at 21 08 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant