Apple has released this:
https://developer.apple.com/documentation/arkit/creating_face-based_ar_experiences
a while ago. I tried it and it produces a runtime problem.
I'm using an iPhone XR and the project is building successfully and is working normally. But at least one process should be executed in the main thread, but I'm not able to figure out, which part this is :/
The error Message looks like
2019-04-26 20:17:40.360763+0200 ARKitFaceExample[16979:3438178] [DYMTLInitPlatform] platform initialization successful
2019-04-26 20:17:40.551196+0200 ARKitFaceExample[16979:3438133] Metal GPU Frame Capture Enabled
2019-04-26 20:17:40.551498+0200 ARKitFaceExample[16979:3438133] Metal API Validation Enabled
2019-04-26 20:17:40.710761+0200 ARKitFaceExample[16979:3438133] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-04-26 20:17:40.711381+0200 ARKitFaceExample[16979:3438133] [MC] Reading from public effective user settings.
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 16979, TID: 3438188, Thread name: com.apple.CoreMotion.MotionThread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 libobjc.A.dylib 0x000000021789f6f4 <redacted> + 56
5 CoreMotion 0x000000021dfe9638 CoreMotion + 292408
6 CoreMotion 0x000000021dfe9b68 CoreMotion + 293736
7 CoreMotion 0x000000021dfe9a78 CoreMotion + 293496
8 CoreMotion 0x000000021e0178a8 CoreMotion + 481448
9 CoreMotion 0x000000021e0178ec CoreMotion + 481516
10 CoreFoundation 0x000000021862b78c <redacted> + 28
11 CoreFoundation 0x000000021862b074 <redacted> + 276
12 CoreFoundation 0x0000000218626368 <redacted> + 2276
13 CoreFoundation 0x0000000218625764 CFRunLoopRunSpecific + 452
14 CoreFoundation 0x0000000218626498 CFRunLoopRun + 84
15 CoreMotion 0x000000021e017280 CoreMotion + 479872
16 libsystem_pthread.dylib 0x00000002182a5920 <redacted> + 132
17 libsystem_pthread.dylib 0x00000002182a587c _pthread_start + 48
18 libsystem_pthread.dylib 0x00000002182addcc thread_start + 4
2019-04-26 20:17:40.745827+0200 ARKitFaceExample[16979:3438188] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 16979, TID: 3438188, Thread name: com.apple.CoreMotion.MotionThread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 libobjc.A.dylib 0x000000021789f6f4 <redacted> + 56
5 CoreMotion 0x000000021dfe9638 CoreMotion + 292408
6 CoreMotion 0x000000021dfe9b68 CoreMotion + 293736
7 CoreMotion 0x000000021dfe9a78 CoreMotion + 293496
8 CoreMotion 0x000000021e0178a8 CoreMotion + 481448
9 CoreMotion 0x000000021e0178ec CoreMotion + 481516
10 CoreFoundation 0x000000021862b78c <redacted> + 28
11 CoreFoundation 0x000000021862b074 <redacted> + 276
12 CoreFoundation 0x0000000218626368 <redacted> + 2276
13 CoreFoundation 0x0000000218625764 CFRunLoopRunSpecific + 452
14 CoreFoundation 0x0000000218626498 CFRunLoopRun + 84
15 CoreMotion 0x000000021e017280 CoreMotion + 479872
16 libsystem_pthread.dylib 0x00000002182a5920 <redacted> + 132
17 libsystem_pthread.dylib 0x00000002182a587c _pthread_start + 48
18 libsystem_pthread.dylib 0x00000002182addcc thread_start + 4
2019-04-26 20:17:52.404466+0200 ARKitFaceExample[16979:3438187] [SceneKit] Error: Scene <SCNScene: 0x283b7a260> is modified within a rendering callback of another scene (<SCNScene: 0x283b68000>). This is not allowed and may lead to crash
with the following message on runtime:
I hope someone can help me :/

