ConnectSDK / Connect-SDK-iOS

iOS source project for Connect SDK
Apache License 2.0
174 stars 136 forks source link

DiscoverService not showing TVs #271

Open crash481 opened 3 months ago

crash481 commented 3 months ago

Hello, want to use your ConnectSDK for iOS and Android. I started researching with iOS

So I created empty iOS project, added via CocoaPods pod "ConnectSDK" Also tried pod "ConnectSDK/Core"

In Podfile.lock ConnectSDK was resolved to version 1.6.0

After I did in ViewController simple by documentation:

override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        discManager = DiscoveryManager.shared()
        discManager?.startDiscovery()
        discManager?.delegate = self

        discManager?.devicePicker().delegate = self
        discManager?.devicePicker().show(self)
}

extension ViewController: DevicePickerDelegate, ConnectableDeviceDelegate {
    func devicePicker(_ picker: DevicePicker!, didSelect device: ConnectableDevice!) {
        self.device = device
        device.delegate = self
        device.connect()
    }

    func connectableDeviceReady(_ device: ConnectableDevice!) {
    }

    func connectableDeviceDisconnected(_ device: ConnectableDevice!, withError error: (any Error)!) {
    }
}

extension ViewController: DiscoveryManagerDelegate {
    func discoveryManager(_ manager: DiscoveryManager!, didFind device: ConnectableDevice!) {
    }

    func discoveryManager(_ manager: DiscoveryManager!, didLose device: ConnectableDevice!) {
    }

    func discoveryManager(_ manager: DiscoveryManager!, didUpdate device: ConnectableDevice!) {
    }

    func discoveryManager(_ manager: DiscoveryManager!, didFailWithError error: (any Error)!) {
    }
}

But in presented devicePicker no any devices presented and no any delegate callbacks called. Running on physical iPhone 13pro

Also in logs I see, maybe it is problem nehelper sent invalid result code [1] for Wi-Fi information request Tried to add "access Wi-Fi information" "Wireless Accessory Configuration" entitlements

I have modern(2021 manufactured) LG webOS and Samsung TVs connected to same wifi network. Also another popular tv-remote apps finds this TVs well

Please help me with this situation, what I need to do?

crash481 commented 3 months ago

I found my devices after I powerOn/powerOff TVs. Before turning off/on on every app launch - devices on appearing in list and delegate This is also problem, that needs fix. Here is issue for similar by anothers https://github.com/ConnectSDK/Connect-SDK-iOS/issues/269

I connected to my Samsung TV successfully. VolumeUp working via device.volumeControl().volumeUp(...) But I cannot not find any ways how I can use "home", "up", "down" and other buttons. device.keyControl() is nil.

Also pairing request on screen not appeared, as I know Samsung needs it

crash481 commented 3 months ago

But on webOS (lg) while connect() it is pairing request appeared on screen and all is works. If this ConnectSDK supports Samsung for remote controller?

crash481 commented 3 months ago

@iheart2code @henrylevak @iadnan @jonghenhan @seokhee-lee @jlai @dung2le @oleksii-frolov @lgcast-dev

HarshadTechmero commented 3 months ago

269

Nope it's support Samsung TV

HarshadTechmero commented 3 months ago

@crash481 have you idea about screen mirroring iOS to Smart Android TV?

crash481 commented 3 months ago

For now without screen mirroring I need remote controls of TV via mobile application. Can you help how you implement remote controls for Samsung? @HarshadTechmero

HarshadTechmero commented 3 months ago

@crash481 i have not develop samsung TV remote, you can try with smartview SDK for that.

HarshadTechmero commented 3 months ago

@crash481 have you any idea about ScreenMirroring iOS to TV?

Gopal02024 commented 2 months ago

@HarshadTechmero and @crash481 Any idea about why Roku devices lose their method while discovering? I want to Update method instead of lose method.

HarshadTechmero commented 2 months ago

@Gopal02024 have you able to pairing ANDROID TV?

Gopal02024 commented 2 months ago

@Gopal02024 have you able to pairing ANDROID TV?

yes

var discoveryManager: DiscoveryManager? discoveryManager = DiscoveryManager.shared() discoveryManager?.pairingLevel = DeviceServicePairingLevelOn

HarshadTechmero commented 2 months ago

is that your LG Smart TV or Other Android TV?

HarshadTechmero commented 2 months ago

@Gopal02024 have you able to pairing ANDROID TV?

yes

var discoveryManager: DiscoveryManager? discoveryManager = DiscoveryManager.shared() discoveryManager?.pairingLevel = DeviceServicePairingLevelOn

I have also try with same but not able to send pairing code using this code

Gopal02024 commented 2 months ago

is that your LG Smart TV or Other Android TV?

LG Smart TV

Gopal02024 commented 2 months ago

@Gopal02024 have you able to pairing ANDROID TV?

yes var discoveryManager: DiscoveryManager? discoveryManager = DiscoveryManager.shared() discoveryManager?.pairingLevel = DeviceServicePairingLevelOn

I have also try with same but not able to send pairing code using this code

Are you use below line? var device: ConnectableDevice? device?.setPairingType(DeviceServicePairingTypePinCode)

HarshadTechmero commented 2 months ago

@Gopal02024 have you able to pairing ANDROID TV?

yes var discoveryManager: DiscoveryManager? discoveryManager = DiscoveryManager.shared() discoveryManager?.pairingLevel = DeviceServicePairingLevelOn

I have also try with same but not able to send pairing code using this code

Are you use below line? var device: ConnectableDevice? device?.setPairingType(DeviceServicePairingTypePinCode)

Yes but my TV is Android OnePlus TV so

Gopal02024 commented 2 months ago

@Gopal02024 have you able to pairing ANDROID TV?

yes var discoveryManager: DiscoveryManager? discoveryManager = DiscoveryManager.shared() discoveryManager?.pairingLevel = DeviceServicePairingLevelOn

I have also try with same but not able to send pairing code using this code

Are you use below line? var device: ConnectableDevice? device?.setPairingType(DeviceServicePairingTypePinCode)

Yes but my TV is Android OnePlus TV so

I have no idea about OnePlus TV for pairing.

tung89hihi1123 commented 1 month ago

Tôi tìm thấy thiết bị của mình sau khi bật/tắt TV. Trước khi tắt/bật mỗi lần khởi chạy ứng dụng - thiết bị xuất hiện trong danh sách và ủy quyền Đây cũng là vấn đề, cần sửa. Đây là vấn đề tương tự của người khác #269

Tôi đã kết nối thành công với TV Samsung. VolumeUp hoạt động qua device.volumeControl().volumeUp(...) Nhưng tôi không thể tìm ra cách nào để sử dụng các nút "home", "up", "down" và các nút khác. device.keyControl()là không có.

Ngoài ra, yêu cầu ghép nối trên màn hình không xuất hiện vì tôi biết Samsung cần nó

how can connect with SamSungTV,sir?