I'm trying to adapt the code of my app to the new iOS version (iOS 13).
I need to get the information from the Subviews from the Statusbar of the phone, specifically the "cellularEntry", the display value.
This is how I used to do it in older iOS version than iOS 13:
UIApplication *app = [UIApplication sharedApplication];
id statusBar = [app valueForKey:@"statusBar"];
NSArray subviews = [[statusBar valueForKey:@"statusBar"] valueForKey:@"currentData"];
id dataNetworkItemView = [[subviews valueForKey:@"cellularEntry"] valueForKey:@"displayValue"];
This is how I'm trying to do it for iOS 13:
UIApplication *app = [UIApplication sharedApplication];
UIView statusBar = [[UIView alloc]initWithFrame:app.keyWindow.windowScene.statusBarManager.statusBarFrame];
NSArray subviews = [statusBar subviews];
id dataNetworkItemView = [[subviews valueForKey:@"cellularEntry"] valueForKey:@"displayValue"];
My problem is that the subviews array in the second case, is always empty, so I can not get any value.
It would be really helpful if you could suggest me the right way to get the subviews in iOS 13 or an alternative to get CellularEntrey value.