From 8ec7e0966cf83ed29a39aab47c686bc60a124983 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Fri, 8 Nov 2019 14:08:11 -0800 Subject: [PATCH] Delete Sample and CrashyCrash Summary: These NativeModules aren't necessary. So, instead of making them TurboModule-compatible, I'm deleting them. Changelog: [General][Removed] - Remove Sample and CrashyCrash Reviewed By: fkgozali Differential Revision: D18361526 fbshipit-source-id: 3217130a5fb32bec9db78d53c5429bae7ed7b66c --- Libraries/Sample/Sample.android.js | 26 ------------------ Libraries/Sample/Sample.h | 12 --------- Libraries/Sample/Sample.ios.js | 27 ------------------- Libraries/Sample/Sample.m | 19 ------------- Libraries/Sample/package.json | 5 ---- .../NativeExampleModules/CrashyCrash.h | 17 ------------ .../NativeExampleModules/CrashyCrash.m | 22 --------------- 7 files changed, 128 deletions(-) delete mode 100644 Libraries/Sample/Sample.android.js delete mode 100644 Libraries/Sample/Sample.h delete mode 100644 Libraries/Sample/Sample.ios.js delete mode 100644 Libraries/Sample/Sample.m delete mode 100644 Libraries/Sample/package.json delete mode 100644 RNTester/RNTester/NativeExampleModules/CrashyCrash.h delete mode 100644 RNTester/RNTester/NativeExampleModules/CrashyCrash.m diff --git a/Libraries/Sample/Sample.android.js b/Libraries/Sample/Sample.android.js deleted file mode 100644 index 1f8fcf56a64..00000000000 --- a/Libraries/Sample/Sample.android.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -// Stub of Sample for Android. - -'use strict'; - -const warning = require('fbjs/lib/warning'); - -const Sample = { - test: function() { - /* $FlowFixMe(>=0.111.0 site=react_native_android_fb) This comment - * suppresses an error found when Flow v0.111 was deployed. To see the - * error, delete this comment and run Flow. */ - warning('Not yet implemented for Android.'); - }, -}; - -module.exports = Sample; diff --git a/Libraries/Sample/Sample.h b/Libraries/Sample/Sample.h deleted file mode 100644 index ca313f1362a..00000000000 --- a/Libraries/Sample/Sample.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -@interface Sample : NSObject - -@end diff --git a/Libraries/Sample/Sample.ios.js b/Libraries/Sample/Sample.ios.js deleted file mode 100644 index 78dbe32107d..00000000000 --- a/Libraries/Sample/Sample.ios.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -// Stub of Sample for Android. - -'use strict'; - -const NativeSample = require('../BatchedBridge/NativeModules').Sample; - -/** - * High-level docs for the Sample iOS API can be written here. - */ - -const Sample = { - test: function() { - NativeSample.test(); - }, -}; - -module.exports = Sample; diff --git a/Libraries/Sample/Sample.m b/Libraries/Sample/Sample.m deleted file mode 100644 index b32d8f8ea5e..00000000000 --- a/Libraries/Sample/Sample.m +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import "Sample.h" - -@implementation Sample - -RCT_EXPORT_MODULE() - -RCT_EXPORT_METHOD(test) -{ - // Your implementation here -} - -@end diff --git a/Libraries/Sample/package.json b/Libraries/Sample/package.json deleted file mode 100644 index 3649dfb7c37..00000000000 --- a/Libraries/Sample/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Sample", - "version": "0.0.1", - "keywords": "react-native" -} diff --git a/RNTester/RNTester/NativeExampleModules/CrashyCrash.h b/RNTester/RNTester/NativeExampleModules/CrashyCrash.h deleted file mode 100644 index c45f2549322..00000000000 --- a/RNTester/RNTester/NativeExampleModules/CrashyCrash.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -@interface CrashyCrash : NSObject -@end - -NS_ASSUME_NONNULL_END diff --git a/RNTester/RNTester/NativeExampleModules/CrashyCrash.m b/RNTester/RNTester/NativeExampleModules/CrashyCrash.m deleted file mode 100644 index 08907440358..00000000000 --- a/RNTester/RNTester/NativeExampleModules/CrashyCrash.m +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import "CrashyCrash.h" - - -@implementation CrashyCrash - -RCT_EXPORT_MODULE(); - -RCT_EXPORT_METHOD(letsCrash) -{ - NSArray *a = @[@"wow"]; - NSString *s = [a objectAtIndex:42]; // native crash here - NSLog(@"%@", s); -} - -@end