Missing Library Error in Mac Catalyst when distributed through Testflight

The iOS version of the app is functioning correctly on TestFlight, and there are no issues when building the Mac Catalyst version of the app from Xcode. However, when distributing the app to TestFlight for Mac Catalyst, the FFmpegkit library fails to load, resulting in a crash. The crash report indicates that the library is missing and cannot be located in the designated file path.

Specifically, the crash report states that the library could not be loaded from "@rpath/ffmpegkit.framework/ffmpegkit". Despite extensive efforts, I have been unable to resolve this issue.

This is error message in the crash report.

Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: @rpath/ffmpegkit.framework/ffmpegkit Referenced from: <9162F8B0-7112-310B-8EDA-59766087927F> /Applications/MyApp.app/Contents/MacOS/MyApp Reason: tried: '/System/Library/Frameworks/ffmpegkit.framework/ffmpegkit' (no such file, not in dyld cache), (security policy does not allow @ path expansion) (terminated at launch; ignore backtrace)

Are there any alternative solutions to resolve this problem?

This is all the things I have already tried:

I tried most of the solutions mentioned in the post below. https://stackoverflow.com/questions/24333981/ios-app-with-framework-crashed-on-device-dyld-library-not-loaded-xcode-6-beta

  • I checked the package content found in Testflight and the paths are correctly matching the following /System/Library/Frameworks/ffmpegkit.framework/ffmpegkit

  • I ran the app scheme as release within Xcode and it build and ran fine with no issues

  • I manually loaded the signing certificates for mac catalyst and still getting the error

  • Deleted all derived data

  • Deleted and reinstalled Xcode and also tried previous Xcode versions.

  • Deleted the project completely

Replies

What is your rpath set to? If you do this:

% otool -l &#x2F;Applications&#x2F;MyApp.app&#x2F;Contents&#x2F;MacOS&#x2F;MyApp | grep -B 1 -A 2 LC_RPATH

what do you see?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I get the following rpath when entering the command above

Load command 72 cmd LC_RPATH cmdsize 40 path @loader_path/../Frameworks (offset 12)

Load command 73 cmd LC_RPATH cmdsize 40 path @executable_path/Frameworks (offset 12)

Load command 72 cmd LC_RPATH cmdsize 40 path @loader_path/../Frameworks (offset 12)

Load command 73 cmd LC_RPATH cmdsize 40 path @executable_path/Frameworks (offset 12)

Thanks for your help Quinn

For those following along at home, I’ll be helping sterrier in a different context.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"