my code
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
view.backgroundColor = .white
view.addSubview(connectBtn)
connectBtn.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
connectBtn.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
connectBtn.heightAnchor.constraint(equalToConstant: 30).isActive = true
connectBtn.widthAnchor.constraint(equalToConstant: 100).isActive = true
connectBtn.addTarget(self, action: #selector(showAccessoryPicker), for: .touchUpInside)
}
@objc func showAccessoryPicker() {
EAAccessoryManager.shared().showBluetoothAccessoryPicker(withNameFilter: nil, completion: nil)
}
debug console
2020-07-21 15:26:40.674865+0800 StarPrnt[22299:6727201] A constraint factory method was
passed a nil layout anchor. This is not allowed, and may cause confusing exceptions. Break
on BOOL _NSLayoutConstraintToNilAnchor(void) to debug. This will be logged only once. This
may break in the future.
mPOP Printer I used official SDK to connect is work fine