2017-03-19 6 views
0

저는 React Native와 React Native Calendar Reminders 네이티브 모듈을 사용하는 iOS 프로젝트를 보유하고 있습니다. Xcode에서 시뮬레이터를 빌드 할 때 모든 것이 잘 작동합니다.장치에 빌드 할 때 'EKEvent'의 상위 클래스로 'EKCalendarItem'클래스를 사용하려고 시도했습니다.

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 : 그것을 변경하는 경우에 "일반 아이폰 OS 장치"나는 다음과 같은 오류가 구축

#import <EventKit/EventKit.h> 

그리고 대상의 빌드 단계에서이 EventKit.framework 라이브러리와 링크 것을 확인 .

엑스 코드 버전 : 8.2.1 (8C1002)

답변

0

나는이 문제를 스스로 해결. 나는 어떻게하는지 모르지만 /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의 이진 읽기이기 때문입니다.