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

How to use from Swift macOS app? #62

Open
ekscrypto opened this issue Apr 11, 2024 · 1 comment
Open

How to use from Swift macOS app? #62

ekscrypto opened this issue Apr 11, 2024 · 1 comment
Labels

Comments

@ekscrypto
Copy link

I have a macOS app written in Swift using Xcode 15.3. I'm trying to integrate this openssl-apple package so that I can use it from one of my Swift class.

Step 1: Added this repo to "Package Dependencies", exact version = 3.2.107
Step 2: Selected my app target, confirmed that "Frameworks, Libraries, and Embedded Content" section shows "openssl-apple" static library
Step 3: In my class implementation (.swift file), at the top: import openssl

Xcode complains "No such module 'openssl'". If I try "import openssl-apple" I get a "Consecutive statements on a line must be separated by ';'" error.

I tried variations of the name, OpenSSL, opensslapple, etc but nothing seems to work.

The README of this project doesn't provide any example on how to do this. Looking at previous issues, someone recommended adding a Modules/module.modulemap which I've done without any improvement.

Is anyone using this from a macOS Swift app able to provide some guidance? Thanks!

@keeshux
Copy link
Member

keeshux commented Apr 11, 2024

It's true that a module.modulemap file is clearly missing. It's also true that using OpenSSL from Swift is the ultimate PITA.

@keeshux keeshux added the bug label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants