GroupStateObserver().isEligibleForGroupSession returning always false ?

Hello, Based on following the sample code for Draw together to check whether a group session is eligible, I just had to make a State object for Group state observer and use GroupStateObserver().isEligibleForGroupSession as a boolean but it always return false. I checked the documentation and it requires to configure a subscriber but don't see it in the sample code. Am I missing something?. Any help will be really appreciated.

Accepted Reply

Ok I seemed to have resolve the issue,to modify a subscriber is not available in the sample code for Draw together app so I just gave up and coded my own subscriber. A sample is like this one below

groupStateObserver.$isEligibleForGroupSession
            .receive(on: DispatchQueue.main)
            .assign(to: \.ready, on: self)
            .store(in: &subscriptions)
        

Replies

Ok I seemed to have resolve the issue,to modify a subscriber is not available in the sample code for Draw together app so I just gave up and coded my own subscriber. A sample is like this one below

groupStateObserver.$isEligibleForGroupSession
            .receive(on: DispatchQueue.main)
            .assign(to: \.ready, on: self)
            .store(in: &subscriptions)