首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“‘React/RCTDefines.h”文件未找到。在反应本机推送通知集成

“‘React/RCTDefines.h”文件未找到。在反应本机推送通知集成
EN

Stack Overflow用户
提问于 2019-02-07 07:23:52
回答 1查看 1.9K关注 0票数 1

我正在集成推送通知在我的应用程序。在执行了2次指令(来自这里)之后,我又陷入了错误。

Podfile

代码语言:javascript
复制
# 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

当我构建 .xcodeproj

  • 错误是

  • 和当我使用.xcworkspace进行构建时

有人能帮忙吗?任何对视频/博客的引用也将是有帮助的。

EN

回答 1

Stack Overflow用户

发布于 2019-02-07 10:42:01

我认为您应该将搜索路径设置为recursive。单击Xcode中的项目并按此操作,请:

build > header搜索路径>双击并单击+签名,然后向其添加以下路径:

代码语言:javascript
复制
$(SRCROOT)/../../../ios/Pods

还请记住,您必须使推送通知切换到Xcode中的功能。

最后关闭终端,清除(command+k)并重新构建它(command+R)。以下是一些消息来源:

https://medium.com/yale-sandbox/react-native-push-notifications-with-https://medium.com/yale-sandbox/react-native-push-notifications-with-firebase-cloud-functions-74b832d45386

https://ilirhushi.me/reactnative-push-notifications-firebase-ios/

希望我能帮上忙。:)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54568222

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档