我正在将推送通知集成到我的应用中。再次按照指示执行两次(从here起)后,我陷入了错误。
Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'placementScript' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for placementScript
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
target 'placementScript-tvOSTests' do
#inherit! :search_paths
# Pods for testing
pod 'react-native-fcm', :path => '../node_modules/react-native-fcm'
pod 'RNReactNativeDocViewer', :path => '../node_modules/react-native-doc-viewer'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'RNViewShot', :path => '../node_modules/react-native-view-shot'
end
target 'placementScriptTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'placementScript-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for placementScript-tvOS
#target 'placementScript-tvOSTests' do
# inherit! :search_paths
# Pods for testing
#end
end
有人可以帮忙吗?对视频/博客的任何引用也将有所帮助。
答案 0 :(得分:1)
我认为您应该将搜索路径设置为recursive
。单击您在Xcode中的项目,然后执行以下操作:
构建设置>标头搜索路径>双击它,然后单击+号, 然后向其添加以下路径:
$(SRCROOT)/../../../ios/Pods
还请记住,您必须在Xcode的功能中启用推送通知。
最后关闭终端,清除(command + k)并重建(command + R)。 以下是一些来源:
https://ilirhushi.me/reactnative-push-notifications-firebase-ios/
希望我能帮上忙。 :)