Skip to content

Instantly share code, notes, and snippets.

@Jacobinoo
Last active November 3, 2024 20:51
Show Gist options
  • Save Jacobinoo/4389d45dc5a8ccc44a2aac2cdb9b2052 to your computer and use it in GitHub Desktop.
Save Jacobinoo/4389d45dc5a8ccc44a2aac2cdb9b2052 to your computer and use it in GitHub Desktop.
Make LibSignal work on macOS

LibSignal is not officially supported on macOS because it's not one of Signal's app platforms (Signal Mac app uses Electron). You'll have to build the Rust parts yourself instead of using the prebuilt ones.

  1. Check out https://github.com/signalapp/libsignal repo.
  2. Have Rust as well as clang, libclang-dev, cmake, make, protobuf-compiler, git installed, or set it up using bin/mac_setup.sh.
  3. Build the checked out repo using swift/build_ffi.sh --release.
  4. nano *.podspec
  5. Add s.osx.deployment_target = '10.15' after s.swift_version = '5' in Podspec file.
  6. pod lib lint --platforms=macos
  7. In your project's Podfile:
platform :macos, '10.15'
target 'MyApp' do
  use_frameworks!

  # Pods for MyApp
  pod 'LibSignalClient', :path => 'path/to/downloaded-libsignal-directory'
  ENV['LIBSIGNAL_FFI_PREBUILD_CHECKSUM'] = 'checksum_that_is_attached_to_every_libsignal_release (tar.gz.sha256 file)'
end
  1. pod install

Now you should have LibSignal working on macOS. Go into Xcode and build the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment