Skip to content

Commit

Permalink
[VIRO-4783] Fix for iOS bridge showing 4 (requires main queue setup)w…
Browse files Browse the repository at this point in the history
…arnings

This change mimics changes made in other RN modules like RCTImageLoader, react-native-share,etc
react-native-share/react-native-share#331
facebook/react-native#17679

Starting this RN version, FB seems to default to NO main queue anyways, if not specified.
But they raise these warnings anyway.


Former-commit-id: 01a4cb4fed3760290f90d613e74ffa9a6b18c981
  • Loading branch information
manbod committed Jan 9, 2019
1 parent a57e835 commit 81c55f2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/ViroReact/AR/Modules/VRTARTrackingTargetsModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ - (instancetype)init {
return self;
}

+ (BOOL)requiresMainQueueSetup {
return NO;
}

- (VRTARImageTargetPromise *)getARImageTargetPromise:(NSString *)name {
NSObject *obj = _targetsDict[name];
if (obj && [obj isKindOfClass:[VRTARImageTargetPromise class]]) {
Expand Down
4 changes: 4 additions & 0 deletions ios/ViroReact/Modules/VRTAnimationManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ - (instancetype)init {
return kv == _parsedAnimations.end() ? nullptr : kv->second;
}

+ (BOOL)requiresMainQueueSetup {
return NO;
}

/*
Parses the animations from self.animations into VROExecutableAnimations, stored
in _parsedAnimations.
Expand Down
4 changes: 4 additions & 0 deletions ios/ViroReact/Modules/VRTMaterialManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ - (instancetype)init {
return self;
}

+ (BOOL)requiresMainQueueSetup {
return NO;
}

// Reload all materials; typically used when EGL context switches
- (void)reloadMaterials {
_eglContextLoaded = YES;
Expand Down
4 changes: 4 additions & 0 deletions ios/ViroReact/Modules/VRTPerfMonitor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ - (instancetype)init
return [super init];
}

+ (BOOL)requiresMainQueueSetup {
return NO;
}

- (void)setBridge:(RCTBridge *)bridge
{
_bridge = bridge;
Expand Down

0 comments on commit 81c55f2

Please sign in to comment.