Ios 试图使用forward类';EKCalendarItem';作为';EKEvent';当构建到设备时

Ios 试图使用forward类';EKCalendarItem';作为';EKEvent';当构建到设备时,ios,xcode,react-native,eventkit,Ios,Xcode,React Native,Eventkit,我有一个iOS项目,它使用React Native和Native模块。在Xcode和构建到模拟器时,一切正常。将其更改为“通用iOS设备”时,出现以下错误: While building module 'EventKit' imported from .../RNCalendarReminders.m:3: In file included from <module-includes>:1: In file included from /Applications/Xcode.app/

我有一个iOS项目,它使用React Native和Native模块。在Xcode和构建到模拟器时,一切正常。将其更改为“通用iOS设备”时,出现以下错误:

While building module 'EventKit' imported from .../RNCalendarReminders.m:3:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/System/Library/Frameworks/EventKit.framework/Headers/EventKit.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/System/Library/Frameworks/EventKit.framework/Headers/EKEvent.h:37:22: error: attempting to use the forward class 'EKCalendarItem' as superclass of 'EKEvent'
@interface EKEvent : EKCalendarItem {
~~~~~~~~~~~~~~~~~~   ^
我验证了在目标的构建阶段,它与
EventKit.framework
库链接


Xcode版本:8.2.1(8C1002)

我自己解决了这个问题。我不知道怎么做,但
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/System/Library/Frameworks/EventKit.framework/Headers/EKCalendarItem.h
是一个空文件。我可能在某个时候在Xcode中查看时意外地清除了它

我重新下载了Xcode,它解决了这个问题

在模拟器上构建时,这种方法工作正常的原因是,在这种情况下,
EventKit.framework
是从
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/EventKit.framework
读取的二进制文件

#import <EventKit/EventKit.h>