DO NOT MERGE: Issue 2106: Live Preview Snapshot

This is a PR for issue #2106.
In which scenarios `[UIApplication sharedApplication]` would return nil?