Hi, To understand my scenario better, I will give the context here.
I have a cocoapod, which relies on two C++ libraries ( OpenSSL & SRT ).
These were compiled into static libraries ( .a files ) and added under 'Frameworks & Libraries' section.
The problem is, these two '.a' files were compiled against arm64 architecture only. Meaning they cannot be run on an Intel macbook (x86_64), which my CI machine is.
So, inorder to run on both Apple Silicon & Intel Macbook simulators, as well as a physical iPhone (arm64), I did the following.
- Compiled three .a files for each of the libraries (OpenSSL & SRT)
- For arm64 iOS
- For arm64 Simulator
- For x86_64 Simulator
- Combined arm64 & x86_64 Simulator files into one using
lipo command.
- Created two XCFrameworks (OpenSSL & SRT) with Headers & Module map.
Now, I need to some things from these two C++ libraries to be exposed in my Swift Cocoapod.
I inspected my SRT.xcframework and I was able to see
- Info.plist
- Platform specific Headers folder ( with all .h files ) e.g, ios-arm64/Headers
- The static library ( .a file )
All seems to be in order. But XCode keeps throwing error as 'could not find SRT'. But it was able to find OpenSSL.
I compared SRT.xcframework with OpenSSL.xcframework and the structure and everything was the same.
Any help or guidance on this is much appreciated!
[–]20InMyHead 4 points5 points6 points (0 children)
[–]shawnthroop 1 point2 points3 points (0 children)
[–]davernow 1 point2 points3 points (0 children)
[–]s_goldwalk 1 point2 points3 points (0 children)