Question about YouTube

Can someone advise me some materials about YouTube and Xcode simultaneously about both of them?

Can you elaborate more what you’re wanting to know?

I have seen some videos about YouTube in YouTube. But this is not sufficient. That’s why I need more materials, and especially more books about this, in which I can see examples of codes in Xcode, some definitions, explanations of some codes and hints, related to YouTube. It would be better if in these books are some exercises or questions after each paragraph or chapter for better comprehension of the materials. If they are not such good, nevertheless, send me please.
Also I don’t know whether a video can be downloaded via URL to watch it offline?

You cannot download YouTube videos to watch offline without a YouTube subscription.

I still don’t fully understand what you’re looking for?
What are you wanting to learn?

I know only one app which can download a video from YouTube.
I want to make the same thing but better for downloading without many instructions for users.
Can you help with some relevant literature?

This is illegal and violating YouTube’s terms of service.

Do not try to do this.