我正在尝试将appcenter sdk添加到react-native tvos应用程序中,但添加时出现AppCenterReactNative.h文件未找到错误
#import <AppCenterReactNative.h>
#import <AppCenterReactNativeAnalytics.h>
#import <AppCenterReactNativeCrashes.h>
当然我已经安装了 pod
在尝试将 CodePush 和 AppCenter 集成到我的 React Native 应用程序中时,我遇到了这个确切的问题。
我按照说明设置AppCenter,包括为AppCenter添加yarn/npm包,并运行
pod install
,但收到此错误,无法找到AppCenterReactNative.h。
我找到了这个页面,其中de https://github.com/microsoft/appcenter-sdk-react-native/issues/713#issuecomment-534118574
我什至在
/Pods/Development Pods
文件夹中验证了其中有 appcenter-analytics
、appcenter-core
和 appcenter-crashes
。在 appcenter-core
中,AppCenterReactNative.h
就在那里。
但是 Xcode 仍然没有找到它。
Xcode 将因此无法构建或清理。为了解决这个问题,我去清除了我的派生数据。在 Xcode 的菜单上,转到
Xcode -> Settings -> Derived Data (Click the small arrow with the path)
,然后我删除了 Derived Data 中的所有文件夹,关闭 Xcode,重新打开它,并构建了项目,它成功了!
希望这有帮助。