Skip to content

Commit 12ac23e

Browse files
Cannot run “try before you buy” in Pokemon demo #74
1 parent 83e2c29 commit 12ac23e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ar.ios.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,11 @@ export class AR extends ARBase {
226226

227227
// TODO pass this in - currently this is configured to occlude human bodies, see https://developer.apple.com/documentation/arkit/arconfiguration/3089121-framesemantics?language=objc
228228
if (sdkVersion() >= 13) {
229-
// note that this requires at least the A12 chip (iPhone Xs)
230-
config.frameSemantics = ARFrameSemantics.PersonSegmentationWithDepth;
229+
// note that this requires at least the A12 chip (iPhone Xs and newer), so add this try-catch to prevent a crash on fi. an iPhone X
230+
try {
231+
config.frameSemantics = ARFrameSemantics.PersonSegmentationWithDepth;
232+
} catch (ignore) {
233+
}
231234
}
232235
}
233236

0 commit comments

Comments
 (0)