Ran
|
Files
376
|
Run time
14s
|
Badge
Embed ▾
README BADGES
|
push
github
Avoid crashing the app if the app delegate is written in Swift and doesn't have a window property Summary: `window` is an optional property. If an `UIApplicationDelegate` is implemented in Swift and doesn't implement this property, the current code will crash. This was the case for NativeUIPreview's app delegate (used for [iOS Snapshot Test Previews](https://fb.workplace.com/groups/735885229793428/posts/25216903081264969/)): https://www.internalfb.com/code/fbsource/[e59804301a3c]/fbobjc/Configurations/Buck/NativeUIPreview/AppDelegate.swift?lines=6-10 This diff fixes the crash itself, although we may want to do think about a better way to get the size of the window (eg: using `UIWindowSceneDelegate` instead?). Reviewed By: LukeDefeo Differential Revision: D65665540 fbshipit-source-id: 481c76a93
3292 of 7365 branches covered (44.7%)
Branch coverage included in aggregate %.
8124 of 15013 relevant lines covered (54.11%)
84.92 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|