Texture icon indicating copy to clipboard operation
Texture copied to clipboard

ASVideoNode cannot be found

Open bianzhifeng opened this issue 4 years ago • 3 comments

// If you're looking for help, please consider joining our slack channel: // http://asyncdisplaykit.org/slack (we'll be updating the name to Texture soon)

// The more information you include, the faster we can help you out! // Please include: a sample project or screenshots, code snippets // Texture version, and/or backtraces for any crashes (> bt all). // Please delete these lines before posting. Thanks!

My business component depends on the texture, and ASVideoNode is used in it. A single business component can run perfectly, but when I integrate my business component into my project through cocoapods, it will prompt that ASVideoNode cannot be found. Don't know what happened to cause this situation. Thank you very much

image

bianzhifeng avatar Apr 20 '21 13:04 bianzhifeng

did you add AVFoundation?

Note: If you use ASVideoNode in your application, you must link AVFoundation since it uses AVPlayerLayer and other AVFoundation classes under the hood.

ccomsi avatar Apr 21 '21 01:04 ccomsi

image yes, I have configured AVFoundation in the podspec file, and I have no problem with other nodes using texture, only ASVideoNode prompts that it cannot be found

bianzhifeng avatar Apr 21 '21 01:04 bianzhifeng

@bianzhifeng I managed to fix it by defining AS_USE_VIDEO in podspec file by adding this line

s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AS_USE_VIDEO=1' }

max-prokopenko avatar Aug 02 '21 12:08 max-prokopenko