SwiftyHue icon indicating copy to clipboard operation
SwiftyHue copied to clipboard

TIC SSL Trust Error

Open Vanshava opened this issue 6 years ago • 0 comments

Nice project, Testing it on very first step to create bridge. Before adding Allow Arbitrary Load plist i got "ATS failed system trust" after insert plist then have TIC SSL Trust Error as below Any hints? Attached code to see if anything i mess up. Thanks.


Environment: Swift 4 Plist: Added - "Allow Arbitrary Loads - Yes" Cocoapods: use_frameworks! pod 'SwiftyHue', '~> 0.4' end


Error as below:

18:02:48.043555+0800 Huetest[8125:257947] TIC SSL Trust Error [1:0x60c00016a8c0]: 3:0 2018-03-26 18:02:48.044128+0800 Huetest[8125:257947] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813) 2018-03-26 18:02:48.044363+0800 Huetest[8125:257947] Task <D2DFB085-554D-41C5-87C1-2F3E9A069F60>.<1> HTTP load failed (error code: -1202 [3:-9813]) 2018-03-26 18:02:48.044559+0800 Huetest[8125:257945] Task <D2DFB085-554D-41C5-87C1-2F3E9A069F60>.<1> finished with error - code: -1202

Code testing for searching bridges

import UIKit
import SwiftyHue

class ViewController: UIViewController {

    var bridgeFinder = BridgeFinder()
    var bridges: [HueBridge]?;
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    
    }
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
         bridgeFinder.delegate = self;
        bridgeFinder.start()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}

extension ViewController: BridgeFinderDelegate {
    func bridgeFinder(_ finder: BridgeFinder, didFinishWithResult bridges: [HueBridge]) {
        self.bridges = bridges;
        print(bridges)
    }
}

Vanshava avatar Mar 26 '18 10:03 Vanshava