The requirement for macOS apps to be notarized has thrown a few challenges, one of them being that developers are having trouble with apps that use Indy components with SSL. This article describes how to overcome that issue.

Rather than dive headlong into working out why the notarized app would not work, I decided to “start from scratch” (in a way), and work out how to build the dylibs for macOS. The results are located here (i.e. macOS binaries for OpenSSL, version 1.0.2s).

The binaries need to be added to your application via the Deployment Manager, and the Remote path value for each binary is: Contents\MacOS, e.g:

Note that in this picture, I have selected All configurations for macOS 64-bit, so that both Debug and Release are shown.

In the project source, add System.IOUtils and IdSSLOpenSSLHeaders to the uses clause, and call IdOpenSSLSetLibPath, like this:

[source language=”delphi”]
program NotarizedIndy;

uses
System.StartUpCopy,
System.IOUtils,
FMX.Forms,
IdSSLOpenSSLHeaders,
Unit1 in ‘Unit1.pas’ {Form1};

{$R *.res}

begin
IdOpenSSLSetLibPath(TPath.GetDirectoryName(ParamStr(0)));
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
[/source]

After compiling and notarizing your application, you should find that Indy with SSL now works.