dyld not found AVAssetDownladTask

I figured it out. I had to weak link AVFoundation. Found it on apple's site.

https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

Weak Linking to Entire Frameworks

When you reference symbols in another framework, most of those symbols are linked strongly to your code. In order to create a weak link to a symbol, the framework containing the symbol must explicitly add the weak_import attribute to it (see Marking Symbols for Weak Linking). However, if you do not maintain a framework and need to link its symbols weakly, you can explicitly tell the compiler to mark all symbols as weakly linked. To do this, you must open your project in Xcode and modify the way your targets link to the framework as follows:

Select the target you want to modify and reveal its build phases. Expand the Link Binary With Libraries build phase to view the frameworks currently linked by the target. If the framework you want to weakly link to is listed in the Link Binary With Libraries build phase, select it, and choose Edit > Delete to remove it. Now you can tell the linker to use weak linking for that framework.

Select the target, open its Info window, and click Build. To the Other Linker Flags build setting, add the following command-line option specification, where is the name of the framework you want to weakly link to: -weak_framework Build your product.


I had same issue and I weak linked the AVFoundation framework Below is the step

add -weak_framework AVfoundation in "other linker flags" in Build settings