I found that the project would fail to build (error:image not loaded) if the normal third-party framework does't set as "embedded" in the project settings. However, this time, I rebuilt this third-party framework as XCFramework, and everything goes fine with "Do Not Embed" settings for XCFramework.
Should I embed XCFramework or not?
Xcode Libraries section screenshot I guess "embed" means "copy into app bundle". I also guess the "sign" bit really means "re-sign" using your credentials. – trojanfoe. Aug 28, 2019 at 7:40.
What is XCFramework? Apple defines XCFrameworks as a distributable binary package created by Xcode that contains variants of a framework or library so that it can be used on multiple platforms (iOS, macOS, tvOS, and watchOS), including Simulator builds.
If you're building for iOS, tvOS, or watchOS: On your application targets' “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk.
Select "Embed & Sign"
to avoid image not found
crash when running apps on physical device which contains any third-party XCFrameworks.
This option can be selected from linked xcframework under Targets -> General -> Frameworks, Libraries and Embedded Content
.
But the application with xcframework will work fine in simulator with any of options available from Do Not Embed
, Embed & Sign
or Embed Without Signing
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With