├── .npmignore
├── Examples
├── .flowconfig
├── .gitignore
├── .npmignore
├── App.js
├── Examples.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Examples.xcscheme
├── ExamplesTests
│ ├── ExamplesTests.m
│ └── Info.plist
├── Screenshots
│ └── twitter-navbar.gif
├── components
│ ├── EmptyView.js
│ ├── ExampleList.js
│ ├── ExampleTitle.js
│ ├── NavBarButton.js
│ └── twitter
│ │ ├── Scene.js
│ │ └── Title.js
├── iOS
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── react_logo.imageset
│ │ │ ├── Contents.json
│ │ │ ├── react_logo-1.png
│ │ │ ├── react_logo-2.png
│ │ │ └── react_logo.png
│ ├── Info.plist
│ ├── main.jsbundle
│ └── main.m
├── index.ios.js
└── package.json
├── LICENSE
├── README.md
├── components
└── NavigationBar.js
├── index.js
└── package.json
/.npmignore:
--------------------------------------------------------------------------------
1 | Examples/
--------------------------------------------------------------------------------
/Examples/.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/vendor/core/ExecutionEnvironment.js
13 | .*/node_modules/react-tools/src/browser/eventPlugins/ResponderEventPlugin.js
14 | .*/node_modules/react-tools/src/browser/ui/React.js
15 | .*/node_modules/react-tools/src/core/ReactInstanceHandles.js
16 | .*/node_modules/react-tools/src/event/EventPropagators.js
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 | suppress_type=$FlowIssue
36 | suppress_type=$FlowFixMe
37 | suppress_type=$FixMe
38 |
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-3]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-3]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42 |
43 | [version]
44 | 0.13.1
45 |
--------------------------------------------------------------------------------
/Examples/.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 |
--------------------------------------------------------------------------------
/Examples/.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 |
--------------------------------------------------------------------------------
/Examples/App.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | Navigator,
9 | } = React;
10 |
11 | var Toolkit = require('react-native-toolkit');
12 | var {
13 | NavigationBar,
14 | } = Toolkit;
15 |
16 | var ExampleList = require('./components/ExampleList');
17 | var NavBarButton = require('./components/NavBarButton');
18 | var ExampleTitle = require('./components/ExampleTitle');
19 |
20 | class App extends React.Component {
21 |
22 | render() {
23 | return (
24 |
25 | }
27 | renderScene={this._renderScene}
28 | initialRoute={{
29 | statusBarStyle: 'default',
30 | component: ExampleList,
31 | leftButton: {
32 | component: NavBarButton,
33 | passProps: {
34 | icon: 'awesome|bars',
35 | onPress: this._onMenuPressed.bind(this)
36 | }
37 | },
38 | customTitle: {
39 | component: ExampleTitle
40 | }
41 | }} />
42 |
43 | );
44 | }
45 |
46 | _renderScene(route, navigator) {
47 | var props = Object.assign({}, { navigator: navigator }, route.passProps);
48 | return React.createElement(route.component, props);
49 | }
50 |
51 | _onMenuPressed() {
52 | alert("Menu pressed!");
53 | }
54 |
55 | }
56 |
57 | var styles = StyleSheet.create({
58 |
59 | container: {
60 | flex: 1
61 | },
62 |
63 | });
64 |
65 | module.exports = App;
--------------------------------------------------------------------------------
/Examples/Examples.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 /* ExamplesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExamplesTests.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 | 49836F091B793F6B0064B3A7 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 49836F081B793F6B0064B3A7 /* FontAwesome.ttf */; };
26 | 49836F211B798EBA0064B3A7 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 49836F201B798EBA0064B3A7 /* Ionicons.ttf */; };
27 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
28 | /* End PBXBuildFile section */
29 |
30 | /* Begin PBXContainerItemProxy section */
31 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
34 | proxyType = 2;
35 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
36 | remoteInfo = RCTActionSheet;
37 | };
38 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
39 | isa = PBXContainerItemProxy;
40 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
41 | proxyType = 2;
42 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
43 | remoteInfo = RCTGeolocation;
44 | };
45 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
46 | isa = PBXContainerItemProxy;
47 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
48 | proxyType = 2;
49 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
50 | remoteInfo = RCTImage;
51 | };
52 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
53 | isa = PBXContainerItemProxy;
54 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
55 | proxyType = 2;
56 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
57 | remoteInfo = RCTNetwork;
58 | };
59 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
60 | isa = PBXContainerItemProxy;
61 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
62 | proxyType = 2;
63 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
64 | remoteInfo = RCTVibration;
65 | };
66 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
67 | isa = PBXContainerItemProxy;
68 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
69 | proxyType = 1;
70 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
71 | remoteInfo = Examples;
72 | };
73 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
74 | isa = PBXContainerItemProxy;
75 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
76 | proxyType = 2;
77 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
78 | remoteInfo = RCTSettings;
79 | };
80 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
81 | isa = PBXContainerItemProxy;
82 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
83 | proxyType = 2;
84 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
85 | remoteInfo = RCTWebSocket;
86 | };
87 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
88 | isa = PBXContainerItemProxy;
89 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
90 | proxyType = 2;
91 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
92 | remoteInfo = React;
93 | };
94 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
95 | isa = PBXContainerItemProxy;
96 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
97 | proxyType = 2;
98 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
99 | remoteInfo = RCTLinking;
100 | };
101 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
102 | isa = PBXContainerItemProxy;
103 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
104 | proxyType = 2;
105 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
106 | remoteInfo = RCTText;
107 | };
108 | /* End PBXContainerItemProxy section */
109 |
110 | /* Begin PBXFileReference section */
111 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = ""; };
112 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
113 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
114 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
115 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
116 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
117 | 00E356EE1AD99517003FC87E /* ExamplesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExamplesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
118 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
119 | 00E356F21AD99517003FC87E /* ExamplesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExamplesTests.m; sourceTree = ""; };
120 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
121 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
122 | 13B07F961A680F5B00A75B9A /* Examples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Examples.app; sourceTree = BUILT_PRODUCTS_DIR; };
123 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = ""; };
124 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = ""; };
125 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
126 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = ""; };
127 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = ""; };
128 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = ""; };
129 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
130 | 49836F081B793F6B0064B3A7 /* FontAwesome.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FontAwesome.ttf; path = "node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = ""; };
131 | 49836F201B798EBA0064B3A7 /* Ionicons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Ionicons.ttf; path = "node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; };
132 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
133 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
134 | /* End PBXFileReference section */
135 |
136 | /* Begin PBXFrameworksBuildPhase section */
137 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
138 | isa = PBXFrameworksBuildPhase;
139 | buildActionMask = 2147483647;
140 | files = (
141 | );
142 | runOnlyForDeploymentPostprocessing = 0;
143 | };
144 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
145 | isa = PBXFrameworksBuildPhase;
146 | buildActionMask = 2147483647;
147 | files = (
148 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
149 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
150 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
151 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
152 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
153 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
154 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
155 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
156 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
157 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
158 | );
159 | runOnlyForDeploymentPostprocessing = 0;
160 | };
161 | /* End PBXFrameworksBuildPhase section */
162 |
163 | /* Begin PBXGroup section */
164 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
165 | isa = PBXGroup;
166 | children = (
167 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
168 | );
169 | name = Products;
170 | sourceTree = "";
171 | };
172 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
173 | isa = PBXGroup;
174 | children = (
175 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
176 | );
177 | name = Products;
178 | sourceTree = "";
179 | };
180 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
181 | isa = PBXGroup;
182 | children = (
183 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
184 | );
185 | name = Products;
186 | sourceTree = "";
187 | };
188 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
189 | isa = PBXGroup;
190 | children = (
191 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
192 | );
193 | name = Products;
194 | sourceTree = "";
195 | };
196 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
197 | isa = PBXGroup;
198 | children = (
199 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
200 | );
201 | name = Products;
202 | sourceTree = "";
203 | };
204 | 00E356EF1AD99517003FC87E /* ExamplesTests */ = {
205 | isa = PBXGroup;
206 | children = (
207 | 00E356F21AD99517003FC87E /* ExamplesTests.m */,
208 | 00E356F01AD99517003FC87E /* Supporting Files */,
209 | );
210 | path = ExamplesTests;
211 | sourceTree = "";
212 | };
213 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
214 | isa = PBXGroup;
215 | children = (
216 | 00E356F11AD99517003FC87E /* Info.plist */,
217 | );
218 | name = "Supporting Files";
219 | sourceTree = "";
220 | };
221 | 139105B71AF99BAD00B5F7CC /* Products */ = {
222 | isa = PBXGroup;
223 | children = (
224 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
225 | );
226 | name = Products;
227 | sourceTree = "";
228 | };
229 | 139FDEE71B06529A00C62182 /* Products */ = {
230 | isa = PBXGroup;
231 | children = (
232 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
233 | );
234 | name = Products;
235 | sourceTree = "";
236 | };
237 | 13B07FAE1A68108700A75B9A /* Examples */ = {
238 | isa = PBXGroup;
239 | children = (
240 | 49836F201B798EBA0064B3A7 /* Ionicons.ttf */,
241 | 49836F081B793F6B0064B3A7 /* FontAwesome.ttf */,
242 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
243 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
244 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
245 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
246 | 13B07FB61A68108700A75B9A /* Info.plist */,
247 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
248 | 13B07FB71A68108700A75B9A /* main.m */,
249 | );
250 | name = Examples;
251 | sourceTree = "";
252 | };
253 | 146834001AC3E56700842450 /* Products */ = {
254 | isa = PBXGroup;
255 | children = (
256 | 146834041AC3E56700842450 /* libReact.a */,
257 | );
258 | name = Products;
259 | sourceTree = "";
260 | };
261 | 78C398B11ACF4ADC00677621 /* Products */ = {
262 | isa = PBXGroup;
263 | children = (
264 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
265 | );
266 | name = Products;
267 | sourceTree = "";
268 | };
269 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
270 | isa = PBXGroup;
271 | children = (
272 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
273 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
274 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
275 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
276 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
277 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
278 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
279 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
280 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
281 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
282 | );
283 | name = Libraries;
284 | sourceTree = "";
285 | };
286 | 832341B11AAA6A8300B99B32 /* Products */ = {
287 | isa = PBXGroup;
288 | children = (
289 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
290 | );
291 | name = Products;
292 | sourceTree = "";
293 | };
294 | 83CBB9F61A601CBA00E9B192 = {
295 | isa = PBXGroup;
296 | children = (
297 | 13B07FAE1A68108700A75B9A /* Examples */,
298 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
299 | 00E356EF1AD99517003FC87E /* ExamplesTests */,
300 | 83CBBA001A601CBA00E9B192 /* Products */,
301 | );
302 | indentWidth = 2;
303 | sourceTree = "";
304 | tabWidth = 2;
305 | };
306 | 83CBBA001A601CBA00E9B192 /* Products */ = {
307 | isa = PBXGroup;
308 | children = (
309 | 13B07F961A680F5B00A75B9A /* Examples.app */,
310 | 00E356EE1AD99517003FC87E /* ExamplesTests.xctest */,
311 | );
312 | name = Products;
313 | sourceTree = "";
314 | };
315 | /* End PBXGroup section */
316 |
317 | /* Begin PBXNativeTarget section */
318 | 00E356ED1AD99517003FC87E /* ExamplesTests */ = {
319 | isa = PBXNativeTarget;
320 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExamplesTests" */;
321 | buildPhases = (
322 | 00E356EA1AD99517003FC87E /* Sources */,
323 | 00E356EB1AD99517003FC87E /* Frameworks */,
324 | 00E356EC1AD99517003FC87E /* Resources */,
325 | );
326 | buildRules = (
327 | );
328 | dependencies = (
329 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
330 | );
331 | name = ExamplesTests;
332 | productName = ExamplesTests;
333 | productReference = 00E356EE1AD99517003FC87E /* ExamplesTests.xctest */;
334 | productType = "com.apple.product-type.bundle.unit-test";
335 | };
336 | 13B07F861A680F5B00A75B9A /* Examples */ = {
337 | isa = PBXNativeTarget;
338 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Examples" */;
339 | buildPhases = (
340 | 13B07F871A680F5B00A75B9A /* Sources */,
341 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
342 | 13B07F8E1A680F5B00A75B9A /* Resources */,
343 | );
344 | buildRules = (
345 | );
346 | dependencies = (
347 | );
348 | name = Examples;
349 | productName = "Hello World";
350 | productReference = 13B07F961A680F5B00A75B9A /* Examples.app */;
351 | productType = "com.apple.product-type.application";
352 | };
353 | /* End PBXNativeTarget section */
354 |
355 | /* Begin PBXProject section */
356 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
357 | isa = PBXProject;
358 | attributes = {
359 | LastUpgradeCheck = 0610;
360 | ORGANIZATIONNAME = Facebook;
361 | TargetAttributes = {
362 | 00E356ED1AD99517003FC87E = {
363 | CreatedOnToolsVersion = 6.2;
364 | TestTargetID = 13B07F861A680F5B00A75B9A;
365 | };
366 | };
367 | };
368 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Examples" */;
369 | compatibilityVersion = "Xcode 3.2";
370 | developmentRegion = English;
371 | hasScannedForEncodings = 0;
372 | knownRegions = (
373 | en,
374 | Base,
375 | );
376 | mainGroup = 83CBB9F61A601CBA00E9B192;
377 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
378 | projectDirPath = "";
379 | projectReferences = (
380 | {
381 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
382 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
383 | },
384 | {
385 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
386 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
387 | },
388 | {
389 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
390 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
391 | },
392 | {
393 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
394 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
395 | },
396 | {
397 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
398 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
399 | },
400 | {
401 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
402 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
403 | },
404 | {
405 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
406 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
407 | },
408 | {
409 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
410 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
411 | },
412 | {
413 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
414 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
415 | },
416 | {
417 | ProductGroup = 146834001AC3E56700842450 /* Products */;
418 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
419 | },
420 | );
421 | projectRoot = "";
422 | targets = (
423 | 13B07F861A680F5B00A75B9A /* Examples */,
424 | 00E356ED1AD99517003FC87E /* ExamplesTests */,
425 | );
426 | };
427 | /* End PBXProject section */
428 |
429 | /* Begin PBXReferenceProxy section */
430 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
431 | isa = PBXReferenceProxy;
432 | fileType = archive.ar;
433 | path = libRCTActionSheet.a;
434 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
435 | sourceTree = BUILT_PRODUCTS_DIR;
436 | };
437 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
438 | isa = PBXReferenceProxy;
439 | fileType = archive.ar;
440 | path = libRCTGeolocation.a;
441 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
442 | sourceTree = BUILT_PRODUCTS_DIR;
443 | };
444 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
445 | isa = PBXReferenceProxy;
446 | fileType = archive.ar;
447 | path = libRCTImage.a;
448 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
449 | sourceTree = BUILT_PRODUCTS_DIR;
450 | };
451 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
452 | isa = PBXReferenceProxy;
453 | fileType = archive.ar;
454 | path = libRCTNetwork.a;
455 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
456 | sourceTree = BUILT_PRODUCTS_DIR;
457 | };
458 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
459 | isa = PBXReferenceProxy;
460 | fileType = archive.ar;
461 | path = libRCTVibration.a;
462 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
463 | sourceTree = BUILT_PRODUCTS_DIR;
464 | };
465 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
466 | isa = PBXReferenceProxy;
467 | fileType = archive.ar;
468 | path = libRCTSettings.a;
469 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
470 | sourceTree = BUILT_PRODUCTS_DIR;
471 | };
472 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
473 | isa = PBXReferenceProxy;
474 | fileType = archive.ar;
475 | path = libRCTWebSocket.a;
476 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
477 | sourceTree = BUILT_PRODUCTS_DIR;
478 | };
479 | 146834041AC3E56700842450 /* libReact.a */ = {
480 | isa = PBXReferenceProxy;
481 | fileType = archive.ar;
482 | path = libReact.a;
483 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
484 | sourceTree = BUILT_PRODUCTS_DIR;
485 | };
486 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
487 | isa = PBXReferenceProxy;
488 | fileType = archive.ar;
489 | path = libRCTLinking.a;
490 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
491 | sourceTree = BUILT_PRODUCTS_DIR;
492 | };
493 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
494 | isa = PBXReferenceProxy;
495 | fileType = archive.ar;
496 | path = libRCTText.a;
497 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
498 | sourceTree = BUILT_PRODUCTS_DIR;
499 | };
500 | /* End PBXReferenceProxy section */
501 |
502 | /* Begin PBXResourcesBuildPhase section */
503 | 00E356EC1AD99517003FC87E /* Resources */ = {
504 | isa = PBXResourcesBuildPhase;
505 | buildActionMask = 2147483647;
506 | files = (
507 | );
508 | runOnlyForDeploymentPostprocessing = 0;
509 | };
510 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
511 | isa = PBXResourcesBuildPhase;
512 | buildActionMask = 2147483647;
513 | files = (
514 | 49836F211B798EBA0064B3A7 /* Ionicons.ttf in Resources */,
515 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */,
516 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
517 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
518 | 49836F091B793F6B0064B3A7 /* FontAwesome.ttf in Resources */,
519 | );
520 | runOnlyForDeploymentPostprocessing = 0;
521 | };
522 | /* End PBXResourcesBuildPhase section */
523 |
524 | /* Begin PBXSourcesBuildPhase section */
525 | 00E356EA1AD99517003FC87E /* Sources */ = {
526 | isa = PBXSourcesBuildPhase;
527 | buildActionMask = 2147483647;
528 | files = (
529 | 00E356F31AD99517003FC87E /* ExamplesTests.m in Sources */,
530 | );
531 | runOnlyForDeploymentPostprocessing = 0;
532 | };
533 | 13B07F871A680F5B00A75B9A /* Sources */ = {
534 | isa = PBXSourcesBuildPhase;
535 | buildActionMask = 2147483647;
536 | files = (
537 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
538 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
539 | );
540 | runOnlyForDeploymentPostprocessing = 0;
541 | };
542 | /* End PBXSourcesBuildPhase section */
543 |
544 | /* Begin PBXTargetDependency section */
545 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
546 | isa = PBXTargetDependency;
547 | target = 13B07F861A680F5B00A75B9A /* Examples */;
548 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
549 | };
550 | /* End PBXTargetDependency section */
551 |
552 | /* Begin PBXVariantGroup section */
553 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
554 | isa = PBXVariantGroup;
555 | children = (
556 | 13B07FB21A68108700A75B9A /* Base */,
557 | );
558 | name = LaunchScreen.xib;
559 | path = iOS;
560 | sourceTree = "";
561 | };
562 | /* End PBXVariantGroup section */
563 |
564 | /* Begin XCBuildConfiguration section */
565 | 00E356F61AD99517003FC87E /* Debug */ = {
566 | isa = XCBuildConfiguration;
567 | buildSettings = {
568 | BUNDLE_LOADER = "$(TEST_HOST)";
569 | FRAMEWORK_SEARCH_PATHS = (
570 | "$(SDKROOT)/Developer/Library/Frameworks",
571 | "$(inherited)",
572 | );
573 | GCC_PREPROCESSOR_DEFINITIONS = (
574 | "DEBUG=1",
575 | "$(inherited)",
576 | );
577 | INFOPLIST_FILE = ExamplesTests/Info.plist;
578 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
579 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
580 | PRODUCT_NAME = "$(TARGET_NAME)";
581 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Examples.app/Examples";
582 | };
583 | name = Debug;
584 | };
585 | 00E356F71AD99517003FC87E /* Release */ = {
586 | isa = XCBuildConfiguration;
587 | buildSettings = {
588 | BUNDLE_LOADER = "$(TEST_HOST)";
589 | COPY_PHASE_STRIP = NO;
590 | FRAMEWORK_SEARCH_PATHS = (
591 | "$(SDKROOT)/Developer/Library/Frameworks",
592 | "$(inherited)",
593 | );
594 | INFOPLIST_FILE = ExamplesTests/Info.plist;
595 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
596 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
597 | PRODUCT_NAME = "$(TARGET_NAME)";
598 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Examples.app/Examples";
599 | };
600 | name = Release;
601 | };
602 | 13B07F941A680F5B00A75B9A /* Debug */ = {
603 | isa = XCBuildConfiguration;
604 | buildSettings = {
605 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
606 | HEADER_SEARCH_PATHS = (
607 | "$(inherited)",
608 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
609 | "$(SRCROOT)/node_modules/react-native/React/**",
610 | );
611 | INFOPLIST_FILE = iOS/Info.plist;
612 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
613 | OTHER_LDFLAGS = "-ObjC";
614 | PRODUCT_NAME = Examples;
615 | };
616 | name = Debug;
617 | };
618 | 13B07F951A680F5B00A75B9A /* Release */ = {
619 | isa = XCBuildConfiguration;
620 | buildSettings = {
621 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
622 | HEADER_SEARCH_PATHS = (
623 | "$(inherited)",
624 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
625 | "$(SRCROOT)/node_modules/react-native/React/**",
626 | );
627 | INFOPLIST_FILE = iOS/Info.plist;
628 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
629 | OTHER_LDFLAGS = "-ObjC";
630 | PRODUCT_NAME = Examples;
631 | };
632 | name = Release;
633 | };
634 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
635 | isa = XCBuildConfiguration;
636 | buildSettings = {
637 | ALWAYS_SEARCH_USER_PATHS = NO;
638 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
639 | CLANG_CXX_LIBRARY = "libc++";
640 | CLANG_ENABLE_MODULES = YES;
641 | CLANG_ENABLE_OBJC_ARC = YES;
642 | CLANG_WARN_BOOL_CONVERSION = YES;
643 | CLANG_WARN_CONSTANT_CONVERSION = YES;
644 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
645 | CLANG_WARN_EMPTY_BODY = YES;
646 | CLANG_WARN_ENUM_CONVERSION = YES;
647 | CLANG_WARN_INT_CONVERSION = YES;
648 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
649 | CLANG_WARN_UNREACHABLE_CODE = YES;
650 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
651 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
652 | COPY_PHASE_STRIP = NO;
653 | ENABLE_STRICT_OBJC_MSGSEND = YES;
654 | GCC_C_LANGUAGE_STANDARD = gnu99;
655 | GCC_DYNAMIC_NO_PIC = NO;
656 | GCC_OPTIMIZATION_LEVEL = 0;
657 | GCC_PREPROCESSOR_DEFINITIONS = (
658 | "DEBUG=1",
659 | "$(inherited)",
660 | );
661 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
662 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
663 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
664 | GCC_WARN_UNDECLARED_SELECTOR = YES;
665 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
666 | GCC_WARN_UNUSED_FUNCTION = YES;
667 | GCC_WARN_UNUSED_VARIABLE = YES;
668 | HEADER_SEARCH_PATHS = (
669 | "$(inherited)",
670 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
671 | "$(SRCROOT)/node_modules/react-native/React/**",
672 | );
673 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
674 | MTL_ENABLE_DEBUG_INFO = YES;
675 | ONLY_ACTIVE_ARCH = YES;
676 | SDKROOT = iphoneos;
677 | };
678 | name = Debug;
679 | };
680 | 83CBBA211A601CBA00E9B192 /* Release */ = {
681 | isa = XCBuildConfiguration;
682 | buildSettings = {
683 | ALWAYS_SEARCH_USER_PATHS = NO;
684 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
685 | CLANG_CXX_LIBRARY = "libc++";
686 | CLANG_ENABLE_MODULES = YES;
687 | CLANG_ENABLE_OBJC_ARC = YES;
688 | CLANG_WARN_BOOL_CONVERSION = YES;
689 | CLANG_WARN_CONSTANT_CONVERSION = YES;
690 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
691 | CLANG_WARN_EMPTY_BODY = YES;
692 | CLANG_WARN_ENUM_CONVERSION = YES;
693 | CLANG_WARN_INT_CONVERSION = YES;
694 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
695 | CLANG_WARN_UNREACHABLE_CODE = YES;
696 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
697 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
698 | COPY_PHASE_STRIP = YES;
699 | ENABLE_NS_ASSERTIONS = NO;
700 | ENABLE_STRICT_OBJC_MSGSEND = YES;
701 | GCC_C_LANGUAGE_STANDARD = gnu99;
702 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
703 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
704 | GCC_WARN_UNDECLARED_SELECTOR = YES;
705 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
706 | GCC_WARN_UNUSED_FUNCTION = YES;
707 | GCC_WARN_UNUSED_VARIABLE = YES;
708 | HEADER_SEARCH_PATHS = (
709 | "$(inherited)",
710 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
711 | "$(SRCROOT)/node_modules/react-native/React/**",
712 | );
713 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
714 | MTL_ENABLE_DEBUG_INFO = NO;
715 | SDKROOT = iphoneos;
716 | VALIDATE_PRODUCT = YES;
717 | };
718 | name = Release;
719 | };
720 | /* End XCBuildConfiguration section */
721 |
722 | /* Begin XCConfigurationList section */
723 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExamplesTests" */ = {
724 | isa = XCConfigurationList;
725 | buildConfigurations = (
726 | 00E356F61AD99517003FC87E /* Debug */,
727 | 00E356F71AD99517003FC87E /* Release */,
728 | );
729 | defaultConfigurationIsVisible = 0;
730 | defaultConfigurationName = Release;
731 | };
732 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Examples" */ = {
733 | isa = XCConfigurationList;
734 | buildConfigurations = (
735 | 13B07F941A680F5B00A75B9A /* Debug */,
736 | 13B07F951A680F5B00A75B9A /* Release */,
737 | );
738 | defaultConfigurationIsVisible = 0;
739 | defaultConfigurationName = Release;
740 | };
741 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Examples" */ = {
742 | isa = XCConfigurationList;
743 | buildConfigurations = (
744 | 83CBBA201A601CBA00E9B192 /* Debug */,
745 | 83CBBA211A601CBA00E9B192 /* Release */,
746 | );
747 | defaultConfigurationIsVisible = 0;
748 | defaultConfigurationName = Release;
749 | };
750 | /* End XCConfigurationList section */
751 | };
752 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
753 | }
754 |
--------------------------------------------------------------------------------
/Examples/Examples.xcodeproj/xcshareddata/xcschemes/Examples.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 |
--------------------------------------------------------------------------------
/Examples/ExamplesTests/ExamplesTests.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 ExamplesTests : XCTestCase
21 |
22 | @end
23 |
24 | @implementation ExamplesTests
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 |
--------------------------------------------------------------------------------
/Examples/ExamplesTests/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 |
--------------------------------------------------------------------------------
/Examples/Screenshots/twitter-navbar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marty-wang/react-native-toolkit/c55a9005484631edeb5005d043cbedd2a289efea/Examples/Screenshots/twitter-navbar.gif
--------------------------------------------------------------------------------
/Examples/components/EmptyView.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | } = React;
9 |
10 | class EmptyView extends React.Component {
11 |
12 | render() {
13 | return (
14 |
15 | { this.props.message }
16 |
17 | );
18 | }
19 |
20 | }
21 |
22 | module.exports = EmptyView;
--------------------------------------------------------------------------------
/Examples/components/ExampleList.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | ListView,
9 | TouchableHighlight,
10 | PixelRatio,
11 | } = React;
12 |
13 | var EmptyView = require('./EmptyView');
14 | var NavBarButton = require('./NavBarButton');
15 |
16 | var TwitterTitle = require('./twitter/Title');
17 | var TwitterScene = require('./twitter/Scene');
18 |
19 | class ExampleList extends React.Component {
20 |
21 | constructor(props) {
22 | super(props);
23 |
24 | var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
25 |
26 | var items = [{
27 | id: 'twitter',
28 | label: 'Twitter style navigation bar',
29 | }, {
30 | id: 'more',
31 | label: 'More to come...'
32 | }];
33 |
34 | this.state = {
35 | dataSource: ds.cloneWithRows(items),
36 | };
37 | }
38 |
39 | render() {
40 | return (
41 |
42 |
46 |
47 | );
48 | }
49 |
50 | _renderRow(rowData) {
51 | var self = this;
52 |
53 | return (
54 |
55 |
56 |
57 | {rowData.label}
58 |
59 |
60 |
61 |
62 | );
63 | }
64 |
65 | _onRowPressed(rowData) {
66 | var route;
67 |
68 | switch(rowData.id) {
69 | case 'twitter':
70 | route = {
71 | statusBarStyle: 'light-content',
72 | component: TwitterScene,
73 | passProps: {
74 | message: rowData.label
75 | },
76 | customTitle: {
77 | component: TwitterTitle,
78 | passProps: {
79 | text: 'Home'
80 | }
81 | },
82 | barStyle: {
83 | backgroundColor: '#60B5F0'
84 | },
85 | titleStyle: {
86 | color: 'white',
87 | fontSize: 22,
88 | },
89 | leftButton: {
90 | component: NavBarButton,
91 | passProps: {
92 | icon: 'awesome|user-plus',
93 | color: 'white',
94 |
95 | }
96 | },
97 | rightButton: {
98 | component: NavBarButton,
99 | passProps: {
100 | icon: 'awesome|pencil',
101 | color: 'white',
102 | }
103 | }
104 | };
105 | break;
106 | }
107 |
108 | route && this.props.navigator.push(route);
109 | }
110 |
111 | }
112 |
113 | var styles = StyleSheet.create({
114 |
115 | listContainer: {
116 | flex: 1,
117 | paddingTop: 44
118 | },
119 |
120 | list: {
121 | backgroundColor: '#eeeeee',
122 | },
123 |
124 | rowContainer: {
125 | backgroundColor: '#eaeaea'
126 | },
127 |
128 | row: {
129 | backgroundColor: 'white',
130 | justifyContent: 'center',
131 | paddingHorizontal: 15,
132 | paddingVertical: 8,
133 | },
134 |
135 | rowTitleText: {
136 | fontSize: 17,
137 | fontWeight: '500',
138 | },
139 |
140 | separator: {
141 | height: 1 / PixelRatio.get(),
142 | backgroundColor: '#bbbbbb',
143 | },
144 |
145 | });
146 |
147 | module.exports = ExampleList;
--------------------------------------------------------------------------------
/Examples/components/ExampleTitle.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | Image,
9 | } = React;
10 |
11 | class ExampleTitle extends React.Component {
12 |
13 | render() {
14 | return (
15 |
16 |
18 | Examples
19 |
20 | );
21 | }
22 |
23 | }
24 |
25 | var styles = StyleSheet.create({
26 |
27 | container: {
28 | flex: 1,
29 | justifyContent:'center',
30 | alignItems: 'center',
31 | flexDirection: 'row'
32 | },
33 |
34 | logo: {
35 | width: 32,
36 | height: 32,
37 | borderRadius: 16
38 | },
39 |
40 | text: {
41 | fontSize: 20,
42 | fontWeight: 'bold',
43 | marginLeft: 10,
44 | }
45 |
46 | });
47 |
48 | module.exports = ExampleTitle;
--------------------------------------------------------------------------------
/Examples/components/NavBarButton.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | TouchableOpacity,
9 | } = React;
10 |
11 | var Icon = require('react-native-vector-icons/FontAwesome');
12 |
13 | class NavBarButton extends React.Component {
14 |
15 | render() {
16 | var self = this;
17 |
18 | return (
19 |
20 |
21 | { this._createIconElement(this.props.icon) }
22 |
23 |
24 | );
25 | }
26 |
27 | _createIconElement(icon) {
28 | var segments = icon.split('|');
29 | var iconSource = segments[0];
30 | var iconName = segments[1];
31 | var Icon;
32 |
33 | switch(iconSource) {
34 | case 'ion':
35 | Icon = this._getIonIcon();
36 | break;
37 | case 'awesome':
38 | default:
39 | Icon = this._getAwesomeIcon();
40 | break;
41 | }
42 |
43 | return
44 | }
45 |
46 | _getAwesomeIcon() {
47 | if (!this._awesomeIcon) {
48 | this._awesomeIcon = require('react-native-vector-icons/FontAwesome');
49 | }
50 | return this._awesomeIcon;
51 | }
52 |
53 | _getIonIcon() {
54 | if (!this._ionIcon) {
55 | this._ionIcon = require('react-native-vector-icons/Ionicons');
56 | }
57 | return this._ionIcon;
58 | }
59 | }
60 |
61 | var styles = StyleSheet.create({
62 |
63 | container: {
64 | flex: 1,
65 | justifyContent: 'center',
66 | alignItems: 'center',
67 | },
68 |
69 | icon: {
70 | padding: 6
71 | }
72 |
73 | });
74 |
75 | module.exports = NavBarButton;
--------------------------------------------------------------------------------
/Examples/components/twitter/Scene.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | TouchableOpacity,
9 | } = React;
10 |
11 | class Scene extends React.Component {
12 |
13 | render() {
14 | var self = this;
15 |
16 | var highlights = [
17 | "Custom navigation bar style per scene, including text color, background color, bottom border, shadow and etc",
18 | "Custom title, left, right and back components of the navigation bar per scene",
19 | "Crossfade effect on the navigation bar during scene transition",
20 | "Adjustable status bar style to match with the navigation bar style"
21 | ];
22 |
23 | var highlightElements = highlights.map((highlight) => {
24 | return (
25 |
26 | {highlight}
27 |
28 |
29 | );
30 | });
31 |
32 | return (
33 |
34 |
35 |
36 | Back to Examples List
37 |
38 |
39 |
40 | Highlights:
41 | { highlightElements }
42 |
43 |
44 | );
45 | }
46 |
47 | _onBackPressed() {
48 | this.props.navigator.pop();
49 | }
50 |
51 | }
52 |
53 | var styles = StyleSheet.create({
54 |
55 | container: {
56 | flex: 1,
57 | paddingTop: 64,
58 | backgroundColor: '#eeeeee'
59 | },
60 |
61 | backContainer: {
62 | padding: 10,
63 | },
64 |
65 | highlights: {
66 | flex: 1,
67 | backgroundColor: '#a6a6a6',
68 | padding: 10
69 | },
70 |
71 | highlightTitle: {
72 | fontWeight: 'bold',
73 | fontSize: 18,
74 | color: 'white',
75 | paddingBottom: 4
76 | },
77 |
78 | highlight: {
79 | marginVertical: 4,
80 | color: 'white'
81 | }
82 |
83 | });
84 |
85 | module.exports = Scene;
--------------------------------------------------------------------------------
/Examples/components/twitter/Title.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | View,
8 | TextInput,
9 | } = React;
10 |
11 | var NavBarButton = require('../NavBarButton');
12 |
13 | class Title extends React.Component {
14 |
15 | constructor(props) {
16 | super(props);
17 |
18 | this.state = {
19 | searchEnabled: false,
20 | searchText: ""
21 | };
22 | }
23 |
24 | render() {
25 | var self = this;
26 |
27 | if (!this.state.searchEnabled) {
28 | return (
29 |
30 |
31 | {this.props.text}
32 |
33 |
34 |
35 |
36 |
37 | );
38 | } else {
39 | return (
40 |
41 | this.setState({searchText: text})}
46 | value={this.state.searchText} />
47 |
48 | );
49 | }
50 | }
51 |
52 | _onSearchPressed() {
53 | this.setState({
54 | searchEnabled: true
55 | });
56 | }
57 |
58 | }
59 |
60 | var styles = StyleSheet.create({
61 |
62 | container: {
63 | flex: 1,
64 | },
65 |
66 | titleContainer: {
67 | position: 'absolute',
68 | top: 0,
69 | bottom: 0,
70 | left: 0,
71 | right: 0,
72 | justifyContent: 'center',
73 | alignItems: 'center',
74 | },
75 |
76 | title: {
77 | fontSize: 20,
78 | fontWeight: 'bold',
79 | color: 'white',
80 | },
81 |
82 | icon: {
83 | width: 40,
84 | position: 'absolute',
85 | right: 0,
86 | top: 0,
87 | bottom: 0,
88 | },
89 |
90 | searchContainer: {
91 | flex: 1,
92 | paddingHorizontal: 10,
93 | paddingVertical: 6,
94 | },
95 |
96 | searchBox: {
97 | flex: 1,
98 | borderColor: 'transparent',
99 | borderRadius: 4,
100 | backgroundColor: '#437ea8',
101 | paddingHorizontal: 6,
102 | color: '#cccccc'
103 | }
104 |
105 | });
106 |
107 | module.exports = Title;
--------------------------------------------------------------------------------
/Examples/iOS/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 |
--------------------------------------------------------------------------------
/Examples/iOS/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:@"Examples"
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 |
--------------------------------------------------------------------------------
/Examples/iOS/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 |
--------------------------------------------------------------------------------
/Examples/iOS/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 | }
--------------------------------------------------------------------------------
/Examples/iOS/Images.xcassets/react_logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "react_logo.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "react_logo-1.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "react_logo-2.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Examples/iOS/Images.xcassets/react_logo.imageset/react_logo-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marty-wang/react-native-toolkit/c55a9005484631edeb5005d043cbedd2a289efea/Examples/iOS/Images.xcassets/react_logo.imageset/react_logo-1.png
--------------------------------------------------------------------------------
/Examples/iOS/Images.xcassets/react_logo.imageset/react_logo-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marty-wang/react-native-toolkit/c55a9005484631edeb5005d043cbedd2a289efea/Examples/iOS/Images.xcassets/react_logo.imageset/react_logo-2.png
--------------------------------------------------------------------------------
/Examples/iOS/Images.xcassets/react_logo.imageset/react_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marty-wang/react-native-toolkit/c55a9005484631edeb5005d043cbedd2a289efea/Examples/iOS/Images.xcassets/react_logo.imageset/react_logo.png
--------------------------------------------------------------------------------
/Examples/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIAppFonts
6 |
7 | Ionicons.ttf
8 | FontAwesome.ttf
9 |
10 | CFBundleDevelopmentRegion
11 | en
12 | CFBundleExecutable
13 | $(EXECUTABLE_NAME)
14 | CFBundleIdentifier
15 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
16 | CFBundleInfoDictionaryVersion
17 | 6.0
18 | CFBundleName
19 | $(PRODUCT_NAME)
20 | CFBundlePackageType
21 | APPL
22 | CFBundleShortVersionString
23 | 1.0
24 | CFBundleSignature
25 | ????
26 | CFBundleVersion
27 | 1
28 | LSRequiresIPhoneOS
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 | NSLocationWhenInUseUsageDescription
45 |
46 | NSAppTransportSecurity
47 |
48 | NSAllowsArbitraryLoads
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Examples/iOS/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 |
--------------------------------------------------------------------------------
/Examples/iOS/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 |
--------------------------------------------------------------------------------
/Examples/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 | } = React;
11 |
12 | var App = require('./App.js');
13 |
14 | AppRegistry.registerComponent('Examples', () => App);
15 |
--------------------------------------------------------------------------------
/Examples/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Examples",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node_modules/react-native/packager/packager.sh",
7 | "ikit": "npm install react-native-toolkit -f"
8 | },
9 | "dependencies": {
10 | "react-native": "^0.8.0",
11 | "react-native-toolkit": "file:../",
12 | "react-native-vector-icons": "^0.6.8"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mo Wang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React Native Toolkit
2 |
3 | Stay tuned!
4 |
5 | Feel adventurous? Check out examples and get started! :)
6 |
7 | ## Navigation bar
8 |
9 | 
10 |
11 | * Custom navigation bar style per scene, including text color, background color, bottom border, shadow and etc
12 |
13 | * Custom title, left, right and back components of the navigation bar per scene"
14 |
15 | * Crossfade effect on the navigation bar during scene transition
16 |
17 | * Adjustable status bar style to match with the navigation bar style
18 |
19 | ```
20 | // NavigationBar prop types
21 | {
22 | barStyle: React.PropTypes.object, // any css style valid for View
23 | titleStyle: React.PropTypes.object, // any css style valid for Text
24 | backButtonColor: React.PropTypes.string,
25 | }
26 |
27 | // Route prop types
28 | {
29 | title: React.PropTypes.string,
30 | customTitle: { component: React.PropTypes.element, passProps: React.PropTypes.object },
31 | leftButton: { component: React.PropTypes.element, passProps: React.PropTypes.object },
32 | rightButton: { component: React.PropTypes.element, passProps: React.PropTypes.object },
33 | backButton: { component: React.PropTypes.element, passProps: React.PropTypes.object },
34 | barStyle: React.PropTypes.object,
35 | titleStyle: React.PropTypes.object,
36 | statusBarStyle: React.PropTypes.string,
37 | }
38 | ```
--------------------------------------------------------------------------------
/components/NavigationBar.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | StyleSheet,
6 | Text,
7 | TouchableOpacity,
8 | View,
9 | Animated,
10 | StatusBarIOS,
11 | } = React;
12 |
13 | class BackButton extends React.Component {
14 |
15 | render() {
16 | var self = this;
17 | var backArrow = "❮";
18 |
19 | return (
20 |
21 |
22 |
23 | { backArrow }
24 |
25 |
26 |
27 | )
28 | }
29 |
30 | _onPress() {
31 | this.props.navigator.pop();
32 | }
33 |
34 | }
35 |
36 | class CrossFade extends React.Component {
37 |
38 | constructor(props) {
39 | super(props);
40 |
41 | this.state = {
42 | front: {
43 | opacity: new Animated.Value(1)
44 | },
45 | back: {
46 | opacity: new Animated.Value(0)
47 | }
48 | }
49 | }
50 |
51 | render() {
52 | return (
53 |
54 | { this._createAnimatedView(this.props.backElement, this.state.back.opacity) }
55 | { this._createAnimatedView(this.props.frontElement, this.state.front.opacity) }
56 |
57 | );
58 | }
59 |
60 | start() {
61 | var state = this.state;
62 | var duration = this.props.duration || 300;
63 |
64 | var createAnimation = (property, toValue) => {
65 | return Animated.timing(
66 | property,
67 | {
68 | toValue: toValue,
69 | duration: duration
70 | }
71 | );
72 | };
73 |
74 | state.front.opacity.setValue(0);
75 | state.back.opacity.setValue(1);
76 |
77 | var animations = [
78 | createAnimation(state.front.opacity, 1),
79 | createAnimation(state.back.opacity, 0),
80 | ];
81 |
82 | Animated
83 | .parallel(animations, {stopTogether: false})
84 | .start((result) => {
85 | if (!result.finished) {
86 | // coerce the end values if animations are not finished.
87 | state.front.opacity.setValue(1);
88 | state.back.opacity.setValue(0);
89 | }
90 | });
91 | }
92 |
93 | _createAnimatedView(element, opacity) {
94 | if (!element) {
95 | return null;
96 | }
97 |
98 | return (
99 |
100 | {element}
101 |
102 | );
103 | }
104 |
105 | }
106 |
107 | var navBarPropTypes = {
108 | barStyle: React.PropTypes.object, // any css style valid for View
109 | titleStyle: React.PropTypes.object, // any css style valid for Text
110 | backButtonColor: React.PropTypes.string,
111 | };
112 |
113 | var navBarDefaultProps = {};
114 |
115 | // route props types
116 | //
117 | // title: React.PropTypes.string
118 | // customTitle: { component: React.PropTypes.element, passProps: React.PropTypes.object }
119 | // leftButton: { component: React.PropTypes.element, passProps: React.PropTypes.object }
120 | // rightButton: { component: React.PropTypes.element, passProps: React.PropTypes.object }
121 | // backButton: { component: React.PropTypes.element, passProps: React.PropTypes.object }
122 | // barStyle: React.PropTypes.object
123 | // titleStyle: React.PropTypes.object
124 | // statusBarStyle: React.PropTypes.string
125 |
126 | class NavigationBar extends React.Component {
127 |
128 | constructor(props) {
129 | super(props);
130 |
131 | this.state = {
132 | route: null,
133 | prevRoute: null
134 | };
135 | }
136 |
137 | render() {
138 | var elements = this._createElements(this.state.route);
139 | var prevElements = this._createElements(this.state.prevRoute);
140 |
141 | return (
142 |
143 |
144 | { }
145 |
146 |
147 | { }
148 |
149 |
150 | { }
151 |
152 |
153 | );
154 | }
155 |
156 | componentWillMount() {
157 | var navigationContext = this.props.navigator.navigationContext;
158 |
159 | this._listeners = [
160 | navigationContext.addListener('willfocus', this._onWillFocus.bind(this)),
161 | navigationContext.addListener('didfocus', this._onDidFocus.bind(this)),
162 | ];
163 | }
164 |
165 | componentWillUnmount() {
166 | this._listeners && this._listeners.forEach(listener => listener.remove());
167 | }
168 |
169 | _createElements(route) {
170 | return {
171 | left: route ? this._createLeftElement(route) : null,
172 | middle: route ? this._createMiddleElement(route) : null,
173 | right: route ? this._createRightElement(route) : null
174 | }
175 | }
176 |
177 | _createLeftElement(route) {
178 | var canBack = this.props.navigator.state.routeStack.indexOf(route) > 0;
179 | var leftButton = route.leftButton;
180 |
181 | if (leftButton) {
182 | return this._createCustomElement(leftButton);
183 | } else if (canBack) {
184 | let backButton = {
185 | component: BackButton,
186 | passProps: { color: this.props.backButtonColor || (this.props.titleStyle && this.props.titleStyle.color) || (route.titleStyle && route.titleStyle.color) }
187 | };
188 | return this._createCustomElement(route.customBackButton || backButton);
189 | } else {
190 | return null;
191 | }
192 | }
193 |
194 | _createMiddleElement(route) {
195 | var customTitle = route.customTitle;
196 |
197 | if (customTitle) {
198 | return this._createCustomElement(customTitle);
199 | } else {
200 | return (
201 |
202 |
203 | { route.title }
204 |
205 |
206 | );
207 | }
208 | }
209 |
210 | _createRightElement(route) {
211 | var rightButton = route.rightButton;
212 |
213 | if (rightButton) {
214 | return this._createCustomElement(rightButton);
215 | } else {
216 | return null;
217 | }
218 | }
219 |
220 | _createCustomElement(custom) {
221 | return React.createElement(
222 | custom.component,
223 | Object.assign({}, { navigator: this.props.navigator }, custom.passProps)
224 | );
225 | }
226 |
227 | _onWillFocus(event) {
228 | this._onWillFocusCalled = true;
229 |
230 | var route = event.data.route;
231 |
232 | if (route && route.statusBarStyle) {
233 | StatusBarIOS.setStyle(route.statusBarStyle);
234 | }
235 |
236 | this.setState({
237 | route: route,
238 | prevRoute: this.state.route
239 | });
240 |
241 | this.refs.leftCrossFade.start();
242 | this.refs.middleCrossFade.start();
243 | this.refs.rightCrossFade.start();
244 | }
245 |
246 | _onDidFocus(event) {
247 | if (this._onWillFocusCalled) {
248 | return;
249 | }
250 |
251 | var route = event.data.route;
252 |
253 | if (route && route.statusBarStyle) {
254 | StatusBarIOS.setStyle(route.statusBarStyle);
255 | }
256 |
257 | this.setState({
258 | route: route
259 | });
260 | }
261 |
262 | }
263 |
264 | NavigationBar.propTypes = navBarPropTypes;
265 |
266 | NavigationBar.defaultProps = navBarDefaultProps;
267 |
268 | var styles = StyleSheet.create({
269 |
270 | container: {
271 | position: 'absolute',
272 | top: 0,
273 | left: 0,
274 | right: 0,
275 | height: 64,
276 | paddingTop: 20,
277 | flexDirection: 'row',
278 | backgroundColor: '#f8f8f8',
279 | borderBottomWidth: 1,
280 | borderBottomColor: '#d0d0d0',
281 | },
282 |
283 | left: {
284 | width: 40,
285 | justifyContent: 'center',
286 | },
287 |
288 | middle: {
289 | flex: 1,
290 | justifyContent: 'center',
291 | },
292 |
293 | right: {
294 | width: 40,
295 | justifyContent: 'center',
296 | },
297 |
298 | child: {
299 | position: 'absolute',
300 | left: 0,
301 | right: 0,
302 | top: 0,
303 | bottom: 0,
304 | justifyContent: 'center',
305 | },
306 |
307 | backButton: {
308 | flex: 1,
309 | justifyContent: 'center',
310 | alignItems: 'center',
311 | },
312 |
313 | backArrow: {
314 | fontSize: 22,
315 | paddingTop: 6,
316 | paddingBottom: 6,
317 | paddingLeft: 10,
318 | paddingRight: 10,
319 | },
320 |
321 | title: {
322 | flex: 1,
323 | fontSize: 20,
324 | fontWeight: 'bold',
325 | textAlign: 'center',
326 | }
327 |
328 | });
329 |
330 | module.exports = NavigationBar;
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var Toolkit = {
4 | NavigationBar: require('./components/NavigationBar.js')
5 | };
6 |
7 | module.exports = Toolkit;
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-toolkit",
3 | "version": "0.0.5",
4 | "description": "A collection of common UI components for react native mobile apps.",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [
10 | "react-component",
11 | "react",
12 | "react-native",
13 | "ios",
14 | "android",
15 | "navigator",
16 | "navigationbar",
17 | "navigation-bar",
18 | "navbar",
19 | "navigation",
20 | "router"
21 | ],
22 | "repository" : {
23 | "type" : "git",
24 | "url" : "https://github.com/marty-wang/react-native-toolkit.git"
25 | },
26 | "bugs": {
27 | "url": "https://github.com/marty-wang/react-native-toolkit/issues"
28 | },
29 | "author": "Mo Wang",
30 | "license": "MIT"
31 | }
32 |
--------------------------------------------------------------------------------