Posts

Post not yet marked as solved
0 Replies
465 Views
Hello,  I'm encounter crashes when integrating a company internal package through SPM only when I compile my app with the release scheme. My solution so far was to directly integrate sources into my project to solve theses crashes. For the context, the library use Metal and AVPlayer to manipulate AVPlayerItem and render video. Crashes frequently happened on those following lines: self.playerItem = AVPlayerItem(asset: asset) self.videoOutput = AVPlayerItemVideoOutput(outputSettings: [                         kCVPixelBufferPixelFormatTypeKey as String: NSNumber(value:kCVPixelFormatType_32BGRA),                         kCVPixelBufferMetalCompatibilityKey as String: NSNumber(value: true)]) self.playerItem?.add(self.videoOutput!) The videoOutput variable is becoming nil resulting a crash. I have tried to disable compilation optimization of Apple Clang and Swift Compiler in the app and in the package (I don't know if compilation parameters of a package have any influence at all). I tried this because theses compilation parameters are different in release mode, but crashes still happens. Another useful information is that the app integrate an xcframework that is used by the package, maybe this could have an impact. I am looking for information that will help me understand why direct source integration is different from integration with SPM. I'm also trying to understand what I could change in compilation parameters that could fix those crashes that happen only in release mode (with SPM). 🙏 thanks for reading this, I hope you can share some leads or informations about this strange issue.
Posted Last updated
.