代码之家  ›  专栏  ›  技术社区  ›  lin

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

  •  2
  • lin  · 技术社区  · 11 年前

    我正在使用 https://github.com/glanzkinder/SEEM-Beacon-Manager-Cordova-SDK 。不使用 SSL 通过 HTTP 。我需要通过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吗?

    1 回复  |  直到 10 年前
        1
  •  1
  •   Heiko    11 年前

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

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