我在 WatchKit
扩展中收到以下警告和错误:
Warning: no rule to process file 'App-Bridging-Header.h' of type sourcecode.c.h for architecture x86_64
/Users/janusz/Desktop/Repositories/RunnerAppWatch/Source/WormholeMessanger.swift:12:20: Use of unresolved identifier 'MMWormhole'
它也列在编译源部分。
当我删除 WatchKit
扩展时,一切正常,但是一旦我将它添加回去,我又会遇到错误。
所以问题是:如何使桥接头与 WatchKit
扩展一起工作?
谢谢!
最佳答案
桥接 header 不得包含在 Compiled Sources
部分中。通常,不应将 header 添加到 Compiled Sources
。所以,删除它,它应该可以工作。
关于ios - 在 WatchKitExtension 中混合 swift 和 objective-c,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28642268/