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?
UPDATE
- I tried Eugene Dudnyk Solutions but I still received the same error
- 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
I tried most of the solutions mentioned in this post with no avail.
iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta
2
Answers
Add to
LD_RUNPATH_SEARCH_PATHS
build setting for Mac Catalyst the following path:Alternatively, if you use configuration file for your target, you can add there this:
I had the same issue, and I found out I accidentally deleted the Hardened Runtime capability for macOS. It must be enabled for macOS. Read more here: About Hardened Runtime