MQTT-Client-Framework
MQTT-Client-Framework copied to clipboard
Remove or add condition check for [UIApplication sharedApplication] in ForegroundReconnection.h
Remove or add condition check for [UIApplication sharedApplication] in ForegroundReconnection.h so that the framework can be used in widgets.
Is [UIApplication sharedApplication] the only problem for Widgets or do you remember if there are other APIs used as well, that are not accessible from widgets ?
Thanks for your response. Yes, [UIApplication sharedApplication] is the only issue when used in Widgets.
I think our best option here is to extract whole foreground reconnection to separate pod (maybe even repo?). I believe it is the only one that depends on UIKit and MQTTClient should not be dependent on UI framework. It could be in theory integrated macOS app as well.
Yes, the UIKit dependency should be removed.
It is the client's responsibility to stop / resume the connection. For some apps, they might want to keep the connection in background.
Thanks for the great MQTT framework.