├── .flowconfig ├── .gitignore ├── .npmignore ├── GlobalEventEmitter.ios.js ├── LICENSE ├── README.md ├── RNTGlobalEventEmitter.h ├── RNTGlobalEventEmitter.m ├── Screenshot.png ├── iOS ├── RNTGlobalEventEmitter.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── RNTGlobalEventEmitter.xcscheme ├── RNTGlobalEventEmitter │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── main.jsbundle │ └── main.m └── RNTGlobalEventEmitterTests │ ├── Info.plist │ └── RNTGlobalEventEmitterTests.m ├── index.ios.js └── package.json /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*.web.js 5 | .*/*.android.js 6 | 7 | # Some modules have their own node_modules with overlap 8 | .*/node_modules/node-haste/.* 9 | 10 | # Ignore react-tools where there are overlaps, but don't ignore anything that 11 | # react-native relies on 12 | .*/node_modules/react-tools/src/React.js 13 | .*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js 14 | .*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js 15 | .*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js 16 | 17 | 18 | # Ignore commoner tests 19 | .*/node_modules/commoner/test/.* 20 | 21 | # See https://github.com/facebook/flow/issues/442 22 | .*/react-tools/node_modules/commoner/lib/reader.js 23 | 24 | # Ignore jest 25 | .*/react-native/node_modules/jest-cli/.* 26 | 27 | [include] 28 | 29 | [libs] 30 | node_modules/react-native/Libraries/react-native/react-native-interface.js 31 | 32 | [options] 33 | module.system=haste 34 | 35 | munge_underscores=true 36 | 37 | suppress_type=$FlowIssue 38 | suppress_type=$FlowFixMe 39 | suppress_type=$FixMe 40 | 41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 42 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ 43 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 44 | 45 | [version] 46 | 0.14.0 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # node.js 26 | # 27 | node_modules/ 28 | npm-debug.log 29 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # node.js 25 | # 26 | node_modules/ 27 | npm-debug.log 28 | -------------------------------------------------------------------------------- /GlobalEventEmitter.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var React = require('react-native'); 4 | var { 5 | NativeModules, 6 | DeviceEventEmitter, 7 | } = React; 8 | 9 | var RNTGlobalEventEmitter = NativeModules.RNTGlobalEventEmitter; 10 | 11 | var listeners = {}; 12 | DeviceEventEmitter.addListener('onNotification', (data) => { 13 | var notifName = data.name; 14 | var notifData = data.userInfo; 15 | 16 | for (var i=0; i { 17 | console.log('UIApplicationDidEnterBackgroundNotification'); 18 | }); 19 | 20 | // event available on NSNotificationCenter for native code 21 | var eventName = "UserDidLoginFromJS" 22 | GlobalEventEmitter.emit(eventName, {name: 'John'}); 23 | 24 | ``` 25 | 26 | ## Properties 27 | 28 | * `addListener`: Add a listener for an `eventName` and pass a `callback` function. 29 | * `emit`: Emit events to native/JS globally. 30 | * `removeListener`: Remove a listener by passing the `eventName` and the reference to the original `callback` function. 31 | * `removeAllListeners`: Stop listening to all events of a particular `eventName`. 32 | 33 | ## Installation 34 | 35 | Use your preferred method of including the library in your app. 36 | 37 | ## Example 38 | Try the included example: 39 | 40 | ```sh 41 | git clone git@github.com:paramaggarwal/react-native-global-event-emitter.git 42 | npm install 43 | open iOS/RNTGlobalEventEmitter.xcodeproj 44 | ``` 45 | 46 | Then `Cmd+R` to start the React Packager, build and run the project in the simulator. 47 | 48 | ## Author 49 | Param Aggarwal (paramaggarwal@gmail.com) 50 | 51 | ## License 52 | MIT License -------------------------------------------------------------------------------- /RNTGlobalEventEmitter.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNTGlobalEventEmitter.h 3 | // RNTGlobalEventEmitter 4 | // 5 | // Created by Param Aggarwal on 27/08/15. 6 | // Copyright (c) 2015 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RCTBridge.h" 11 | 12 | @interface RNTGlobalEventEmitter : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /RNTGlobalEventEmitter.m: -------------------------------------------------------------------------------- 1 | // 2 | // RNTGlobalEventEmitter.m 3 | // RNTGlobalEventEmitter 4 | // 5 | // Created by Param Aggarwal on 27/08/15. 6 | // Copyright (c) 2015 Facebook. All rights reserved. 7 | // 8 | 9 | #import "RNTGlobalEventEmitter.h" 10 | #import "RCTEventDispatcher.h" 11 | 12 | @interface RNTGlobalEventEmitter () 13 | 14 | - (void)bridgeNotification:(NSNotification *)notification; 15 | 16 | @end 17 | 18 | @implementation RNTGlobalEventEmitter 19 | 20 | @synthesize bridge = _bridge; 21 | 22 | RCT_EXPORT_MODULE() 23 | 24 | RCT_EXPORT_METHOD(addObserver:(NSString *)notificationName) 25 | { 26 | [[NSNotificationCenter defaultCenter] addObserver:self 27 | selector:@selector(bridgeNotification:) 28 | name:notificationName 29 | object:nil]; 30 | } 31 | 32 | RCT_EXPORT_METHOD(postNotification:(NSString *)notificationName userInfo:(NSDictionary *)userInfo) 33 | { 34 | [[NSNotificationCenter defaultCenter] postNotificationName:notificationName 35 | object:nil 36 | userInfo:userInfo]; 37 | } 38 | 39 | RCT_EXPORT_METHOD(removeObserver:(NSString *)notificationName) 40 | { 41 | [[NSNotificationCenter defaultCenter] removeObserver:self 42 | name:notificationName 43 | object:nil]; 44 | } 45 | 46 | - (void)bridgeNotification:(NSNotification *)notification 47 | { 48 | [self.bridge.eventDispatcher sendDeviceEventWithName:@"onNotification" 49 | body:@{ 50 | @"name": notification.name, 51 | @"userInfo": notification.userInfo ?: [NSNull null], 52 | }]; 53 | 54 | } 55 | 56 | - (NSDictionary *)constantsToExport 57 | { 58 | return @{ 59 | @"UIApplicationNotifications": @{ 60 | @"UIApplicationDidEnterBackgroundNotification": UIApplicationDidEnterBackgroundNotification, 61 | @"UIApplicationWillEnterForegroundNotification": UIApplicationWillEnterForegroundNotification, 62 | @"UIApplicationDidFinishLaunchingNotification": UIApplicationDidFinishLaunchingNotification, 63 | @"UIApplicationDidBecomeActiveNotification": UIApplicationDidBecomeActiveNotification, 64 | @"UIApplicationWillResignActiveNotification": UIApplicationWillResignActiveNotification, 65 | @"UIApplicationDidReceiveMemoryWarningNotification": UIApplicationDidReceiveMemoryWarningNotification, 66 | @"UIApplicationWillTerminateNotification": UIApplicationWillTerminateNotification, 67 | @"UIApplicationSignificantTimeChangeNotification": UIApplicationSignificantTimeChangeNotification, 68 | @"UIApplicationWillChangeStatusBarOrientationNotification": UIApplicationWillChangeStatusBarOrientationNotification, 69 | @"UIApplicationDidChangeStatusBarOrientationNotification": UIApplicationDidChangeStatusBarOrientationNotification, 70 | @"UIApplicationStatusBarOrientationUserInfoKey": UIApplicationStatusBarOrientationUserInfoKey, 71 | @"UIApplicationWillChangeStatusBarFrameNotification": UIApplicationWillChangeStatusBarFrameNotification, 72 | @"UIApplicationDidChangeStatusBarFrameNotification": UIApplicationDidChangeStatusBarFrameNotification, 73 | }, 74 | @"UIWindowNotifications": @{ 75 | @"UIWindowDidBecomeVisibleNotification": UIWindowDidBecomeVisibleNotification, 76 | @"UIWindowDidBecomeHiddenNotification": UIWindowDidBecomeHiddenNotification, 77 | @"UIWindowDidBecomeKeyNotification": UIWindowDidBecomeKeyNotification, 78 | @"UIWindowDidResignKeyNotification": UIWindowDidResignKeyNotification, 79 | }, 80 | @"UIKeyboardNotifications": @{ 81 | @"UIKeyboardWillShowNotification": UIKeyboardWillShowNotification, 82 | @"UIKeyboardDidShowNotification": UIKeyboardDidShowNotification, 83 | @"UIKeyboardWillHideNotification": UIKeyboardWillHideNotification, 84 | @"UIKeyboardDidHideNotification": UIKeyboardDidHideNotification, 85 | @"UIKeyboardWillChangeFrameNotification": UIKeyboardWillChangeFrameNotification, 86 | @"UIKeyboardDidChangeFrameNotification": UIKeyboardDidChangeFrameNotification, 87 | }, 88 | }; 89 | } 90 | 91 | - (dispatch_queue_t)methodQueue 92 | { 93 | return dispatch_get_main_queue(); 94 | } 95 | 96 | - (void)dealloc 97 | { 98 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramaggarwal/react-native-global-event-emitter/4f82a49481f8ce466fc8b2c2d729b8f2ebe94dfb/Screenshot.png -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; 11 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 12 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 13 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 14 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 15 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 16 | 00E356F31AD99517003FC87E /* RNTGlobalEventEmitterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* RNTGlobalEventEmitterTests.m */; }; 17 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 18 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 19 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 20 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 21 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 22 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 23 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 26 | 8B5619811B8F589D0043D586 /* RNTGlobalEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5619801B8F589D0043D586 /* RNTGlobalEventEmitter.m */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 33 | proxyType = 2; 34 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 35 | remoteInfo = RCTActionSheet; 36 | }; 37 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 40 | proxyType = 2; 41 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 42 | remoteInfo = RCTGeolocation; 43 | }; 44 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 49 | remoteInfo = RCTImage; 50 | }; 51 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 56 | remoteInfo = RCTNetwork; 57 | }; 58 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 63 | remoteInfo = RCTVibration; 64 | }; 65 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 68 | proxyType = 1; 69 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 70 | remoteInfo = RNTGlobalEventEmitter; 71 | }; 72 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 77 | remoteInfo = RCTSettings; 78 | }; 79 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 82 | proxyType = 2; 83 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 84 | remoteInfo = RCTWebSocket; 85 | }; 86 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 91 | remoteInfo = React; 92 | }; 93 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 98 | remoteInfo = RCTLinking; 99 | }; 100 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 101 | isa = PBXContainerItemProxy; 102 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 103 | proxyType = 2; 104 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 105 | remoteInfo = RCTText; 106 | }; 107 | /* End PBXContainerItemProxy section */ 108 | 109 | /* Begin PBXFileReference section */ 110 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 111 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 112 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 113 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 114 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 115 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 116 | 00E356EE1AD99517003FC87E /* RNTGlobalEventEmitterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNTGlobalEventEmitterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 117 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 118 | 00E356F21AD99517003FC87E /* RNTGlobalEventEmitterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNTGlobalEventEmitterTests.m; sourceTree = ""; }; 119 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 120 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 121 | 13B07F961A680F5B00A75B9A /* RNTGlobalEventEmitter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNTGlobalEventEmitter.app; sourceTree = BUILT_PRODUCTS_DIR; }; 122 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 123 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 124 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 125 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 126 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 127 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 128 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 129 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 130 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 131 | 8B56197F1B8F589D0043D586 /* RNTGlobalEventEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNTGlobalEventEmitter.h; path = ../../RNTGlobalEventEmitter.h; sourceTree = ""; }; 132 | 8B5619801B8F589D0043D586 /* RNTGlobalEventEmitter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNTGlobalEventEmitter.m; path = ../../RNTGlobalEventEmitter.m; sourceTree = ""; }; 133 | /* End PBXFileReference section */ 134 | 135 | /* Begin PBXFrameworksBuildPhase section */ 136 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 137 | isa = PBXFrameworksBuildPhase; 138 | buildActionMask = 2147483647; 139 | files = ( 140 | ); 141 | runOnlyForDeploymentPostprocessing = 0; 142 | }; 143 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 144 | isa = PBXFrameworksBuildPhase; 145 | buildActionMask = 2147483647; 146 | files = ( 147 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 148 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 149 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 150 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 151 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 152 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 153 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 154 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 155 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 156 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | /* End PBXFrameworksBuildPhase section */ 161 | 162 | /* Begin PBXGroup section */ 163 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 167 | ); 168 | name = Products; 169 | sourceTree = ""; 170 | }; 171 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 175 | ); 176 | name = Products; 177 | sourceTree = ""; 178 | }; 179 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 183 | ); 184 | name = Products; 185 | sourceTree = ""; 186 | }; 187 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 191 | ); 192 | name = Products; 193 | sourceTree = ""; 194 | }; 195 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 199 | ); 200 | name = Products; 201 | sourceTree = ""; 202 | }; 203 | 00E356EF1AD99517003FC87E /* RNTGlobalEventEmitterTests */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 00E356F21AD99517003FC87E /* RNTGlobalEventEmitterTests.m */, 207 | 00E356F01AD99517003FC87E /* Supporting Files */, 208 | ); 209 | path = RNTGlobalEventEmitterTests; 210 | sourceTree = ""; 211 | }; 212 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | 00E356F11AD99517003FC87E /* Info.plist */, 216 | ); 217 | name = "Supporting Files"; 218 | sourceTree = ""; 219 | }; 220 | 139105B71AF99BAD00B5F7CC /* Products */ = { 221 | isa = PBXGroup; 222 | children = ( 223 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 224 | ); 225 | name = Products; 226 | sourceTree = ""; 227 | }; 228 | 139FDEE71B06529A00C62182 /* Products */ = { 229 | isa = PBXGroup; 230 | children = ( 231 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 232 | ); 233 | name = Products; 234 | sourceTree = ""; 235 | }; 236 | 13B07FAE1A68108700A75B9A /* RNTGlobalEventEmitter */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 240 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 241 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 242 | 13B07FB61A68108700A75B9A /* Info.plist */, 243 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 244 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 245 | 13B07FB71A68108700A75B9A /* main.m */, 246 | 8B56197F1B8F589D0043D586 /* RNTGlobalEventEmitter.h */, 247 | 8B5619801B8F589D0043D586 /* RNTGlobalEventEmitter.m */, 248 | ); 249 | path = RNTGlobalEventEmitter; 250 | sourceTree = ""; 251 | }; 252 | 146834001AC3E56700842450 /* Products */ = { 253 | isa = PBXGroup; 254 | children = ( 255 | 146834041AC3E56700842450 /* libReact.a */, 256 | ); 257 | name = Products; 258 | sourceTree = ""; 259 | }; 260 | 78C398B11ACF4ADC00677621 /* Products */ = { 261 | isa = PBXGroup; 262 | children = ( 263 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 264 | ); 265 | name = Products; 266 | sourceTree = ""; 267 | }; 268 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 269 | isa = PBXGroup; 270 | children = ( 271 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 272 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 273 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 274 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 275 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 276 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 277 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 278 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 279 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 280 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 281 | ); 282 | name = Libraries; 283 | sourceTree = ""; 284 | }; 285 | 832341B11AAA6A8300B99B32 /* Products */ = { 286 | isa = PBXGroup; 287 | children = ( 288 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 289 | ); 290 | name = Products; 291 | sourceTree = ""; 292 | }; 293 | 83CBB9F61A601CBA00E9B192 = { 294 | isa = PBXGroup; 295 | children = ( 296 | 13B07FAE1A68108700A75B9A /* RNTGlobalEventEmitter */, 297 | 00E356EF1AD99517003FC87E /* RNTGlobalEventEmitterTests */, 298 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 299 | 83CBBA001A601CBA00E9B192 /* Products */, 300 | ); 301 | indentWidth = 2; 302 | sourceTree = ""; 303 | tabWidth = 2; 304 | }; 305 | 83CBBA001A601CBA00E9B192 /* Products */ = { 306 | isa = PBXGroup; 307 | children = ( 308 | 13B07F961A680F5B00A75B9A /* RNTGlobalEventEmitter.app */, 309 | 00E356EE1AD99517003FC87E /* RNTGlobalEventEmitterTests.xctest */, 310 | ); 311 | name = Products; 312 | sourceTree = ""; 313 | }; 314 | /* End PBXGroup section */ 315 | 316 | /* Begin PBXNativeTarget section */ 317 | 00E356ED1AD99517003FC87E /* RNTGlobalEventEmitterTests */ = { 318 | isa = PBXNativeTarget; 319 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RNTGlobalEventEmitterTests" */; 320 | buildPhases = ( 321 | 00E356EA1AD99517003FC87E /* Sources */, 322 | 00E356EB1AD99517003FC87E /* Frameworks */, 323 | 00E356EC1AD99517003FC87E /* Resources */, 324 | ); 325 | buildRules = ( 326 | ); 327 | dependencies = ( 328 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 329 | ); 330 | name = RNTGlobalEventEmitterTests; 331 | productName = RNTGlobalEventEmitterTests; 332 | productReference = 00E356EE1AD99517003FC87E /* RNTGlobalEventEmitterTests.xctest */; 333 | productType = "com.apple.product-type.bundle.unit-test"; 334 | }; 335 | 13B07F861A680F5B00A75B9A /* RNTGlobalEventEmitter */ = { 336 | isa = PBXNativeTarget; 337 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNTGlobalEventEmitter" */; 338 | buildPhases = ( 339 | 13B07F871A680F5B00A75B9A /* Sources */, 340 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 341 | 13B07F8E1A680F5B00A75B9A /* Resources */, 342 | ); 343 | buildRules = ( 344 | ); 345 | dependencies = ( 346 | ); 347 | name = RNTGlobalEventEmitter; 348 | productName = "Hello World"; 349 | productReference = 13B07F961A680F5B00A75B9A /* RNTGlobalEventEmitter.app */; 350 | productType = "com.apple.product-type.application"; 351 | }; 352 | /* End PBXNativeTarget section */ 353 | 354 | /* Begin PBXProject section */ 355 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 356 | isa = PBXProject; 357 | attributes = { 358 | LastUpgradeCheck = 0610; 359 | ORGANIZATIONNAME = Facebook; 360 | TargetAttributes = { 361 | 00E356ED1AD99517003FC87E = { 362 | CreatedOnToolsVersion = 6.2; 363 | TestTargetID = 13B07F861A680F5B00A75B9A; 364 | }; 365 | }; 366 | }; 367 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNTGlobalEventEmitter" */; 368 | compatibilityVersion = "Xcode 3.2"; 369 | developmentRegion = English; 370 | hasScannedForEncodings = 0; 371 | knownRegions = ( 372 | en, 373 | Base, 374 | ); 375 | mainGroup = 83CBB9F61A601CBA00E9B192; 376 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 377 | projectDirPath = ""; 378 | projectReferences = ( 379 | { 380 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 381 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 382 | }, 383 | { 384 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 385 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 386 | }, 387 | { 388 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 389 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 390 | }, 391 | { 392 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 393 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 394 | }, 395 | { 396 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 397 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 398 | }, 399 | { 400 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 401 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 402 | }, 403 | { 404 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 405 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 406 | }, 407 | { 408 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 409 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 410 | }, 411 | { 412 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 413 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 414 | }, 415 | { 416 | ProductGroup = 146834001AC3E56700842450 /* Products */; 417 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 418 | }, 419 | ); 420 | projectRoot = ""; 421 | targets = ( 422 | 13B07F861A680F5B00A75B9A /* RNTGlobalEventEmitter */, 423 | 00E356ED1AD99517003FC87E /* RNTGlobalEventEmitterTests */, 424 | ); 425 | }; 426 | /* End PBXProject section */ 427 | 428 | /* Begin PBXReferenceProxy section */ 429 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 430 | isa = PBXReferenceProxy; 431 | fileType = archive.ar; 432 | path = libRCTActionSheet.a; 433 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 434 | sourceTree = BUILT_PRODUCTS_DIR; 435 | }; 436 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 437 | isa = PBXReferenceProxy; 438 | fileType = archive.ar; 439 | path = libRCTGeolocation.a; 440 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 441 | sourceTree = BUILT_PRODUCTS_DIR; 442 | }; 443 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 444 | isa = PBXReferenceProxy; 445 | fileType = archive.ar; 446 | path = libRCTImage.a; 447 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 448 | sourceTree = BUILT_PRODUCTS_DIR; 449 | }; 450 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 451 | isa = PBXReferenceProxy; 452 | fileType = archive.ar; 453 | path = libRCTNetwork.a; 454 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 455 | sourceTree = BUILT_PRODUCTS_DIR; 456 | }; 457 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 458 | isa = PBXReferenceProxy; 459 | fileType = archive.ar; 460 | path = libRCTVibration.a; 461 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 462 | sourceTree = BUILT_PRODUCTS_DIR; 463 | }; 464 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 465 | isa = PBXReferenceProxy; 466 | fileType = archive.ar; 467 | path = libRCTSettings.a; 468 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 469 | sourceTree = BUILT_PRODUCTS_DIR; 470 | }; 471 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 472 | isa = PBXReferenceProxy; 473 | fileType = archive.ar; 474 | path = libRCTWebSocket.a; 475 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 476 | sourceTree = BUILT_PRODUCTS_DIR; 477 | }; 478 | 146834041AC3E56700842450 /* libReact.a */ = { 479 | isa = PBXReferenceProxy; 480 | fileType = archive.ar; 481 | path = libReact.a; 482 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 483 | sourceTree = BUILT_PRODUCTS_DIR; 484 | }; 485 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 486 | isa = PBXReferenceProxy; 487 | fileType = archive.ar; 488 | path = libRCTLinking.a; 489 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 490 | sourceTree = BUILT_PRODUCTS_DIR; 491 | }; 492 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 493 | isa = PBXReferenceProxy; 494 | fileType = archive.ar; 495 | path = libRCTText.a; 496 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 497 | sourceTree = BUILT_PRODUCTS_DIR; 498 | }; 499 | /* End PBXReferenceProxy section */ 500 | 501 | /* Begin PBXResourcesBuildPhase section */ 502 | 00E356EC1AD99517003FC87E /* Resources */ = { 503 | isa = PBXResourcesBuildPhase; 504 | buildActionMask = 2147483647; 505 | files = ( 506 | ); 507 | runOnlyForDeploymentPostprocessing = 0; 508 | }; 509 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 510 | isa = PBXResourcesBuildPhase; 511 | buildActionMask = 2147483647; 512 | files = ( 513 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, 514 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 515 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 516 | ); 517 | runOnlyForDeploymentPostprocessing = 0; 518 | }; 519 | /* End PBXResourcesBuildPhase section */ 520 | 521 | /* Begin PBXSourcesBuildPhase section */ 522 | 00E356EA1AD99517003FC87E /* Sources */ = { 523 | isa = PBXSourcesBuildPhase; 524 | buildActionMask = 2147483647; 525 | files = ( 526 | 00E356F31AD99517003FC87E /* RNTGlobalEventEmitterTests.m in Sources */, 527 | ); 528 | runOnlyForDeploymentPostprocessing = 0; 529 | }; 530 | 13B07F871A680F5B00A75B9A /* Sources */ = { 531 | isa = PBXSourcesBuildPhase; 532 | buildActionMask = 2147483647; 533 | files = ( 534 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 535 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 536 | 8B5619811B8F589D0043D586 /* RNTGlobalEventEmitter.m in Sources */, 537 | ); 538 | runOnlyForDeploymentPostprocessing = 0; 539 | }; 540 | /* End PBXSourcesBuildPhase section */ 541 | 542 | /* Begin PBXTargetDependency section */ 543 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 544 | isa = PBXTargetDependency; 545 | target = 13B07F861A680F5B00A75B9A /* RNTGlobalEventEmitter */; 546 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 547 | }; 548 | /* End PBXTargetDependency section */ 549 | 550 | /* Begin PBXVariantGroup section */ 551 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 552 | isa = PBXVariantGroup; 553 | children = ( 554 | 13B07FB21A68108700A75B9A /* Base */, 555 | ); 556 | name = LaunchScreen.xib; 557 | sourceTree = ""; 558 | }; 559 | /* End PBXVariantGroup section */ 560 | 561 | /* Begin XCBuildConfiguration section */ 562 | 00E356F61AD99517003FC87E /* Debug */ = { 563 | isa = XCBuildConfiguration; 564 | buildSettings = { 565 | BUNDLE_LOADER = "$(TEST_HOST)"; 566 | FRAMEWORK_SEARCH_PATHS = ( 567 | "$(SDKROOT)/Developer/Library/Frameworks", 568 | "$(inherited)", 569 | ); 570 | GCC_PREPROCESSOR_DEFINITIONS = ( 571 | "DEBUG=1", 572 | "$(inherited)", 573 | ); 574 | INFOPLIST_FILE = RNTGlobalEventEmitterTests/Info.plist; 575 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 576 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 577 | PRODUCT_NAME = "$(TARGET_NAME)"; 578 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RNTGlobalEventEmitter.app/RNTGlobalEventEmitter"; 579 | }; 580 | name = Debug; 581 | }; 582 | 00E356F71AD99517003FC87E /* Release */ = { 583 | isa = XCBuildConfiguration; 584 | buildSettings = { 585 | BUNDLE_LOADER = "$(TEST_HOST)"; 586 | COPY_PHASE_STRIP = NO; 587 | FRAMEWORK_SEARCH_PATHS = ( 588 | "$(SDKROOT)/Developer/Library/Frameworks", 589 | "$(inherited)", 590 | ); 591 | INFOPLIST_FILE = RNTGlobalEventEmitterTests/Info.plist; 592 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 593 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 594 | PRODUCT_NAME = "$(TARGET_NAME)"; 595 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RNTGlobalEventEmitter.app/RNTGlobalEventEmitter"; 596 | }; 597 | name = Release; 598 | }; 599 | 13B07F941A680F5B00A75B9A /* Debug */ = { 600 | isa = XCBuildConfiguration; 601 | buildSettings = { 602 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 603 | HEADER_SEARCH_PATHS = ( 604 | "$(inherited)", 605 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 606 | "$(SRCROOT)/../node_modules/react-native/React/**", 607 | ); 608 | INFOPLIST_FILE = "$(SRCROOT)/RNTGlobalEventEmitter/Info.plist"; 609 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 610 | OTHER_LDFLAGS = "-ObjC"; 611 | PRODUCT_NAME = RNTGlobalEventEmitter; 612 | }; 613 | name = Debug; 614 | }; 615 | 13B07F951A680F5B00A75B9A /* Release */ = { 616 | isa = XCBuildConfiguration; 617 | buildSettings = { 618 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 619 | HEADER_SEARCH_PATHS = ( 620 | "$(inherited)", 621 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 622 | "$(SRCROOT)/../node_modules/react-native/React/**", 623 | ); 624 | INFOPLIST_FILE = "$(SRCROOT)/RNTGlobalEventEmitter/Info.plist"; 625 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 626 | OTHER_LDFLAGS = "-ObjC"; 627 | PRODUCT_NAME = RNTGlobalEventEmitter; 628 | }; 629 | name = Release; 630 | }; 631 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 632 | isa = XCBuildConfiguration; 633 | buildSettings = { 634 | ALWAYS_SEARCH_USER_PATHS = NO; 635 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 636 | CLANG_CXX_LIBRARY = "libc++"; 637 | CLANG_ENABLE_MODULES = YES; 638 | CLANG_ENABLE_OBJC_ARC = YES; 639 | CLANG_WARN_BOOL_CONVERSION = YES; 640 | CLANG_WARN_CONSTANT_CONVERSION = YES; 641 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 642 | CLANG_WARN_EMPTY_BODY = YES; 643 | CLANG_WARN_ENUM_CONVERSION = YES; 644 | CLANG_WARN_INT_CONVERSION = YES; 645 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 646 | CLANG_WARN_UNREACHABLE_CODE = YES; 647 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 648 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 649 | COPY_PHASE_STRIP = NO; 650 | ENABLE_STRICT_OBJC_MSGSEND = YES; 651 | GCC_C_LANGUAGE_STANDARD = gnu99; 652 | GCC_DYNAMIC_NO_PIC = NO; 653 | GCC_OPTIMIZATION_LEVEL = 0; 654 | GCC_PREPROCESSOR_DEFINITIONS = ( 655 | "DEBUG=1", 656 | "$(inherited)", 657 | ); 658 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 659 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 660 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 661 | GCC_WARN_UNDECLARED_SELECTOR = YES; 662 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 663 | GCC_WARN_UNUSED_FUNCTION = YES; 664 | GCC_WARN_UNUSED_VARIABLE = YES; 665 | HEADER_SEARCH_PATHS = ( 666 | "$(inherited)", 667 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 668 | "$(SRCROOT)/node_modules/react-native/React/**", 669 | ); 670 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 671 | MTL_ENABLE_DEBUG_INFO = YES; 672 | ONLY_ACTIVE_ARCH = YES; 673 | SDKROOT = iphoneos; 674 | }; 675 | name = Debug; 676 | }; 677 | 83CBBA211A601CBA00E9B192 /* Release */ = { 678 | isa = XCBuildConfiguration; 679 | buildSettings = { 680 | ALWAYS_SEARCH_USER_PATHS = NO; 681 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 682 | CLANG_CXX_LIBRARY = "libc++"; 683 | CLANG_ENABLE_MODULES = YES; 684 | CLANG_ENABLE_OBJC_ARC = YES; 685 | CLANG_WARN_BOOL_CONVERSION = YES; 686 | CLANG_WARN_CONSTANT_CONVERSION = YES; 687 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 688 | CLANG_WARN_EMPTY_BODY = YES; 689 | CLANG_WARN_ENUM_CONVERSION = YES; 690 | CLANG_WARN_INT_CONVERSION = YES; 691 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 692 | CLANG_WARN_UNREACHABLE_CODE = YES; 693 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 694 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 695 | COPY_PHASE_STRIP = YES; 696 | ENABLE_NS_ASSERTIONS = NO; 697 | ENABLE_STRICT_OBJC_MSGSEND = YES; 698 | GCC_C_LANGUAGE_STANDARD = gnu99; 699 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 700 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 701 | GCC_WARN_UNDECLARED_SELECTOR = YES; 702 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 703 | GCC_WARN_UNUSED_FUNCTION = YES; 704 | GCC_WARN_UNUSED_VARIABLE = YES; 705 | HEADER_SEARCH_PATHS = ( 706 | "$(inherited)", 707 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 708 | "$(SRCROOT)/node_modules/react-native/React/**", 709 | ); 710 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 711 | MTL_ENABLE_DEBUG_INFO = NO; 712 | SDKROOT = iphoneos; 713 | VALIDATE_PRODUCT = YES; 714 | }; 715 | name = Release; 716 | }; 717 | /* End XCBuildConfiguration section */ 718 | 719 | /* Begin XCConfigurationList section */ 720 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RNTGlobalEventEmitterTests" */ = { 721 | isa = XCConfigurationList; 722 | buildConfigurations = ( 723 | 00E356F61AD99517003FC87E /* Debug */, 724 | 00E356F71AD99517003FC87E /* Release */, 725 | ); 726 | defaultConfigurationIsVisible = 0; 727 | defaultConfigurationName = Release; 728 | }; 729 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNTGlobalEventEmitter" */ = { 730 | isa = XCConfigurationList; 731 | buildConfigurations = ( 732 | 13B07F941A680F5B00A75B9A /* Debug */, 733 | 13B07F951A680F5B00A75B9A /* Release */, 734 | ); 735 | defaultConfigurationIsVisible = 0; 736 | defaultConfigurationName = Release; 737 | }; 738 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNTGlobalEventEmitter" */ = { 739 | isa = XCConfigurationList; 740 | buildConfigurations = ( 741 | 83CBBA201A601CBA00E9B192 /* Debug */, 742 | 83CBBA211A601CBA00E9B192 /* Release */, 743 | ); 744 | defaultConfigurationIsVisible = 0; 745 | defaultConfigurationName = Release; 746 | }; 747 | /* End XCConfigurationList section */ 748 | }; 749 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 750 | } 751 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter.xcodeproj/xcshareddata/xcschemes/RNTGlobalEventEmitter.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTRootView.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | NSURL *jsCodeLocation; 19 | 20 | /** 21 | * Loading JavaScript code - uncomment the one you want. 22 | * 23 | * OPTION 1 24 | * Load from development server. Start the server from the repository root: 25 | * 26 | * $ npm start 27 | * 28 | * To run on device, change `localhost` to the IP address of your computer 29 | * (you can get this by typing `ifconfig` into the terminal and selecting the 30 | * `inet` value under `en0:`) and make sure your computer and iOS device are 31 | * on the same Wi-Fi network. 32 | */ 33 | 34 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; 35 | 36 | /** 37 | * OPTION 2 38 | * Load from pre-bundled file on disk. To re-generate the static bundle 39 | * from the root of your project directory, run 40 | * 41 | * $ react-native bundle --minify 42 | * 43 | * see http://facebook.github.io/react-native/docs/runningondevice.html 44 | */ 45 | 46 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 47 | 48 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 49 | moduleName:@"RNTGlobalEventEmitter" 50 | launchOptions:launchOptions]; 51 | 52 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 53 | UIViewController *rootViewController = [[UIViewController alloc] init]; 54 | rootViewController.view = rootView; 55 | self.window.rootViewController = rootViewController; 56 | [self.window makeKeyAndVisible]; 57 | return YES; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSAllowsArbitraryLoads 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/main.jsbundle: -------------------------------------------------------------------------------- 1 | // Offline JS 2 | // To re-generate the offline bundle, run this from the root of your project: 3 | // 4 | // $ react-native bundle --minify 5 | // 6 | // See http://facebook.github.io/react-native/docs/runningondevice.html for more details. 7 | 8 | throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); 9 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitter/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitterTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /iOS/RNTGlobalEventEmitterTests/RNTGlobalEventEmitterTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTAssert.h" 14 | #import "RCTRedBox.h" 15 | #import "RCTRootView.h" 16 | 17 | #define TIMEOUT_SECONDS 240 18 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 19 | 20 | @interface RNTGlobalEventEmitterTests : XCTestCase 21 | 22 | @end 23 | 24 | @implementation RNTGlobalEventEmitterTests 25 | 26 | 27 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 28 | { 29 | if (test(view)) { 30 | return YES; 31 | } 32 | for (UIView *subview in [view subviews]) { 33 | if ([self findSubviewInView:subview matching:test]) { 34 | return YES; 35 | } 36 | } 37 | return NO; 38 | } 39 | 40 | - (void)testRendersWelcomeScreen { 41 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 42 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 43 | BOOL foundElement = NO; 44 | NSString *redboxError = nil; 45 | 46 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 47 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 49 | 50 | redboxError = [[RCTRedBox sharedInstance] currentErrorMessage]; 51 | 52 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 53 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 54 | return YES; 55 | } 56 | return NO; 57 | }]; 58 | } 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | */ 5 | 'use strict'; 6 | 7 | var React = require('react-native'); 8 | var { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View, 13 | } = React; 14 | 15 | var GlobalEventEmitter = require('./GlobalEventEmitter.ios.js'); 16 | 17 | var RNTGlobalEventEmitter = React.createClass({ 18 | getInitialState: function () { 19 | return { 20 | events: [] 21 | }; 22 | }, 23 | 24 | appendEvent: function (e) { 25 | this.setState((prevState) => { 26 | return { 27 | events: prevState.events.concat([e]) 28 | }; 29 | }) 30 | }, 31 | 32 | componentDidMount: function () { 33 | GlobalEventEmitter.addListener(GlobalEventEmitter.UIApplicationNotifications.UIApplicationDidEnterBackgroundNotification, (data) => { 34 | this.appendEvent('UIApplicationDidEnterBackgroundNotification'); 35 | }); 36 | GlobalEventEmitter.addListener(GlobalEventEmitter.UIApplicationNotifications.UIApplicationWillEnterForegroundNotification, (data) => { 37 | this.appendEvent('UIApplicationWillEnterForegroundNotification'); 38 | }); 39 | GlobalEventEmitter.addListener(GlobalEventEmitter.UIApplicationNotifications.UIApplicationDidBecomeActiveNotification, (data) => { 40 | this.appendEvent('UIApplicationDidBecomeActiveNotification'); 41 | }); 42 | GlobalEventEmitter.addListener(GlobalEventEmitter.UIApplicationNotifications.UIApplicationWillResignActiveNotification, (data) => { 43 | this.appendEvent('UIApplicationWillResignActiveNotification'); 44 | }); 45 | }, 46 | 47 | render: function() { 48 | var events = this.state.events; 49 | console.log(events); 50 | return ( 51 | 52 | 53 | Global Event Emitter for React Native 54 | 55 | 56 | This app shows native events whenever app becomes inactive/active below. 57 | 58 | 59 | {events.map((e, i) => {i+1}.: {e})} 60 | 61 | 62 | Try closing and reopening the app a few times. 63 | 64 | 65 | ); 66 | } 67 | }); 68 | 69 | var styles = StyleSheet.create({ 70 | container: { 71 | flex: 1, 72 | justifyContent: 'center', 73 | // alignItems: 'center', 74 | backgroundColor: '#F5FCFF', 75 | }, 76 | space: { 77 | margin: 10 78 | }, 79 | welcome: { 80 | fontSize: 20, 81 | textAlign: 'center', 82 | margin: 10, 83 | }, 84 | instructions: { 85 | textAlign: 'center', 86 | color: '#333333', 87 | marginBottom: 5, 88 | }, 89 | }); 90 | 91 | AppRegistry.registerComponent('RNTGlobalEventEmitter', () => RNTGlobalEventEmitter); 92 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-global-event-emitter", 3 | "version": "0.2.0", 4 | "description": "Shared event emitter between native and JS for React Native.", 5 | "main": "GlobalEventEmitter.ios.js", 6 | "scripts": { 7 | "start": "node_modules/react-native/packager/packager.sh" 8 | }, 9 | "peerDependencies": { 10 | "react-native": ">=0.9.0" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/paramaggarwal/react-native-global-event-emitter.git" 15 | }, 16 | "keywords": [ 17 | "react", 18 | "native", 19 | "global", 20 | "event", 21 | "emitter", 22 | "react-native" 23 | ], 24 | "author": "Param Aggarwal", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/paramaggarwal/react-native-global-event-emitter/issues" 28 | }, 29 | "homepage": "https://github.com/paramaggarwal/react-native-global-event-emitter#readme" 30 | } 31 | --------------------------------------------------------------------------------