UIApplication is unavailable for extensions. To add an indicator view, you'll have to do that via your UIViewController stack, but you CAN get the size of the screen, which might suffice depending upon the exact use case (swift):
UIScreen.mainScreen().bounds.size
Read more here about the differences between [UIScreen mainScreen].bounds vs [UIApplcation sharedApplication].keyWindow.bounds?
Update
An alternative to using a UIScreen to get size is to navigate the view hierarchy. This works anywhere in a UIView or UIViewController where the view has been laid out. You can also add the indicator to the top most view.
// Find the top most view
var view: UIView = self;
while let higherView = view.superview {
view = higherView;
}
// Size you need
var size: CGSize = view.frame.size;
// Add the indicator
let indicator: UIView = UIView(frame: CGRectMake(100, 100, 100, 100));
indicator.backgroundColor = UIColor.orangeColor();
view.addSubview(indicator);
view.bringSubviewToFront(indicator);