我有一个使用React Native和React Native Calendar Reminders本机模块的iOS项目。在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 {
~~~~~~~~~~~~~~~~~~ ^
RNCalendarReminders.m
第3行是:
#import <EventKit/EventKit.h>
我在Target的Build阶段验证了它与EventKit.framework
库的链接。
Xcode版本:8.2.1(8C1002)
答案 0 :(得分:0)
我自己解决了这个问题。我不确定retVal = Application.VLookup(CLng(lookupVal), LookupRange, 2, False)
是一个空文件。在某些时候在Xcode中查看时,我可能会意外清除它。
我重新下载了Xcode,它解决了这个问题。
在模拟器上构建时工作正常的原因是因为在这种情况下/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/System/Library/Frameworks/EventKit.framework/Headers/EKCalendarItem.h
是从EventKit.framework
读取的二进制文件。