Hi folks,
I'm currently implementing In-App purchase into a Mac Catalyst app, and facing troubles linking to static OpenSSL libraries.
Currently - as in other projects - I'm using a 3rd party tool to implement receipt validation (Receigen), which uses static OpenSSL libraries. These need to be built with a corresponding target (x86_64-apple-ios13.0-macabi?), but so far I wasn't able to compile / link the sources using the build-libssl.sh script from https://github.com/x2on/OpenSSL-for-iPhone.
Unfortunately I a newbie when it comes to building OpenSSL from sources with individual configs. Can anyone point my to some information ... all I found on SO were references to the mentioned target and GitHub repository.
Did anyone of you integrate OpenSSL (or even Receigen) in a Mac Catalyst app ... and how? Maybe it's only me over-complicating things.
Any help is appreciated, Mattes
I'm currently implementing In-App purchase into a Mac Catalyst app, and facing troubles linking to static OpenSSL libraries.
Currently - as in other projects - I'm using a 3rd party tool to implement receipt validation (Receigen), which uses static OpenSSL libraries. These need to be built with a corresponding target (x86_64-apple-ios13.0-macabi?), but so far I wasn't able to compile / link the sources using the build-libssl.sh script from https://github.com/x2on/OpenSSL-for-iPhone.
Unfortunately I a newbie when it comes to building OpenSSL from sources with individual configs. Can anyone point my to some information ... all I found on SO were references to the mentioned target and GitHub repository.
Did anyone of you integrate OpenSSL (or even Receigen) in a Mac Catalyst app ... and how? Maybe it's only me over-complicating things.
Any help is appreciated, Mattes
The OpenSSL libraries librypto.a and libssl.a cannot be defined as conditionally being linked: Due to the same names Xcode is only reflecting one platform version in its build phases, and it is not possible to define them platform specific. The solution is to combine these libraries into an XCFramework, so the right architecture for a build target is used automatically.
I've done this using <https://github.com/balthisar/openssl-xcframeworks/releases> ... actually I downloaded the binaries (although they could be built using the sources / scripts in the GitHub repo).
I still had to add OpenSSL header files (and their header search path) as the dynamically generated Receigen file cannot include the frameworks headers.
So my project runs on iOS simulator, iOS device and Mac Catalyst, and I "only" need to figure out the receipt validation thing...
Greetings, Mattes
I've done this using <https://github.com/balthisar/openssl-xcframeworks/releases> ... actually I downloaded the binaries (although they could be built using the sources / scripts in the GitHub repo).
I still had to add OpenSSL header files (and their header search path) as the dynamically generated Receigen file cannot include the frameworks headers.
So my project runs on iOS simulator, iOS device and Mac Catalyst, and I "only" need to figure out the receipt validation thing...
Greetings, Mattes