我想创建自己的框架来使用 RealityKit 功能。框架项目正确编译,没有错误,但是当我将其导入到新项目并尝试编译时,出现错误
“找不到模块‘RealityKit’”
我可以以某种方式将 RealityKit 添加到我的框架中,以便将其包含在内,还是应该在某处更改路径?
当我将 RealityKit 直接导入到新项目时,它可以工作,但是当我尝试导入我的框架时,我收到此错误。
我此时在 MyFramework-Swift.h 中收到错误
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import ARKit;
@import CoreGraphics;
@import Foundation;
@import QuartzCore;
@import RealityKit; // Module 'RealityKit' not found
@import UIKit;
#endif
Run Code Online (Sandbox Code Playgroud)