2017-03-19 1 views
0

私はReact NativeとReact Native Calendar Remindersネイティブモジュールを使用するiOSプロジェクトを持っています。 Xcodeでシミュレータをビルドすると、すべて正常に動作します。 「一般的なiOSデバイス」に構築するためにそれを変更する場合、私は次のエラーを取得する:デバイスへのビルド時に、転送クラス 'EKCalendarItem'を 'EKEvent'のスーパークラスとして使用しようとしています

#import <EventKit/EventKit.h> 

そして私は、ターゲットのビルドフェーズで、それはEventKit.frameworkライブラリとリンクしていることが確認さ:

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は、 。

Xcodeのバージョン: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からのバイナリ読み出しであるためです。

関連する問題