在SEEM Beacon Manager iOS Cordova SDK中设置HTTPs连接

Setup HTTPs connection in SEEM Beacon Manager iOS Cordova SDK

本文关键字:设置 HTTPs 连接 SDK Cordova SEEM Beacon Manager iOS      更新时间:2023-09-26

我正在使用https://github.com/glanzkinder/SEEM-Beacon-Manager-Cordova-SDK.通过HTTP不使用SSL,一切都很好。我需要通过SLL保护我的连接,但我不知道如何启用"SSL"连接。

//SEEM API Configuration
SEEM.setApiPort(443);
SEEM.setApiUrl('my.example-domain.com');
SEEM.setAutoUuidFetch(true);
//try listen beacon
SEEM.startListeningToBeaconRegion(function(result) {
    console.log("Start Listening to Beacon Region successful: ");
    console.log("UUID: " + result[0]);
    console.log("major: " + result[1]);
    console.log("minor: " + result[2]);
}, function(result) {
    console.log("Start Listening to Beacon Region failed:");
    console.log(result);
}, 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', null, null, true);

这是我的错误信息:

Start Listening to Beacon Region failed
SSL-Connection error.

有人知道如何启用SSL吗?

根据文档,您需要设置SEEM.setApiSslEnabled(true);。只需尝试此配置:

//SEEM API Configuration
SEEM.setApiPort(443);
SEEM.setApiSslEnabled(true);
SEEM.setApiUrl('my.example-domain.com');
SEEM.setAutoUuidFetch(true);