Closed SodaSurfer closed 2 years ago
for xcframework you don't need to set headers path, just drag and drop framework to the project and that should be all you need to do
@krzyzanowskim do you mean the Frameworks folder? where should I drop it inside my project? I've been trying for about 4 hours to install the repo but without success. The folder that is created after "pod install" is different then the folder then I get when I clone the repo. the Framework folder that is created from pod install doesn't contains the iphoneos, macosx etc. folders, not the static libs so I'm not so sure how I should handle it and where to copy what. would really appreciate any detailed help. cheers & thanks a lot
whenever you want. drag'n'drop OpenSSL.xcframework
https://user-images.githubusercontent.com/758033/152779148-2653cfa4-5090-494a-b448-f0300fcb1229.mov
do I also need to tell Xcode where the static libs are? I still also need to follow this step:
Select Build Phases and Link Binary With Libraries. Select + and navigate to the static OpenSSL libraries that was included in the framework.
?
because I haven't done it now (after your reply) and I get an error of:
Could not build Objective-C module 'OpenSSL'
no.
thanks for the quick support. I have fixed the objective-c issue by following this issue: https://github.com/krzyzanowskim/OpenSSL/issues/117
but to make sure if I succeeded in installing it, I tried to write a simple code that uses this lib:
import SwiftUI
import OpenSSL
struct ContentView: View {
let cert : UnsafeMutablePointer<X509>
var body: some View {
Text("Hello, world!")
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
But I get a compile error:
Cannot find type 'X509' in scope
even though the lib should have been imported. am I missing some steps?
great.
am I missing some steps?
that's how Swift imports OpenSSL C headers. https://github.com/krzyzanowskim/OpenSSL/issues/108#issuecomment-760473047
Hello and thanks for your work
I am trying to install it for Xcode. I'm using a Mac with m1.
the instructions part under the Xcode Setup says :
is it those headers folders: Frameworks/OpenSSL.xcframework/ios-arm64_armv7/OpenSSL.framework/Headers/ Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator/OpenSSL.framework/Headers/ Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst/OpenSSL.framework/Headers/ Frameworks/OpenSSL.xcframework/macos-arm64_x86_64/OpenSSL.framework/Headers/
or is it: iphoneos/include/openssl/ iphonesimulator/include/openssl/ macosx/include/openssl/ macosx_catalyst/include/openssl/
or: Frameworks/iphoneos/OpenSSL.framework/Headers/ Frameworks/iphonesimulator/OpenSSL.framework/Headers/ Frameworks/macosx/OpenSSL.framework/Headers/ Frameworks/macosx_catalyst/OpenSSL.framework/Headers/
thank you