As previously mentioned, we are aware of an issue with the initializeOffscreen function not working in the DeepAR iOS SDK version 5.3.0 due to a priority issue that has been resolved. Consequently, we have continued to use version 5.4.1, maintaining the use of initializeOffscreen, and have decided to upgrade to the latest version of DeepAR in preparation for the Beauty API, changing the encoded frames from MetalView to deepAR.createARView.
After completing these changes, we proceeded to test on the minimum required OS version, which is 14, only to find that the screen is not rendering.
My project is built on SwiftUI. Therefore, when UIKit-related UI needs to be rendered in SwiftUI, UIViewRepresentable is used to display the UI on the screen. However, the problem arises when the UIView created by deepAR.createARView is displayed on the screen in iOS 14, as it does not appear.
In summary, when using UIViewRepresentable to display the screen created by deepAR.createARView in SwiftUI on an iOS 14 device, the screen is not being displayed correctly.
Several tests have been conducted regarding this issue:
-
I attempted to create a SwiftUI version by extracting the necessary code from the code available at GitHub - DeepARSDK/quickstart-ios-swift: DeepAR SDK for iOS example project. As expected, it does not work on iOS 14 but works on subsequent OS versions (iOS 15 and above).
-
When the GitHub - DeepARSDK/quickstart-ios-swift: DeepAR SDK for iOS example project project is downloaded and run on iOS 14, it operates normally. This suggests that while simply displaying a ViewController works fine on iOS 14, rendering a UIView separately leads to issues.
-
Below are the startup logs for iOS 14 and later OS versions:
Normal operation log for models after iOS 14:
3. Thread Performance Checker: Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions
* PID: 3708, TID: 1620977
* Backtrace
* =================================================================
* 3 DeepAR 0x00000001064f4088 _ZN2bx9Semaphore4waitEi + 64
* 4 DeepAR 0x0000000106365a64 _ZN4bgfx7Context11renderFrameEi + 292
* 5 DeepAR 0x000000010636582c _ZN4bgfx11renderFrameEi + 52
* 6 DeepAR 0x000000010662a5e0 _ZThn8_N2ar10Controller6renderEv + 24
* 7 QuartzCore 0x00000001a08c12cc 32B5A8E6-AC13-3BE9-A6B4-AF6309173F95 + 193228
* 8 QuartzCore 0x00000001a08c44b4 32B5A8E6-AC13-3BE9-A6B4-AF6309173F95 + 206004
* 9 QuartzCore 0x00000001a08c3fc0 32B5A8E6-AC13-3BE9-A6B4-AF6309173F95 + 204736
* WebContent process (0x1090180c0) took 1.8943 seconds to launch
* 10 QuartzCore 0x00000001a0943290 32B5A8E6-AC13-3BE9-A6B4-AF6309173F95 + 725648
* 11 UIKitCore 0x00000001a155b7e4 99AD2A31-9360-369F-9C0B-A7A0AF33E2E7 + 698340
* 12 UIKitCore 0x00000001a155aed4 99AD2A31-9360-369F-9C0B-A7A0AF33E2E7 + 696020
* 13 UIKitCore 0x00000001a155af90 99AD2A31-9360-369F-9C0B-A7A0AF33E2E7 + 696208
* 14 CoreFoundation 0x000000019f2bd12c BE405D8A-5464-37A3-A17E-1068DB404B23 + 225580
* 15 CoreFoundation 0x000000019f2bc3a8 BE405D8A-5464-37A3-A17E-1068DB404B23 + 222120
* 16 CoreFoundation 0x000000019f2bab5c BE405D8A-5464-37A3-A17E-1068DB404B23 + 215900
* 17 CoreFoundation 0x000000019f2b9898 BE405D8A-5464-37A3-A17E-1068DB404B23 + 211096
* 18 CoreFoundation 0x000000019f2b9478 CFRunLoopRunSpecific + 608
* 19 GraphicsServices 0x00000001e28124f8 GSEventRunModal + 164
* 20 UIKitCore 0x00000001a16dd62c 99AD2A31-9360-369F-9C0B-A7A0AF33E2E7 + 2278956
* 21 UIKitCore 0x00000001a16dcc68 UIApplicationMain + 340
* 22 SwiftUI 0x00000001a40ed4b8 8152BA98-1FB7-3A7F-8059-BD1AD9B7B7B2 + 18244792
* 23 SwiftUI 0x00000001a40ed2fc 8152BA98-1FB7-3A7F-8059-BD1AD9B7B7B2 + 18244348
* 24 SwiftUI 0x00000001a3d5de90 8152BA98-1FB7-3A7F-8059-BD1AD9B7B7B2 + 14511760
* 25 DeepAROS14Test 0x0000000104da671c $s14DeepAROS14Test0abC3AppV5$mainyyFZ + 40
* 26 DeepAROS14Test 0x0000000104da67cc main + 12
* 27 dyld 0x00000001c1fdedcc 630C2209-DFD7-3C72-B0A9-E856C560F123 + 24012
Abnormal log for iOS 14 model:
* 2024-02-17 17:18:05.571598+0900 DeepAROS14Test[703:64610] WF: === Starting WebFilter logging for process DeepAROS14Test
* 2024-02-17 17:18:05.571730+0900 DeepAROS14Test[703:64610] WF: _userSettingsForUser mobile: {
* filterBlacklist = (
* );
* filterWhitelist = (
* );
* restrictWeb = 1;
* useContentFilter = 0;
* useContentFilterOverrides = 0;
* whitelistEnabled = 0;
* }
* 2024-02-17 17:18:05.571819+0900 DeepAROS14Test[703:64610] WF: _WebFilterIsActive returning: NO
* 2024-02-17 17:18:05.728703+0900 DeepAROS14Test[703:64610] Metal API Validation Enabled
* 2024-02-17 17:18:06.022080+0900 DeepAROS14Test[703:64610] fopen failed for data file: errno = 2 (No such file or directory)
* 2024-02-17 17:18:06.022124+0900 DeepAROS14Test[703:64610] Errors found! Invalidating cache...
* 2024-02-17 17:18:09.068111+0900 DeepAROS14Test[703:64610] fopen failed for data file: errno = 2 (No such file or directory)
* 2024-02-17 17:18:09.068360+0900 DeepAROS14Test[703:64610] Errors found! Invalidating cache...
* 2024-02-17 17:18:09.075628+0900 DeepAROS14Test[703:64610] fopen failed for data file: errno = 2 (No such file or directory)
* 2024-02-17 17:18:09.075832+0900 DeepAROS14Test[703:64610] Errors found! Invalidating cache...
- I will upload the project where these logs were produced and kindly ask you to execute it to verify the issue. If this is not resolved promptly, we may have to discontinue the use of the DeepAR library and look for alternatives (which we really do not want to do). Of course, I believe this to be an OS issue, but without any error logs from deepAR.createARView’s internal operations, it is impossible to speculate.
Below is the GitHub URL for the project created for testing.