Commit 49604e04 authored by Travis Nuttall's avatar Travis Nuttall

add simple example to demonstrate basic thread usage and debugging

parent d0985ced
...@@ -12,14 +12,15 @@ ...@@ -12,14 +12,15 @@
; For RN Apps installed via npm, "Libraries" folder is inside ; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root ; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js .*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
; Ignore polyfills
.*/Libraries/polyfills/.*
[include] [include]
[libs] [libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow node_modules/react-native/flow/
flow/
[options] [options]
emoji=true emoji=true
...@@ -32,14 +33,16 @@ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|we ...@@ -32,14 +33,16 @@ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|we
suppress_type=$FlowIssue suppress_type=$FlowIssue
suppress_type=$FlowFixMe suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true unsafe.enable_getters_and_setters=true
[version] [version]
^0.49.1 ^0.53.0
...@@ -46,8 +46,8 @@ buck-out/ ...@@ -46,8 +46,8 @@ buck-out/
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed. # screenshots whenever they are needed.
# For more information about the recommended setup visit: # For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md # https://docs.fastlane.tools/best-practices/source-control/
fastlane/report.xml */fastlane/report.xml
fastlane/Preview.html */fastlane/Preview.html
fastlane/screenshots */fastlane/screenshots
import React, { Component } from 'react'; import React, { Component } from 'react';
import { import {
AppRegistry, Button,
StyleSheet, StyleSheet,
Text, Text,
View, View
TouchableOpacity,
} from 'react-native'; } from 'react-native';
import { Thread } from 'react-native-threads'; import { Thread } from 'react-native-threads';
class ThreadExample extends Component { export default class App extends Component<{}> {
state = { messages: [] }
workerThread = null;
componentDidMount() { componentDidMount() {
this.worker= new Thread('worker.js'); this.workerThread = new Thread('./worker.thread.js');
this.workerThread.onmessage = this.handleMessage;
}
this.worker.onmessage = (message) => { componentWillUnmount() {
console.log("Got message from worker", message); this.workerThread.terminate();
this.workerThread = null;
} }
handleMessage = message => {
console.tron.log(`APP: got message ${message}`);
this.setState(state => {
return { messages: [...state.messages, message] };
});
} }
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<TouchableOpacity onPress={() => {
console.log('SENDING MESSAGE TO WORKER');
this.worker.postMessage("Hello from main thread");
}}>
<Text style={styles.welcome}> <Text style={styles.welcome}>
Send message Welcome to React Native Threads!
</Text> </Text>
</TouchableOpacity>
<Button title="Send Message To Worker Thread" onPress={() => {
this.workerThread.postMessage('Hello')
}} />
<View>
<Text>Messages:</Text>
{this.state.messages.map((message, i) => <Text key={i}>{message}</Text>)}
</View>
</View> </View>
); );
} }
...@@ -46,13 +61,5 @@ const styles = StyleSheet.create({ ...@@ -46,13 +61,5 @@ const styles = StyleSheet.create({
fontSize: 20, fontSize: 20,
textAlign: 'center', textAlign: 'center',
margin: 10, margin: 10,
}, }
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
}); });
AppRegistry.registerComponent('ThreadExample', () => ThreadExample);
# React Native Threads Simple Example
A simple example of using react-native-threads.
A single button sends a message to the worker thread, and the thread responds
with a message count that is displayed in the UI.
This example also shows how to use Reactotron for debugging.
## Running the example
I assume that you have Node.js, react-native-cli, and the necessary iOS/Android
dependencies installed.
To see debugging messages, [install Reactotron](https://github.com/infinitered/reactotron/blob/master/docs/installing.md)
and open it before running the app.
```shell
git clone https://github.com/Traviskn/react-native-threads.git
cd react-native-threads/examples/SimpleExample
npm install
react-native run-ios
# or
react-native run-android
```
To run in release mode first build the release thread bundles with the example's
npm scripts:
```shell
npm run build-thread-ios
npm run build-thread-android
```
import 'react-native'; import 'react-native';
import React from 'react'; import React from 'react';
import Index from '../index.ios.js'; import App from '../App';
// Note: test renderer must be required after react-native. // Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer'; import renderer from 'react-test-renderer';
it('renders correctly', () => { it('renders correctly', () => {
const tree = renderer.create( const tree = renderer.create(
<Index /> <App />
); );
}); });
...@@ -45,12 +45,12 @@ android_library( ...@@ -45,12 +45,12 @@ android_library(
android_build_config( android_build_config(
name = "build_config", name = "build_config",
package = "com.threadexample", package = "com.simpleexample",
) )
android_resource( android_resource(
name = "res", name = "res",
package = "com.threadexample", package = "com.simpleexample",
res = "src/main/res", res = "src/main/res",
) )
......
...@@ -72,6 +72,10 @@ import com.android.build.OutputFile ...@@ -72,6 +72,10 @@ import com.android.build.OutputFile
* ] * ]
*/ */
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native/react.gradle"
/** /**
...@@ -94,7 +98,7 @@ android { ...@@ -94,7 +98,7 @@ android {
buildToolsVersion "23.0.1" buildToolsVersion "23.0.1"
defaultConfig { defaultConfig {
applicationId "com.threadexample" applicationId "com.simpleexample"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 1
...@@ -133,7 +137,7 @@ android { ...@@ -133,7 +137,7 @@ android {
} }
dependencies { dependencies {
compile project(':react-native-thread') compile project(':react-native-threads')
compile fileTree(dir: "libs", include: ["*.jar"]) compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1" compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules compile "com.facebook.react:react-native:+" // From node_modules
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.threadexample" package="com.simpleexample"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0"> android:versionName="1.0">
......
package com.threadexample; package com.simpleexample;
import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivity;
...@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity { ...@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
*/ */
@Override @Override
protected String getMainComponentName() { protected String getMainComponentName() {
return "ThreadExample"; return "SimpleExample";
} }
} }
package com.threadexample; package com.simpleexample;
import android.app.Application; import android.app.Application;
...@@ -24,9 +24,14 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -24,9 +24,14 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() { protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList( return Arrays.<ReactPackage>asList(
new MainReactPackage(), new MainReactPackage(),
new RNThreadPackage(mReactNativeHost) new RNThreadPackage()
); );
} }
@Override
protected String getJSMainModuleName() {
return "index";
}
}; };
@Override @Override
......
<resources> <resources>
<string name="app_name">ThreadExample</string> <string name="app_name">SimpleExample</string>
</resources> </resources>
rootProject.name = 'SimpleExample'
include ':react-native-threads'
project(':react-native-threads').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-threads/android')
include ':app'
{
"name": "SimpleExample",
"displayName": "SimpleExample"
}
\ No newline at end of file
import Reactotron from 'reactotron-react-native'
console.tron = { log: Function.prototype };
if (__DEV__) {
Reactotron
.configure()
.useReactNative()
.connect();
console.tron = Reactotron;
}
import { AppRegistry } from 'react-native';
import App from './App';
import './config';
AppRegistry.registerComponent('SimpleExample', () => App);
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
00E356F31AD99517003FC87E /* ThreadExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ThreadExampleTests.m */; }; 00E356F31AD99517003FC87E /* SimpleExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* SimpleExampleTests.m */; };
11858900EBC34367AB271EAE /* libRNThread.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B75FC9FDF4C40A58AD26517 /* libRNThread.a */; };
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
...@@ -33,11 +34,11 @@ ...@@ -33,11 +34,11 @@
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */; }; 2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */; };
2DCD954D1E0B4F2C00145EB5 /* ThreadExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ThreadExampleTests.m */; }; 2DCD954D1E0B4F2C00145EB5 /* SimpleExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* SimpleExampleTests.m */; };
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
F5C36ACF8B624BC7951A03AB /* libRNThread.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9720994578224250810A5EED /* libRNThread.a */; }; C0B25F4C1FA5236E00BD9CA3 /* worker.thread.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = C0B25F4B1FA5236E00BD9CA3 /* worker.thread.jsbundle */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -81,7 +82,7 @@ ...@@ -81,7 +82,7 @@
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1; proxyType = 1;
remoteGlobalIDString = 13B07F861A680F5B00A75B9A; remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
remoteInfo = ThreadExample; remoteInfo = SimpleExample;
}; };
139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
...@@ -109,7 +110,7 @@ ...@@ -109,7 +110,7 @@
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1; proxyType = 1;
remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
remoteInfo = "ThreadExample-tvOS"; remoteInfo = "SimpleExample-tvOS";
}; };
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
...@@ -237,16 +238,30 @@ ...@@ -237,16 +238,30 @@
remoteGlobalIDString = 358F4ED71D1E81A9004DF814; remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
remoteInfo = RCTBlob; remoteInfo = RCTBlob;
}; };
C0B418EB1F6CFA3A00B9D224 /* PBXContainerItemProxy */ = { C0B25F2E1FA51B4200BD9CA3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
proxyType = 2; proxyType = 2;
remoteGlobalIDString = ADD01A681E09402E00F6D226; remoteGlobalIDString = ADD01A681E09402E00F6D226;
remoteInfo = "RCTBlob-tvOS"; remoteInfo = "RCTBlob-tvOS";
}; };
C0B418FC1F6CFA3A00B9D224 /* PBXContainerItemProxy */ = { C0B25F401FA51B4200BD9CA3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 76FA3779275F4C89AFE79AC6 /* RNThread.xcodeproj */; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
remoteInfo = fishhook;
};
C0B25F421FA51B4200BD9CA3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
C0B25F471FA51B4300BD9CA3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0BF39157221E4019BD05A50A /* RNThread.xcodeproj */;
proxyType = 2; proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNThread; remoteInfo = RNThread;
...@@ -260,27 +275,28 @@ ...@@ -260,27 +275,28 @@
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; }; 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; }; 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; }; 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
00E356EE1AD99517003FC87E /* ThreadExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ThreadExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356EE1AD99517003FC87E /* SimpleExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimpleExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* ThreadExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ThreadExampleTests.m; sourceTree = "<group>"; }; 00E356F21AD99517003FC87E /* SimpleExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SimpleExampleTests.m; sourceTree = "<group>"; };
0BF39157221E4019BD05A50A /* RNThread.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNThread.xcodeproj; path = "../node_modules/react-native-threads/ios/RNThread.xcodeproj"; sourceTree = "<group>"; };
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; }; 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; }; 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* ThreadExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ThreadExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07F961A680F5B00A75B9A /* SimpleExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ThreadExample/AppDelegate.h; sourceTree = "<group>"; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SimpleExample/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ThreadExample/AppDelegate.m; sourceTree = "<group>"; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SimpleExample/AppDelegate.m; sourceTree = "<group>"; };
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ThreadExample/Images.xcassets; sourceTree = "<group>"; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SimpleExample/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ThreadExample/Info.plist; sourceTree = "<group>"; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SimpleExample/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ThreadExample/main.m; sourceTree = "<group>"; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SimpleExample/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
2D02E47B1E0B4A5D006451C7 /* ThreadExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ThreadExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E47B1E0B4A5D006451C7 /* SimpleExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SimpleExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* ThreadExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ThreadExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* SimpleExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SimpleExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; }; 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
76FA3779275F4C89AFE79AC6 /* RNThread.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNThread.xcodeproj; path = "../node_modules/react-native-thread/ios/RNThread.xcodeproj"; sourceTree = "<group>"; }; 6B75FC9FDF4C40A58AD26517 /* libRNThread.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNThread.a; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
9720994578224250810A5EED /* libRNThread.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNThread.a; sourceTree = "<group>"; };
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; }; ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
C0B25F4B1FA5236E00BD9CA3 /* worker.thread.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = worker.thread.jsbundle; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -309,7 +325,7 @@ ...@@ -309,7 +325,7 @@
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
F5C36ACF8B624BC7951A03AB /* libRNThread.a in Frameworks */, 11858900EBC34367AB271EAE /* libRNThread.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -380,13 +396,13 @@ ...@@ -380,13 +396,13 @@
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
00E356EF1AD99517003FC87E /* ThreadExampleTests */ = { 00E356EF1AD99517003FC87E /* SimpleExampleTests */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
00E356F21AD99517003FC87E /* ThreadExampleTests.m */, 00E356F21AD99517003FC87E /* SimpleExampleTests.m */,
00E356F01AD99517003FC87E /* Supporting Files */, 00E356F01AD99517003FC87E /* Supporting Files */,
); );
path = ThreadExampleTests; path = SimpleExampleTests;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
00E356F01AD99517003FC87E /* Supporting Files */ = { 00E356F01AD99517003FC87E /* Supporting Files */ = {
...@@ -411,13 +427,16 @@ ...@@ -411,13 +427,16 @@
children = ( children = (
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
C0B25F411FA51B4200BD9CA3 /* libfishhook.a */,
C0B25F431FA51B4200BD9CA3 /* libfishhook-tvOS.a */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
13B07FAE1A68108700A75B9A /* ThreadExample */ = { 13B07FAE1A68108700A75B9A /* SimpleExample */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C0B25F4B1FA5236E00BD9CA3 /* worker.thread.jsbundle */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB01A68108700A75B9A /* AppDelegate.m */,
...@@ -426,7 +445,7 @@ ...@@ -426,7 +445,7 @@
13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */, 13B07FB71A68108700A75B9A /* main.m */,
); );
name = ThreadExample; name = SimpleExample;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
146834001AC3E56700842450 /* Products */ = { 146834001AC3E56700842450 /* Products */ = {
...@@ -477,7 +496,7 @@ ...@@ -477,7 +496,7 @@
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
76FA3779275F4C89AFE79AC6 /* RNThread.xcodeproj */, 0BF39157221E4019BD05A50A /* RNThread.xcodeproj */,
); );
name = Libraries; name = Libraries;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -494,10 +513,11 @@ ...@@ -494,10 +513,11 @@
83CBB9F61A601CBA00E9B192 = { 83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
13B07FAE1A68108700A75B9A /* ThreadExample */, 13B07FAE1A68108700A75B9A /* SimpleExample */,
832341AE1AAA6A7D00B99B32 /* Libraries */, 832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* ThreadExampleTests */, 00E356EF1AD99517003FC87E /* SimpleExampleTests */,
83CBBA001A601CBA00E9B192 /* Products */, 83CBBA001A601CBA00E9B192 /* Products */,
C0B25F281FA51B4100BD9CA3 /* Recovered References */,
); );
indentWidth = 2; indentWidth = 2;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -507,10 +527,10 @@ ...@@ -507,10 +527,10 @@
83CBBA001A601CBA00E9B192 /* Products */ = { 83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
13B07F961A680F5B00A75B9A /* ThreadExample.app */, 13B07F961A680F5B00A75B9A /* SimpleExample.app */,
00E356EE1AD99517003FC87E /* ThreadExampleTests.xctest */, 00E356EE1AD99517003FC87E /* SimpleExampleTests.xctest */,
2D02E47B1E0B4A5D006451C7 /* ThreadExample-tvOS.app */, 2D02E47B1E0B4A5D006451C7 /* SimpleExample-tvOS.app */,
2D02E4901E0B4A5D006451C7 /* ThreadExample-tvOSTests.xctest */, 2D02E4901E0B4A5D006451C7 /* SimpleExample-tvOSTests.xctest */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -519,15 +539,23 @@ ...@@ -519,15 +539,23 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
C0B418EC1F6CFA3A00B9D224 /* libRCTBlob-tvOS.a */, C0B25F2F1FA51B4200BD9CA3 /* libRCTBlob-tvOS.a */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
C0B418E41F6CFA3A00B9D224 /* Products */ = { C0B25F281FA51B4100BD9CA3 /* Recovered References */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C0B418FD1F6CFA3A00B9D224 /* libRNThread.a */, 6B75FC9FDF4C40A58AD26517 /* libRNThread.a */,
);
name = "Recovered References";
sourceTree = "<group>";
};
C0B25F441FA51B4300BD9CA3 /* Products */ = {
isa = PBXGroup;
children = (
C0B25F481FA51B4300BD9CA3 /* libRNThread.a */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -535,9 +563,9 @@ ...@@ -535,9 +563,9 @@
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
00E356ED1AD99517003FC87E /* ThreadExampleTests */ = { 00E356ED1AD99517003FC87E /* SimpleExampleTests */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ThreadExampleTests" */; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */;
buildPhases = ( buildPhases = (
00E356EA1AD99517003FC87E /* Sources */, 00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */, 00E356EB1AD99517003FC87E /* Frameworks */,
...@@ -548,14 +576,14 @@ ...@@ -548,14 +576,14 @@
dependencies = ( dependencies = (
00E356F51AD99517003FC87E /* PBXTargetDependency */, 00E356F51AD99517003FC87E /* PBXTargetDependency */,
); );
name = ThreadExampleTests; name = SimpleExampleTests;
productName = ThreadExampleTests; productName = SimpleExampleTests;
productReference = 00E356EE1AD99517003FC87E /* ThreadExampleTests.xctest */; productReference = 00E356EE1AD99517003FC87E /* SimpleExampleTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test"; productType = "com.apple.product-type.bundle.unit-test";
}; };
13B07F861A680F5B00A75B9A /* ThreadExample */ = { 13B07F861A680F5B00A75B9A /* SimpleExample */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ThreadExample" */; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "SimpleExample" */;
buildPhases = ( buildPhases = (
13B07F871A680F5B00A75B9A /* Sources */, 13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8C1A680F5B00A75B9A /* Frameworks */,
...@@ -566,14 +594,14 @@ ...@@ -566,14 +594,14 @@
); );
dependencies = ( dependencies = (
); );
name = ThreadExample; name = SimpleExample;
productName = "Hello World"; productName = "Hello World";
productReference = 13B07F961A680F5B00A75B9A /* ThreadExample.app */; productReference = 13B07F961A680F5B00A75B9A /* SimpleExample.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
2D02E47A1E0B4A5D006451C7 /* ThreadExample-tvOS */ = { 2D02E47A1E0B4A5D006451C7 /* SimpleExample-tvOS */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ThreadExample-tvOS" */; buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "SimpleExample-tvOS" */;
buildPhases = ( buildPhases = (
2D02E4771E0B4A5D006451C7 /* Sources */, 2D02E4771E0B4A5D006451C7 /* Sources */,
2D02E4781E0B4A5D006451C7 /* Frameworks */, 2D02E4781E0B4A5D006451C7 /* Frameworks */,
...@@ -584,14 +612,14 @@ ...@@ -584,14 +612,14 @@
); );
dependencies = ( dependencies = (
); );
name = "ThreadExample-tvOS"; name = "SimpleExample-tvOS";
productName = "ThreadExample-tvOS"; productName = "SimpleExample-tvOS";
productReference = 2D02E47B1E0B4A5D006451C7 /* ThreadExample-tvOS.app */; productReference = 2D02E47B1E0B4A5D006451C7 /* SimpleExample-tvOS.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
2D02E48F1E0B4A5D006451C7 /* ThreadExample-tvOSTests */ = { 2D02E48F1E0B4A5D006451C7 /* SimpleExample-tvOSTests */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ThreadExample-tvOSTests" */; buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "SimpleExample-tvOSTests" */;
buildPhases = ( buildPhases = (
2D02E48C1E0B4A5D006451C7 /* Sources */, 2D02E48C1E0B4A5D006451C7 /* Sources */,
2D02E48D1E0B4A5D006451C7 /* Frameworks */, 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
...@@ -602,9 +630,9 @@ ...@@ -602,9 +630,9 @@
dependencies = ( dependencies = (
2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
); );
name = "ThreadExample-tvOSTests"; name = "SimpleExample-tvOSTests";
productName = "ThreadExample-tvOSTests"; productName = "SimpleExample-tvOSTests";
productReference = 2D02E4901E0B4A5D006451C7 /* ThreadExample-tvOSTests.xctest */; productReference = 2D02E4901E0B4A5D006451C7 /* SimpleExample-tvOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test"; productType = "com.apple.product-type.bundle.unit-test";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
...@@ -631,7 +659,7 @@ ...@@ -631,7 +659,7 @@
}; };
}; };
}; };
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ThreadExample" */; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "SimpleExample" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
developmentRegion = English; developmentRegion = English;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
...@@ -692,16 +720,16 @@ ...@@ -692,16 +720,16 @@
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
}, },
{ {
ProductGroup = C0B418E41F6CFA3A00B9D224 /* Products */; ProductGroup = C0B25F441FA51B4300BD9CA3 /* Products */;
ProjectRef = 76FA3779275F4C89AFE79AC6 /* RNThread.xcodeproj */; ProjectRef = 0BF39157221E4019BD05A50A /* RNThread.xcodeproj */;
}, },
); );
projectRoot = ""; projectRoot = "";
targets = ( targets = (
13B07F861A680F5B00A75B9A /* ThreadExample */, 13B07F861A680F5B00A75B9A /* SimpleExample */,
00E356ED1AD99517003FC87E /* ThreadExampleTests */, 00E356ED1AD99517003FC87E /* SimpleExampleTests */,
2D02E47A1E0B4A5D006451C7 /* ThreadExample-tvOS */, 2D02E47A1E0B4A5D006451C7 /* SimpleExample-tvOS */,
2D02E48F1E0B4A5D006451C7 /* ThreadExample-tvOSTests */, 2D02E48F1E0B4A5D006451C7 /* SimpleExample-tvOSTests */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
...@@ -889,18 +917,32 @@ ...@@ -889,18 +917,32 @@
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
C0B418EC1F6CFA3A00B9D224 /* libRCTBlob-tvOS.a */ = { C0B25F2F1FA51B4200BD9CA3 /* libRCTBlob-tvOS.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;
path = "libRCTBlob-tvOS.a"; path = "libRCTBlob-tvOS.a";
remoteRef = C0B418EB1F6CFA3A00B9D224 /* PBXContainerItemProxy */; remoteRef = C0B25F2E1FA51B4200BD9CA3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
C0B25F411FA51B4200BD9CA3 /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libfishhook.a;
remoteRef = C0B25F401FA51B4200BD9CA3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
C0B25F431FA51B4200BD9CA3 /* libfishhook-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libfishhook-tvOS.a";
remoteRef = C0B25F421FA51B4200BD9CA3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
C0B418FD1F6CFA3A00B9D224 /* libRNThread.a */ = { C0B25F481FA51B4300BD9CA3 /* libRNThread.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;
path = libRNThread.a; path = libRNThread.a;
remoteRef = C0B418FC1F6CFA3A00B9D224 /* PBXContainerItemProxy */; remoteRef = C0B25F471FA51B4300BD9CA3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
/* End PBXReferenceProxy section */ /* End PBXReferenceProxy section */
...@@ -917,6 +959,7 @@ ...@@ -917,6 +959,7 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
C0B25F4C1FA5236E00BD9CA3 /* worker.thread.jsbundle in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
); );
...@@ -975,7 +1018,7 @@ ...@@ -975,7 +1018,7 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
00E356F31AD99517003FC87E /* ThreadExampleTests.m in Sources */, 00E356F31AD99517003FC87E /* SimpleExampleTests.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1001,7 +1044,7 @@ ...@@ -1001,7 +1044,7 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2DCD954D1E0B4F2C00145EB5 /* ThreadExampleTests.m in Sources */, 2DCD954D1E0B4F2C00145EB5 /* SimpleExampleTests.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1010,12 +1053,12 @@ ...@@ -1010,12 +1053,12 @@
/* Begin PBXTargetDependency section */ /* Begin PBXTargetDependency section */
00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
isa = PBXTargetDependency; isa = PBXTargetDependency;
target = 13B07F861A680F5B00A75B9A /* ThreadExample */; target = 13B07F861A680F5B00A75B9A /* SimpleExample */;
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
}; };
2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
isa = PBXTargetDependency; isa = PBXTargetDependency;
target = 2D02E47A1E0B4A5D006451C7 /* ThreadExample-tvOS */; target = 2D02E47A1E0B4A5D006451C7 /* SimpleExample-tvOS */;
targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
}; };
/* End PBXTargetDependency section */ /* End PBXTargetDependency section */
...@@ -1027,7 +1070,7 @@ ...@@ -1027,7 +1070,7 @@
13B07FB21A68108700A75B9A /* Base */, 13B07FB21A68108700A75B9A /* Base */,
); );
name = LaunchScreen.xib; name = LaunchScreen.xib;
path = ThreadExample; path = SimpleExample;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXVariantGroup section */ /* End PBXVariantGroup section */
...@@ -1043,9 +1086,9 @@ ...@@ -1043,9 +1086,9 @@
); );
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/react-native-thread/ios", "$(SRCROOT)/../node_modules/react-native-threads/ios",
); );
INFOPLIST_FILE = ThreadExampleTests/Info.plist; INFOPLIST_FILE = SimpleExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
...@@ -1057,7 +1100,7 @@ ...@@ -1057,7 +1100,7 @@
"-lc++", "-lc++",
); );
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ThreadExample.app/ThreadExample"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample.app/SimpleExample";
}; };
name = Debug; name = Debug;
}; };
...@@ -1068,9 +1111,9 @@ ...@@ -1068,9 +1111,9 @@
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/react-native-thread/ios", "$(SRCROOT)/../node_modules/react-native-threads/ios",
); );
INFOPLIST_FILE = ThreadExampleTests/Info.plist; INFOPLIST_FILE = SimpleExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
...@@ -1082,7 +1125,7 @@ ...@@ -1082,7 +1125,7 @@
"-lc++", "-lc++",
); );
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ThreadExample.app/ThreadExample"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample.app/SimpleExample";
}; };
name = Release; name = Release;
}; };
...@@ -1094,16 +1137,16 @@ ...@@ -1094,16 +1137,16 @@
DEAD_CODE_STRIPPING = NO; DEAD_CODE_STRIPPING = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/react-native-thread/ios", "$(SRCROOT)/../node_modules/react-native-threads/ios",
); );
INFOPLIST_FILE = ThreadExample/Info.plist; INFOPLIST_FILE = SimpleExample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
"-lc++", "-lc++",
); );
PRODUCT_NAME = ThreadExample; PRODUCT_NAME = SimpleExample;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
}; };
name = Debug; name = Debug;
...@@ -1115,16 +1158,16 @@ ...@@ -1115,16 +1158,16 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/react-native-thread/ios", "$(SRCROOT)/../node_modules/react-native-threads/ios",
); );
INFOPLIST_FILE = ThreadExample/Info.plist; INFOPLIST_FILE = SimpleExample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
"-lc++", "-lc++",
); );
PRODUCT_NAME = ThreadExample; PRODUCT_NAME = SimpleExample;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
}; };
name = Release; name = Release;
...@@ -1143,9 +1186,9 @@ ...@@ -1143,9 +1186,9 @@
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/react-native-thread/ios", "$(SRCROOT)/../node_modules/react-native-threads/ios",
); );
INFOPLIST_FILE = "ThreadExample-tvOS/Info.plist"; INFOPLIST_FILE = "SimpleExample-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -1155,7 +1198,7 @@ ...@@ -1155,7 +1198,7 @@
"-ObjC", "-ObjC",
"-lc++", "-lc++",
); );
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ThreadExample-tvOS"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.SimpleExample-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos; SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3; TARGETED_DEVICE_FAMILY = 3;
...@@ -1177,9 +1220,9 @@ ...@@ -1177,9 +1220,9 @@
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/react-native-thread/ios", "$(SRCROOT)/../node_modules/react-native-threads/ios",
); );
INFOPLIST_FILE = "ThreadExample-tvOS/Info.plist"; INFOPLIST_FILE = "SimpleExample-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -1189,7 +1232,7 @@ ...@@ -1189,7 +1232,7 @@
"-ObjC", "-ObjC",
"-lc++", "-lc++",
); );
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ThreadExample-tvOS"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.SimpleExample-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos; SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3; TARGETED_DEVICE_FAMILY = 3;
...@@ -1208,16 +1251,16 @@ ...@@ -1208,16 +1251,16 @@
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "ThreadExample-tvOSTests/Info.plist"; INFOPLIST_FILE = "SimpleExample-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ThreadExample-tvOSTests"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.SimpleExample-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos; SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ThreadExample-tvOS.app/ThreadExample-tvOS"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample-tvOS.app/SimpleExample-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1; TVOS_DEPLOYMENT_TARGET = 10.1;
}; };
name = Debug; name = Debug;
...@@ -1233,16 +1276,16 @@ ...@@ -1233,16 +1276,16 @@
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "ThreadExample-tvOSTests/Info.plist"; INFOPLIST_FILE = "SimpleExample-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ThreadExample-tvOSTests"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.SimpleExample-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos; SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ThreadExample-tvOS.app/ThreadExample-tvOS"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SimpleExample-tvOS.app/SimpleExample-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1; TVOS_DEPLOYMENT_TARGET = 10.1;
}; };
name = Release; name = Release;
...@@ -1326,7 +1369,7 @@ ...@@ -1326,7 +1369,7 @@
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ThreadExampleTests" */ = { 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "SimpleExampleTests" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
00E356F61AD99517003FC87E /* Debug */, 00E356F61AD99517003FC87E /* Debug */,
...@@ -1335,7 +1378,7 @@ ...@@ -1335,7 +1378,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ThreadExample" */ = { 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "SimpleExample" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
13B07F941A680F5B00A75B9A /* Debug */, 13B07F941A680F5B00A75B9A /* Debug */,
...@@ -1344,7 +1387,7 @@ ...@@ -1344,7 +1387,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ThreadExample-tvOS" */ = { 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "SimpleExample-tvOS" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
2D02E4971E0B4A5E006451C7 /* Debug */, 2D02E4971E0B4A5E006451C7 /* Debug */,
...@@ -1353,7 +1396,7 @@ ...@@ -1353,7 +1396,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ThreadExample-tvOSTests" */ = { 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "SimpleExample-tvOSTests" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
2D02E4991E0B4A5E006451C7 /* Debug */, 2D02E4991E0B4A5E006451C7 /* Debug */,
...@@ -1362,7 +1405,7 @@ ...@@ -1362,7 +1405,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ThreadExample" */ = { 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "SimpleExample" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */, 83CBBA201A601CBA00E9B192 /* Debug */,
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "ThreadExample-tvOS.app" BuildableName = "SimpleExample-tvOS.app"
BlueprintName = "ThreadExample-tvOS" BlueprintName = "SimpleExample-tvOS"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildActionEntry> </BuildActionEntry>
<BuildActionEntry <BuildActionEntry
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7" BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "ThreadExample-tvOSTests.xctest" BuildableName = "SimpleExample-tvOSTests.xctest"
BlueprintName = "ThreadExample-tvOSTests" BlueprintName = "SimpleExample-tvOSTests"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildActionEntry> </BuildActionEntry>
</BuildActionEntries> </BuildActionEntries>
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7" BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "ThreadExample-tvOSTests.xctest" BuildableName = "SimpleExample-tvOSTests.xctest"
BlueprintName = "ThreadExample-tvOSTests" BlueprintName = "SimpleExample-tvOSTests"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</TestableReference> </TestableReference>
</Testables> </Testables>
...@@ -71,9 +71,9 @@ ...@@ -71,9 +71,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "ThreadExample-tvOS.app" BuildableName = "SimpleExample-tvOS.app"
BlueprintName = "ThreadExample-tvOS" BlueprintName = "SimpleExample-tvOS"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</MacroExpansion> </MacroExpansion>
<AdditionalOptions> <AdditionalOptions>
...@@ -94,9 +94,9 @@ ...@@ -94,9 +94,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "ThreadExample-tvOS.app" BuildableName = "SimpleExample-tvOS.app"
BlueprintName = "ThreadExample-tvOS" BlueprintName = "SimpleExample-tvOS"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
<AdditionalOptions> <AdditionalOptions>
...@@ -113,9 +113,9 @@ ...@@ -113,9 +113,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "ThreadExample-tvOS.app" BuildableName = "SimpleExample-tvOS.app"
BlueprintName = "ThreadExample-tvOS" BlueprintName = "SimpleExample-tvOS"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
</ProfileAction> </ProfileAction>
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ThreadExample.app" BuildableName = "SimpleExample.app"
BlueprintName = "ThreadExample" BlueprintName = "SimpleExample"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildActionEntry> </BuildActionEntry>
<BuildActionEntry <BuildActionEntry
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E" BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "ThreadExampleTests.xctest" BuildableName = "SimpleExampleTests.xctest"
BlueprintName = "ThreadExampleTests" BlueprintName = "SimpleExampleTests"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildActionEntry> </BuildActionEntry>
</BuildActionEntries> </BuildActionEntries>
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
<TestableReference <TestableReference
...@@ -61,9 +62,9 @@ ...@@ -61,9 +62,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E" BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "ThreadExampleTests.xctest" BuildableName = "SimpleExampleTests.xctest"
BlueprintName = "ThreadExampleTests" BlueprintName = "SimpleExampleTests"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</TestableReference> </TestableReference>
</Testables> </Testables>
...@@ -71,18 +72,19 @@ ...@@ -71,18 +72,19 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ThreadExample.app" BuildableName = "SimpleExample.app"
BlueprintName = "ThreadExample" BlueprintName = "SimpleExample"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</MacroExpansion> </MacroExpansion>
<AdditionalOptions> <AdditionalOptions>
</AdditionalOptions> </AdditionalOptions>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
...@@ -94,9 +96,9 @@ ...@@ -94,9 +96,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ThreadExample.app" BuildableName = "SimpleExample.app"
BlueprintName = "ThreadExample" BlueprintName = "SimpleExample"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
<AdditionalOptions> <AdditionalOptions>
...@@ -113,9 +115,9 @@ ...@@ -113,9 +115,9 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "ThreadExample.app" BuildableName = "SimpleExample.app"
BlueprintName = "ThreadExample" BlueprintName = "SimpleExample"
ReferencedContainer = "container:ThreadExample.xcodeproj"> ReferencedContainer = "container:SimpleExample.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
</ProfileAction> </ProfileAction>
......
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
{ {
NSURL *jsCodeLocation; NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"ThreadExample" moduleName:@"SimpleExample"
initialProperties:nil initialProperties:nil
launchOptions:launchOptions]; launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ThreadExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SimpleExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/> <rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>ThreadExample</string> <string>SimpleExample</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
#define TIMEOUT_SECONDS 600 #define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
@interface ThreadExampleTests : XCTestCase @interface SimpleExampleTests : XCTestCase
@end @end
@implementation ThreadExampleTests @implementation SimpleExampleTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{ {
......
fKWwYO"+62,
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
JpBŒS
\ No newline at end of file
{
"name": "SimpleExample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"build-thread-ios": "node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./ios --entry-file worker.thread.js --platform ios --bundle-output ./ios/worker.thread.jsbundle",
"build-thread-android": "node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./android/app/src/main/res/ --entry-file worker.thread.js --platform android --bundle-output ./android/app/src/main/ assets/threads/worker.thread.bundle"
},
"dependencies": {
"react": "16.0.0-beta.5",
"react-native": "0.49.5",
"react-native-threads": "file:../../"
},
"devDependencies": {
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"jest": "21.2.1",
"react-test-renderer": "16.0.0-beta.5",
"reactotron-react-native": "1.12.3"
},
"jest": {
"preset": "react-native"
}
}
import { self } from 'react-native-threads';
import './config';
let count = 0;
self.onmessage = message => {
console.tron.log(`THREAD: got message ${message}`);
count++;
self.postMessage(`Message #${count} from worker thread!`);
}
import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
rootProject.name = 'ThreadExample'
include ':react-native-thread'
project(':react-native-thread').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thread/android')
include ':app'
{
"name": "ThreadExample",
"displayName": "ThreadExample"
}
\ No newline at end of file
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
} from 'react-native';
import { Thread } from 'react-native-threads';
class ThreadExample extends Component {
componentDidMount() {
this.worker= new Thread('worker.js');
this.worker.onmessage = (message) => {
console.log("Got message from worker", message);
}
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity onPress={() => {
console.log('SENDING MESSAGE TO WORKER');
this.worker.postMessage("Hello from main thread");
}}>
<Text style={styles.welcome}>
Send message
</Text>
</TouchableOpacity>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('ThreadExample', () => ThreadExample);
{
"name": "ThreadExample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.48.3",
"react-native-threads": "file:../../"
},
"devDependencies": {
"babel-jest": "21.0.2",
"babel-preset-react-native": "4.0.0",
"jest": "21.1.0",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
import { self } from 'react-native-threads';
/*
* Web Worker
* you have access to all RN native modules (timeout, fetch, AsyncStorage, Vibration ...)
*/
// receive messages from main thread
self.onmessage = (message) => {
console.log('worker received message', message);
}
function ping() {
// send messages to main thread
console.log('SENDING PING FROM WORKER TO MAIN');
self.postMessage("Ping");
setTimeout(ping, 5000);
}
setTimeout(ping, 5000);
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment