add macOS deps to shared libraries
Summary: Add macOS dependencies and alternative classes to the libraries that FlipperKitLayoutPlugin needs to function. Reviewed By: priteshrnandgaonkar Differential Revision: D27328277 fbshipit-source-id: f22d1e9f6a5415cee0bae8eaada653be5f5467b3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ec603255fe
commit
7c44d4d4f0
@@ -7,12 +7,22 @@
|
||||
|
||||
#if FB_SONARKIT_ENABLED
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "SKInvalidation.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UICollectionView+SKInvalidation.h"
|
||||
#import "UIView+SKInvalidation.h"
|
||||
|
||||
#elif TARGET_OS_OSX
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "NSCollectionView+SKInvalidation.h"
|
||||
#import "NSView+SKInvalidation.h"
|
||||
|
||||
#endif
|
||||
|
||||
@implementation SKInvalidation
|
||||
|
||||
+ (instancetype)sharedInstance {
|
||||
@@ -29,6 +39,7 @@
|
||||
+ (void)enableInvalidations {
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
#if TARGET_OS_IPHONE
|
||||
[UIView enableInvalidation];
|
||||
[UICollectionView enableInvalidations];
|
||||
|
||||
@@ -43,6 +54,13 @@
|
||||
selector:@selector(windowDidBecomeHidden:)
|
||||
name:UIWindowDidBecomeHiddenNotification
|
||||
object:nil];
|
||||
|
||||
#elif TARGET_OS_OSX
|
||||
|
||||
[NSView enableInvalidation];
|
||||
[NSCollectionView enableInvalidations];
|
||||
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user