diff --git a/ios/RCTToast/Toast.m b/ios/RCTToast/Toast.m index a035186..06aae1b 100755 --- a/ios/RCTToast/Toast.m +++ b/ios/RCTToast/Toast.m @@ -1,8 +1,13 @@ #import -#import -#import #import "Toast+UIView.h" +#if __has_include() +#import +#import +#else // back compatibility for RN version < 0.40 +#import "RCTLog.h" +#import "RCTBridgeModule.h" +#endif @interface Toast : NSObject @end @@ -11,7 +16,6 @@ @implementation Toast RCT_EXPORT_MODULE(Toast) - RCT_EXPORT_METHOD(show:(NSDictionary *)options) { NSString *message = [options objectForKey:@"message"]; NSString *duration = [options objectForKey:@"duration"];