Skip to content

Commit

Permalink
Add support for RN headers in both namespaces (ocetnik#248)
Browse files Browse the repository at this point in the history
Support RN headers both in the React namespace,
where they are in RN version 0.40+,
and no namespace, for older versions of RN

Co-authored-by: Dusan Punosevac <dusan.punosevac@koye.app>
  • Loading branch information
dpunosevac and Dusan Punosevac authored Sep 1, 2020
1 parent 87b4fa4 commit 17f1aba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ios/RNBackgroundTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
//

#import <React/RCTBridgeModule.h>
// Support React Native headers both in the React namespace, where they are in RN version 0.40+,
// and no namespace, for older versions of React Native
#if __has_include(<React/RCTEventEmitter.h>)
#import <React/RCTEventEmitter.h>
#else
#import "RCTEventEmitter.h"
#endif


@interface RNBackgroundTimer : RCTEventEmitter <RCTBridgeModule>

Expand Down

0 comments on commit 17f1aba

Please sign in to comment.