Closed mickeyreiss closed 5 years ago
@mickeyreiss Thank you for your question about receiving delegate callbacks on Secondary Environments. The primary and secondary environments both can register delegates.
The primary environment works through the LDClient to provide backwards compatibility to clients not using the ME capabilities. As such, you can continue to use these methods as you could prior to 2.14.0
.
With 2.14.0
and later, you can register delegates on the LDClientInterface object vended by +[LDClient environmentForMobileKeyNamed:]. If you pass the key kLDPrimaryEnvironmentName
to that method, the vended object operates on the primary environment. If you pass your client defined environment name (registered in LDConfig) the vended object operates on the secondary environment. Therefore you can register a delegate for each environment (primary and secondary), and once done the SDK should notify the appropriate delegate. These can be the same or different objects conforming to ClientDelegate.
We are looking at the documentation associated with this issue to see if we can improve it.
Thanks for the thorough explanation.
Is it possible to receive delegate callbacks on secondary environments? Looks like only the primary environment supports live updates.