Skip to content

Commit

Permalink
Fix comparison warning (#147)
Browse files Browse the repository at this point in the history
After changing the deployment target for the library to 6.0,
`UIApplicationUserDidTakeScreenshotNotification` was not guaranteed to
be available anymore. However, if a project's deployment target is set
to 8.0 (which _does_ guarantee the presence of the symbol) this leads to
a warning in Xcode.
sberrevoets authored and kattrali committed Jun 7, 2017
1 parent 6771238 commit f1ab071
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Source/BugsnagNotifier.m
Original file line number Diff line number Diff line change
@@ -404,7 +404,7 @@ - (void)updateAutomaticBreadcrumbDetectionSettings {
UIWindowDidResignKeyNotification,
UIScreenBrightnessDidChangeNotification];
#elif TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
NSMutableArray *notifications = @[UIWindowDidBecomeHiddenNotification,
return @[UIWindowDidBecomeHiddenNotification,
UIWindowDidBecomeVisibleNotification,
UIApplicationWillTerminateNotification,
UIApplicationWillEnterForegroundNotification,
@@ -414,10 +414,11 @@ - (void)updateAutomaticBreadcrumbDetectionSettings {
UIMenuControllerDidShowMenuNotification,
UIMenuControllerDidHideMenuNotification,
NSUndoManagerDidUndoChangeNotification,
NSUndoManagerDidRedoChangeNotification].mutableCopy;
if (&UIApplicationUserDidTakeScreenshotNotification)
[notifications addObject:UIApplicationUserDidTakeScreenshotNotification];
return notifications;
NSUndoManagerDidRedoChangeNotification,
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0
UIApplicationUserDidTakeScreenshotNotification
#endif
];
#elif TARGET_OS_MAC
return @[NSApplicationDidBecomeActiveNotification,
NSApplicationDidResignActiveNotification,

0 comments on commit f1ab071

Please sign in to comment.