mirror of
https://github.com/react/react-native.git
synced 2026-10-28 01:25:05 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
861c860462
commit
8ec7e0966c
@@ -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;
|
||||
@@ -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 <React/RCTBridgeModule.h>
|
||||
|
||||
@interface Sample : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
@@ -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;
|
||||
@@ -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
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "Sample",
|
||||
"version": "0.0.1",
|
||||
"keywords": "react-native"
|
||||
}
|
||||
@@ -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 <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CrashyCrash : NSObject <RCTBridgeModule>
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user