TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.02k stars 1.29k forks source link

ASVideoNode cannot be found #1984

Open bianzhifeng opened 3 years ago

bianzhifeng commented 3 years ago

// 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

ccomsi commented 3 years ago

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.

bianzhifeng commented 3 years ago

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

max-prokopenko commented 3 years ago

@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' }