javascript - 在 SEEM Beacon Manager iOS Cordova SDK 中设置 HTTPs 连接
<p><p>我正在使用 <a href="https://github.com/glanzkinder/SEEM-Beacon-Manager-Cordova-SDK" rel="noreferrer noopener nofollow">https://github.com/glanzkinder/SEEM-Beacon-Manager-Cordova-SDK</a> .不通过 <code>HTTP</code> 使用 <code>SSL</code> 一切正常。我需要通过 SLL 保护我的连接,但我不知道如何启用“SSL”连接。</p>
<pre><code>//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);
console.log("major: " + result);
console.log("minor: " + result);
}, function(result) {
console.log("Start Listening to Beacon Region failed:");
console.log(result);
}, 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', null, null, true);
</code></pre>
<p>这是我的错误消息:</p>
<blockquote>
<pre><code>Start Listening to Beacon Region failed
SSL-Connection error.
</code></pre>
</blockquote>
<p>有人知道如何启用 SSL 吗? </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>根据<a href="https://github.com/glanzkinder/SEEM-Beacon-Manager-Cordova-SDK#setapisslenabled" rel="noreferrer noopener nofollow">Documentation</a> ,你需要设置<code>SEEM.setApiSslEnabled(true);</code>。试试这个配置:</p>
<pre><code>//SEEM API Configuration
SEEM.setApiPort(443);
SEEM.setApiSslEnabled(true);
SEEM.setApiUrl('my.example-domain.com');
SEEM.setAutoUuidFetch(true);
</code></pre></p>
<p style="font-size: 20px;">关于javascript - 在 SEEM Beacon Manager iOS Cordova SDK 中设置 HTTPs 连接,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/28435612/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/28435612/
</a>
</p>
页:
[1]