Skip to content

Commit 81c55f2

Browse files
committed
[VIRO-4783] Fix for iOS bridge showing 4 (requires main queue setup)warnings
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
1 parent a57e835 commit 81c55f2

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

ios/ViroReact/AR/Modules/VRTARTrackingTargetsModule.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ - (instancetype)init {
221221
return self;
222222
}
223223

224+
+ (BOOL)requiresMainQueueSetup {
225+
return NO;
226+
}
227+
224228
- (VRTARImageTargetPromise *)getARImageTargetPromise:(NSString *)name {
225229
NSObject *obj = _targetsDict[name];
226230
if (obj && [obj isKindOfClass:[VRTARImageTargetPromise class]]) {

ios/ViroReact/Modules/VRTAnimationManager.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ - (instancetype)init {
6565
return kv == _parsedAnimations.end() ? nullptr : kv->second;
6666
}
6767

68+
+ (BOOL)requiresMainQueueSetup {
69+
return NO;
70+
}
71+
6872
/*
6973
Parses the animations from self.animations into VROExecutableAnimations, stored
7074
in _parsedAnimations.

ios/ViroReact/Modules/VRTMaterialManager.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ - (instancetype)init {
142142
return self;
143143
}
144144

145+
+ (BOOL)requiresMainQueueSetup {
146+
return NO;
147+
}
148+
145149
// Reload all materials; typically used when EGL context switches
146150
- (void)reloadMaterials {
147151
_eglContextLoaded = YES;

ios/ViroReact/Modules/VRTPerfMonitor.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ - (instancetype)init
3131
return [super init];
3232
}
3333

34+
+ (BOOL)requiresMainQueueSetup {
35+
return NO;
36+
}
37+
3438
- (void)setBridge:(RCTBridge *)bridge
3539
{
3640
_bridge = bridge;

0 commit comments

Comments
 (0)