It cost me a lot of time to complete this. The Ios 17 and Xcode 15 has the vaious amount issues than I expected 😔.
I will list them in the end for reference.
I had mentioned that we had to write native code to build home screen widget,
and what i'm going to do is use davinci to obtain a screenshot in offStage mode. Then render it on the homescreen widget, which is the widget we built in native code.
It works great on Ios simulator, but it encountered an issue on my physical device. I've submit issue on davinci's repo, I think we'll find out soon.
(Editing)
ask you to adopt the BG API (IOS 17)
Xcode build error (xcode 15 ios 17)
Xcode 15 Sep 2023 Solution