Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 1aa96c9

Browse files
authored
fix: ios orientation sensor
1 parent 741e59e commit 1aa96c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ios/RNSensorsOrientation.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ - (void) isAvailableWithResolver:(RCTPromiseResolveBlock) resolve
127127
[self->_motionManager setShowsDeviceMovementDisplay:YES];
128128

129129
/* Receive the orientation data on this block */
130-
[self->_motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXTrueNorthZVertical
131-
toQueue:[NSOperationQueue mainQueue]
132-
withHandler:^(CMDeviceMotion *deviceMotion, NSError *error)
130+
NSOperationQueue *queue = [[NSOperationQueue alloc] init];
131+
[self->_motionManager startDeviceMotionUpdatesToQueue:queue withHandler:^(CMDeviceMotion *deviceMotion, NSError *error)
133132
{
134133
CMAttitude *attitude = deviceMotion.attitude;
135134

0 commit comments

Comments
 (0)