- Create a project in XCode with the default settings
- iOS > Application > Single View Application
- Language: Swift
- Under project General settings, add ReactKit to Linked Framework and Libraries
- + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
- Now ReactKit would have been imported. Link it by choosing it from the list.
- + > lib.ReactKit.a
- Under project Build Settings,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, user = require('./routes/user') | |
, common = require('./routes/common') | |
, fs = require('fs') | |
, http = require('http') | |
, util = require('util') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* You should replace path/to/project/node_modules/react-native-webview-crosswalk/index.android.js with current file. | |
* [email protected] & android 4.4.2 checked. | |
*/ | |
import React, { PropTypes,PureComponent } from 'react'; | |
import ReactNative, { requireNativeComponent, View } from 'react-native'; | |
var { | |
NativeModules: { UIManager, CrosswalkWebViewManager: { JSNavigationScheme } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Main.js | |
... | |
<View style={{height:800}}> | |
<TouchableHighlight onPress={ this.inj }> | |
<Text>Fire</Text> | |
</TouchableHighlight> | |
<CrosswalkWebView | |
source = {{ uri:'http://url.any.com' }} | |
javaScriptEnabled={true} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AutoExpandingTextInput extends React.Component { | |
state: any; | |
constructor(props) { | |
super(props); | |
this.state = {text: '', height: 0}; | |
} | |
render() { | |
return ( | |
<TextInput |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2018-01-25T09:40:08.610Z","extensionVersion":"v2.8.7"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Text, View, StyleSheet,Image,TouchableOpacity } from 'react-native'; | |
export default class App extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Image | |
source={{ uri:"https://preview.ibb.co/e883Jw/2010_brown_bear.jpg" }} | |
style={ styles.imageWrapper }> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -e " | |
\e[41m\e[1m FBI \e[21mWARNING \e[49m | |
Federal Law probides servere civil and criminal penaltaties for | |
the unauthorized reproduction, distribution, or exhibition of | |
copyrighted mothion pictures(Title 17,United States Code, | |
Sections 501 and 508).The Federal Bureau of Investigation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run from locally running dev server | |
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; | |
// Run on device with code coming from dev server on PC (change the IP to your PCs IP) | |
// jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.168:8081/index.ios.bundle"]; | |
// For production load from pre-bundled file on disk. To re-generate the static bundle, run | |
// $ curl http://localhost:8081/index.ios.bundle -o main.jsbundle | |
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; | |