Skip to content

Commit 68b6de2

Browse files
nickw1coopbri
andauthored
Remove unnecessary permission calls in geolocation backend (#17)
* Remove unnecessary (and erroring on some devices) permission calls in geolocationBackend * ci(changesets): add geo permission changeset --------- Co-authored-by: Brian Cooper <brian@brian-cooper.com>
1 parent 09a01dd commit 68b6de2

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.changeset/social-bananas-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@omnidotdev/rdk": patch
3+
---
4+
5+
Remove unnecessary permission calls in geolocation backend

packages/rdk/src/geolocation/geolocationBackend.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,7 @@ const createGeolocationBackend = (options: unknown): XRBackend => {
7171
console.error("[geolocationBackend] Device orientation error:", err);
7272
});
7373

74-
// Use LocAR.js built-in permission methods
75-
try {
76-
if (deviceOrientation.requestOrientationPermissions) {
77-
await deviceOrientation.requestOrientationPermissions();
78-
} else if (deviceOrientation.createObtainPermissionGestureDialog) {
79-
deviceOrientation.createObtainPermissionGestureDialog();
80-
}
81-
} catch (err) {
82-
console.warn(
83-
"[geolocationBackend] Could not request orientation permissions:",
84-
err,
85-
);
86-
}
87-
74+
// Initialize permission handling
8875
deviceOrientation.init?.();
8976

9077
// GPS events; just log here, components can listen via `getInternal()`

0 commit comments

Comments
 (0)