我正在尝试将 BUCK 与Realm pod一起使用。
我已将我的 buck 文件设置为:
apple_pod_lib(
name = "Realm",
visibility = ["PUBLIC"],
exported_headers = glob([
"Realm/**/*.h",
"Realm/**/*.hpp",
]),
srcs = glob([
"Realm/**/.{m,mm,cpp}",
]),
)
apple_pod_lib(
name = "RealmSwift",
visibility = ["PUBLIC"],
swift_version = "4",
deps = [
"//Pods:Realm"
],
srcs = glob([
"RealmSwift/**/*.swift",
]),
)
使用Airbnb的 pod 宏。
但是我无法构建我的项目,因为这失败了
In target '//Pods:Realm', 'Realm/history.hpp' maps to the following header files:
- /BuckSample/Pods/Realm/include/core/realm/sync/history.hpp
- /BuckSample/Pods/Realm/include/core/realm/history.hpp
Please rename one of them or export one of them to a different path.
我还尝试手动指定要包含的文件和标头,从这些 repos 中查看 PodSpec,但我无法让它工作,因为我当时缺少一些要在 Xcode 中编译的项目文件。