ConnectSDK / Connect-SDK-iOS

iOS source project for Connect SDK
Apache License 2.0
164 stars 129 forks source link

Cannot discover Samsung SmartTV #257

Open volodymyr-koff opened 9 months ago

volodymyr-koff commented 9 months ago

Hey everyone. I am trying to conduct devices search on my physical device, but there are only apple devices found in the network, such as my two MacBoks. My Samsung SmartTV can never be found during discovery. com.apple.developer.networking.multicast entitlement is enabled. Any ideas how to solve it? Thanks a lot in advance

IMG_A7396F091DD9-1

tuanvucourse commented 8 months ago

I had same issue

MuhammadAsad786 commented 3 months ago

any one solve this issue

HarshadTechmero commented 3 months ago

Hi @MuhammadAsad786 @tuanvucourse @volodymyr-koff

I need one help, i am working on ConnectSDK iOS Configuration for TV Remote, i am setup sdk and give permission for local network and other and Try to find smart TV devices usinf DiscoveryManager class but not find any device, var discoveryManager = DiscoveryManager.shared() discoveryManager?.registerDefaultServices() let videoCapabilities = [ kMediaPlayerPlayVideo, kMediaControlAny, kVolumeControlVolumeUpDown ] ` let imageCapabilities = [kMediaPlayerDisplayImage]

let videoFilter = CapabilityFilter(capabilities: videoCapabilities)
let imageFilter = CapabilityFilter(capabilities: imageCapabilities)
discoveryManager?.delegate = self
discoveryManager?.capabilityFilters = [videoFilter, imageFilter]
discoveryManager?.pairingLevel = DeviceServicePairingLevelOn
discoveryManager?.registerDeviceService(WebOSTVService.self, withDiscovery: SSDPDiscoveryProvider.self)
discoveryManager?.registerDeviceService(AirPlayService.self, withDiscovery: ZeroConfDiscoveryProvider.self)
discoveryManager?.registerDeviceService(CastService.self, withDiscovery: CastDiscoveryProvider.self)
discoveryManager?.registerDeviceService(DIALService.self, withDiscovery: SSDPDiscoveryProvider.self)
discoveryManager?.registerDeviceService(RokuService.self, withDiscovery: SSDPDiscoveryProvider.self)
discoveryManager?.registerDeviceService(DLNAService.self, withDiscovery: SSDPDiscoveryProvider.self)
discoveryManager?.startDiscovery()

extension ConnectingDeviceViewController: DiscoveryManagerDelegate {

func discoveryManager(_ manager: DiscoveryManager!, didFind device: ConnectableDevice!) { // A ConnectableDevice was found print(device.friendlyName ?? "") }

func discoveryManager( manager: DiscoveryManager!, didLose device: ConnectableDevice!) { // A ConnectableDevice was lost print(device.friendlyName ?? "") } func discoveryManagerDidFailWithError( error: Error!) { print("Discovery error: (error.localizedDescription)") }`

Please me if i need to add permission or anything else

Screenshot 2024-04-05 at 6 48 49 PM
MuhammadAsad786 commented 3 months ago

Add multicast permission in info.plist, your issue will be solved

HarshadTechmero commented 3 months ago

@MuhammadAsad786 Thank you so much for help it's resolved now and i am able to find devices.. Thank you so much for your help and your valuable time

HarshadTechmero commented 3 months ago

Hi @MuhammadAsad786 i need one small help from your side.. My device listing is done but when i am connected to device using Connect() method but i need to send pairing code to Connected Device.. Have you any idea about that?