无法编译React Native Share Extension iOS 12.5



升级到iOS 12.5时,我收到了编译错误:"应用程序扩展及其链接到的任何库必须在APPLICATION_EXTENSION_API_ONLY构建设置设置为YES的情况下构建">

然而,我在我的Podfile:中明确地将其设置为false

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
end
end
end

因为这是解决另一个问题所必需的。

如果我设置config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'YES',那么我会遇到更多问题。

有人知道如何解决这个问题吗?

您不需要更改"Podfile"文件,只需设置;仅要求应用扩展-安全API";在"建筑设置"中设置为"是",对我有效。这个地址也许能帮你更多。https://github.com/facebook/react-native/issues/28405#issuecomment-779382959

最新更新