[英]Swift Package Manager - Bridging Header, File Not Found
I want to migrate my CocoaPods to Swift Package Manager.我想将我的 CocoaPods 迁移到 Swift Package 管理器。
I'm getting the following error if I add Objective c Framework using SwiftPM如果我使用 SwiftPM 添加 Objective c 框架,我会收到以下错误
'RSKImageCropper/RSKImageCropper.h' file not found
If I install the framework using pods, everything runs fine.如果我使用 pod 安装框架,一切都运行良好。
pod 'RSKImageCropper', '~> 3.0.2'
What should i do to solve this error?我应该怎么做才能解决这个错误?
Package.swift of RSKImageCropper RSKImageCropper 的 Package.swift
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "RSKImageCropper",
platforms: [.iOS(.v9)],
products: [
.library(
name: "RSKImageCropper",
targets: ["RSKImageCropper"]),
],
targets: [
.target(
name: "RSKImageCropper",
path: "RSKImageCropper",
resources: [
.copy("RSKImageCropperStrings.bundle")
],
publicHeadersPath: "include"
),
]
)
Only headers in include folder is public and visible (publicHeadersPath key).只有包含文件夹中的标题是公开的和可见的(publicHeadersPath 键)。 Fixed by changing通过更改修复
#import <RSKImageCropper/RSKImageCropper.h>
to至
#import <RSKImageCropper/RSKImageCropViewController.h>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.