ma11hew28
ma11hew28

Reputation: 126527

How to include libsignal-protocol-c in my Swift iOS app?

I would like to write something like import SignalProtocol at the top of one of my Swift files and then be able to call the C functions from libsignal-protocol-c.

libsignal-protocol-c's README says: "When integrating into actual applications, you should not need anything beyond CMake. Alternatively, you may integrate the code using a build system of your choice."

I think I'd like to use the Swift Package Manager to integrate libsignal-protocol-c into my Swift iOS app. Is there a way to automatically generate a manifest file, ie, Package.swift, and a module map, ie, a module.modulemap file, from libsignal-protocol-c's CMake files? Or if I need to create these files manually, what should they include? Otherwise, how would I do this with CMake?

How to import and use libsignal-protocol-c in an existing .xcodeProj? is a similar question but for Objective-C projects.

Upvotes: 1

Views: 867

Answers (2)

Daniel Wallman
Daniel Wallman

Reputation: 418

You can import libsignal with CocoaPods, see https://github.com/signalapp/libsignal/blob/main/swift/README.md

Upvotes: 0

Denis
Denis

Reputation: 578

I'm not sure its an answer but I'm going to start using https://github.com/christophhagen/LibSignalProtocolSwift. Seems like a good start.

Upvotes: -1

Related Questions