Getting this when trying to use inside an extension
'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.
I comment out everything in that function and it compiles fine
func tick() {
// let previousValue = UIApplication.shared.isNetworkActivityIndicatorVisible
// let newValue = (runningRequests > 0)
// if newValue != previousValue {
// UIApplication.shared.isNetworkActivityIndicatorVisible = newValue
// }
}
Getting this when trying to use inside an extension
'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.
I comment out everything in that function and it compiles fine