Um OpenSSL auf einem 64-Bit-iOS-Gerät zu installieren, müssen Sie die SSL-Bibliotheksdateien libcrypto.a und libssl.a auf Ihr System kopieren. Laden Sie das .zip-Archiv von iOS OpenSSL herunter, extrahieren Sie es und finden Sie die .a-Dateien im Verzeichnis \lib. Sie müssen die SSL-Bibliotheksdateien libcrypto.a und libssl.a in diese Verzeichnisse kopieren:
C:\Program Files (x86)\Embarcadero\Studio\<IDE Version>\lib\iosDevice64\debug
C:\Program Files (x86)\Embarcadero\Studio\<IDE-Version>\lib\iosDevice64\release
Fügen Sie die Unit sgcIdSSLOpenSSLHeaders_static (oder IdSSLOpenSSLHeaders_static, wenn Ihre sgcWebSockets-Edition nicht Enterprise ist) zu Ihrer uses-Klausel hinzu.
Wenn Sie eine beliebige Datei bereitstellen müssen, können Sie RemotePath = StartUp\Documents setzen, und um die Datei zu laden, verwenden Sie (erfordert das Hinzufügen von System.IOUtils zur uses-Klausel):
TPath.GetDocumentsPath + PathDelim + <Ihr Dateiname>
Die OpenSSL-Bibliotheken dürfen unter iOS nicht über das Menü Project/Deployment bereitgestellt werden.
Ändern Sie IdCompilerDefines.inc und aktivieren Sie SGC_OPENSSL_API_1_1 im IOS-Abschnitt:
{$IFDEF IOS}
{$DEFINE HAS_getifaddrs}
{$DEFINE USE_OPENSSL}
{$IFDEF CPUARM}
// RLebeau: For iOS devices, OpenSSL cannot be used as an external library,
// it must be statically linked into the app. For the iOS simulator, this
// is not true. Users who want to use OpenSSL in iOS device apps will need
// um die statische OpenSSL-Bibliothek zum Projekt hinzuzufügen und dann das
// IdSSLOpenSSLHeaders_static unit in their uses clause. It hooks up the
// statisch gelinkte Funktionen zur Verwendung durch die Unit IdSSLOpenSSLHeaders...
{$DEFINE STATICLOAD_OPENSSL}
// sgc--> für openssl API 1.1 aktivieren
{$DEFINE SGC_OPENSSL_API_1_1}
{$ENDIF}
{$ENDIF}
Sie können Bibliotheken aus Ihrem Konto herunterladen.
Ändern Sie IdCompilerDefines.inc und aktivieren Sie SGC_OPENSSL_API_1_1 und SGC_OPENSSL_API_3_0 im IOS-Abschnitt:
{$IFDEF IOS}
{$DEFINE HAS_getifaddrs}
{$DEFINE USE_OPENSSL}
{$IFDEF CPUARM}
// RLebeau: For iOS devices, OpenSSL cannot be used as an external library,
// it must be statically linked into the app. For the iOS simulator, this
// is not true. Users who want to use OpenSSL in iOS device apps will need
// um die statische OpenSSL-Bibliothek zum Projekt hinzuzufügen und dann das
// IdSSLOpenSSLHeaders_static unit in their uses clause. It hooks up the
// statisch gelinkte Funktionen zur Verwendung durch die Unit IdSSLOpenSSLHeaders...
{$DEFINE STATICLOAD_OPENSSL}
// sgc--> für openssl API 1.1 aktivieren
{$DEFINE SGC_OPENSSL_API_1_1}
// sgc--> enable for openssl API 3.0
{$DEFINE SGC_OPENSSL_API_3_0}
{$ENDIF}
{$ENDIF}
Sie können Bibliotheken aus Ihrem Konto herunterladen.