Lottie-react-native 不基于 iOS 12 RN 0.60.4

Lottie-react-native not building on iOS 12 RN 0.60.4

尝试将 Lottie 添加到我的本机反应应用程序中,但它不断抛出错误。 我遵循的步骤基于原始 github 和我在互联网上找到的帖子:

(顺便说一句,我不使用 Cocoapods)

到目前为止似乎没有任何效果。 版本:

"react": "16.8.6",
"react-native": "^0.60.4",
"lottie-ios": "^3.0.3",
"lottie-react-native": "^3.1.0",

构建失败时抛出的错误是:

Showing Recent Messages

Build target LottieLibraryIOS of project Lottie with configuration Debug

<unknown>:0: error: filename "TextCompositionLayer.swift" used twice: '/Users/marian-mac/Documents/dev/MyApp/node_modules/lottie-ios/lottie-swift/src/Private/LayerContainers/CompLayers/TextCompositionLayer.swift' and '/Users/marian-mac/Documents/dev/MyApp/node_modules/lottie-ios/lottie-swift/src/Private/LayerContainers/CompLayers/TextCompositionLayer.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

对正在发生的事情有什么想法吗?

问题出在您的手动链接上。新的自动链接过程正在使用 Cocoapods。如果可能,请使用 react-native init 创建新项目并将项目导入新模板或使用 Upgrade Helper 升级现有项目模板。