OGeek|极客世界-中国程序员成长平台

标题: javascript - 在 SEEM Beacon Manager iOS Cordova SDK 中设置 HTTPs 连接 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 05:17
标题: javascript - 在 SEEM Beacon Manager iOS Cordova SDK 中设置 HTTPs 连接

我正在使用 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 吗?



Best Answer-推荐答案


根据Documentation ,你需要设置SEEM.setApiSslEnabled(true);。试试这个配置:

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

关于javascript - 在 SEEM Beacon Manager iOS Cordova SDK 中设置 HTTPs 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28435612/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4