Hyperconnectivity icon indicating copy to clipboard operation
Hyperconnectivity copied to clipboard

Please provide example of how to customise `connectivityURLs`

Open mylogon341 opened this issue 3 years ago • 1 comments

From what I can see, configuration is private private let configuration: Configuration and I can't seem to construct my own Hyperconnectivity object like this

  let config = Hyperconnectivity.Configuration(connectivityURLs: [ ])
  let connectivity = Hyperconnectivity(configuration: config)

as it gives me the error 'Hyperconnectivity' initializer is inaccessible due to 'internal' protection level.

Can you give me any hints or is this a bug that can be resolved with a PR by appending public to the init? Thanks

mylogon341 avatar Jan 13 '22 17:01 mylogon341

@mylogon341 Use the Hyperconnectivity.Publisher init; that way, you'll be able to change the configuration and all its properties, plus get a Publisher from it.

let config = Hyperconnectivity.Configuration(connectivityURLs: [ ])
let connectivity = Hyperconnectivity.Publisher(configuration: config)

A bit late, but hopefully helpful.

BrunoMiguens avatar Oct 13 '22 10:10 BrunoMiguens