I'm trying to distribute an XCFramework for some internal iOS apps using Swift Package Manager. This is a third-party library that constitutes:
- The one XCFramework
- A Resources.bundle file
The SPM File compiles correctly and is embedded into my app, but when I try to use this framework it fails to load resources from this bundle.
Package.swift
import PackageDescription
let package = Package(
name: "InternalZoom",
platforms: [
.iOS(.v12),
],
products: [
.library(
name: "InternalZoom",
targets: ["MobileRTC"]),
],
targets: [
.binaryTarget(name: "MobileRTC",
path: "MobileRTC.xcframework.zip"),
]
)
The file structure is:
- iOS Zoom
- README
- Package
- Sources
- MobileRTCResources
- Bunch of files...
- InternalZoom InternalZoom.swift MobileRTC.xcframework.zip
- MobileRTCResources
I though these resources would be bundled automatically with the framework, but it looks like they don't and as such, when the framework tries to access them, it crashes.