├── .gitignore ├── .natal ├── CHANGELOG.md ├── LICENSE ├── README.md ├── doc └── intro.md ├── native ├── .flowconfig ├── .gitignore ├── .watchmanconfig ├── index.ios.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── demo.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── demo.xcscheme │ ├── demo.xcworkspace │ │ └── contents.xcworkspacedata │ ├── demo │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ ├── demoTests │ │ ├── Info.plist │ │ └── demoTests.m │ └── main.jsbundle └── package.json ├── project.clj ├── server ├── api │ ├── __init__.py │ ├── admin.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ └── views.py ├── db.sqlite3 ├── demo │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage.py ├── src └── demo │ └── core.cljs └── test └── demo └── core_test.clj /.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | node_modules 3 | /target 4 | /classes 5 | /checkouts 6 | pom.xml 7 | pom.xml.asc 8 | *.jar 9 | *.class 10 | /.lein-* 11 | /.nrepl-port 12 | .hgignore 13 | .hg/ 14 | Pods 15 | .cljs_rhino_repl/ 16 | *.log 17 | .repl -------------------------------------------------------------------------------- /.natal: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo", 3 | "device": "047FF76F-FC8B-4DD0-9467-09A8E52BEBC9" 4 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). 3 | 4 | ## [Unreleased][unreleased] 5 | ### Changed 6 | - Add a new arity to `make-widget-async` to provide a different widget shape. 7 | 8 | ## [0.1.1] - 2015-11-12 9 | ### Changed 10 | - Documentation on how to make the widgets. 11 | 12 | ### Removed 13 | - `make-widget-sync` - we're all async, all the time. 14 | 15 | ### Fixed 16 | - Fixed widget maker to keep working when daylight savings switches over. 17 | 18 | ## 0.1.0 - 2015-11-12 19 | ### Added 20 | - Files from the new template. 21 | - Widget maker public API - `make-widget-sync`. 22 | 23 | [unreleased]: https://github.com/your-name/demo/compare/0.1.1...HEAD 24 | [0.1.1]: https://github.com/your-name/demo/compare/0.1.0...0.1.1 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC 2 | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM 3 | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 4 | 5 | 1. DEFINITIONS 6 | 7 | "Contribution" means: 8 | 9 | a) in the case of the initial Contributor, the initial code and 10 | documentation distributed under this Agreement, and 11 | 12 | b) in the case of each subsequent Contributor: 13 | 14 | i) changes to the Program, and 15 | 16 | ii) additions to the Program; 17 | 18 | where such changes and/or additions to the Program originate from and are 19 | distributed by that particular Contributor. A Contribution 'originates' from 20 | a Contributor if it was added to the Program by such Contributor itself or 21 | anyone acting on such Contributor's behalf. Contributions do not include 22 | additions to the Program which: (i) are separate modules of software 23 | distributed in conjunction with the Program under their own license 24 | agreement, and (ii) are not derivative works of the Program. 25 | 26 | "Contributor" means any person or entity that distributes the Program. 27 | 28 | "Licensed Patents" mean patent claims licensable by a Contributor which are 29 | necessarily infringed by the use or sale of its Contribution alone or when 30 | combined with the Program. 31 | 32 | "Program" means the Contributions distributed in accordance with this 33 | Agreement. 34 | 35 | "Recipient" means anyone who receives the Program under this Agreement, 36 | including all Contributors. 37 | 38 | 2. GRANT OF RIGHTS 39 | 40 | a) Subject to the terms of this Agreement, each Contributor hereby grants 41 | Recipient a non-exclusive, worldwide, royalty-free copyright license to 42 | reproduce, prepare derivative works of, publicly display, publicly perform, 43 | distribute and sublicense the Contribution of such Contributor, if any, and 44 | such derivative works, in source code and object code form. 45 | 46 | b) Subject to the terms of this Agreement, each Contributor hereby grants 47 | Recipient a non-exclusive, worldwide, royalty-free patent license under 48 | Licensed Patents to make, use, sell, offer to sell, import and otherwise 49 | transfer the Contribution of such Contributor, if any, in source code and 50 | object code form. This patent license shall apply to the combination of the 51 | Contribution and the Program if, at the time the Contribution is added by the 52 | Contributor, such addition of the Contribution causes such combination to be 53 | covered by the Licensed Patents. The patent license shall not apply to any 54 | other combinations which include the Contribution. No hardware per se is 55 | licensed hereunder. 56 | 57 | c) Recipient understands that although each Contributor grants the licenses 58 | to its Contributions set forth herein, no assurances are provided by any 59 | Contributor that the Program does not infringe the patent or other 60 | intellectual property rights of any other entity. Each Contributor disclaims 61 | any liability to Recipient for claims brought by any other entity based on 62 | infringement of intellectual property rights or otherwise. As a condition to 63 | exercising the rights and licenses granted hereunder, each Recipient hereby 64 | assumes sole responsibility to secure any other intellectual property rights 65 | needed, if any. For example, if a third party patent license is required to 66 | allow Recipient to distribute the Program, it is Recipient's responsibility 67 | to acquire that license before distributing the Program. 68 | 69 | d) Each Contributor represents that to its knowledge it has sufficient 70 | copyright rights in its Contribution, if any, to grant the copyright license 71 | set forth in this Agreement. 72 | 73 | 3. REQUIREMENTS 74 | 75 | A Contributor may choose to distribute the Program in object code form under 76 | its own license agreement, provided that: 77 | 78 | a) it complies with the terms and conditions of this Agreement; and 79 | 80 | b) its license agreement: 81 | 82 | i) effectively disclaims on behalf of all Contributors all warranties and 83 | conditions, express and implied, including warranties or conditions of title 84 | and non-infringement, and implied warranties or conditions of merchantability 85 | and fitness for a particular purpose; 86 | 87 | ii) effectively excludes on behalf of all Contributors all liability for 88 | damages, including direct, indirect, special, incidental and consequential 89 | damages, such as lost profits; 90 | 91 | iii) states that any provisions which differ from this Agreement are offered 92 | by that Contributor alone and not by any other party; and 93 | 94 | iv) states that source code for the Program is available from such 95 | Contributor, and informs licensees how to obtain it in a reasonable manner on 96 | or through a medium customarily used for software exchange. 97 | 98 | When the Program is made available in source code form: 99 | 100 | a) it must be made available under this Agreement; and 101 | 102 | b) a copy of this Agreement must be included with each copy of the Program. 103 | 104 | Contributors may not remove or alter any copyright notices contained within 105 | the Program. 106 | 107 | Each Contributor must identify itself as the originator of its Contribution, 108 | if any, in a manner that reasonably allows subsequent Recipients to identify 109 | the originator of the Contribution. 110 | 111 | 4. COMMERCIAL DISTRIBUTION 112 | 113 | Commercial distributors of software may accept certain responsibilities with 114 | respect to end users, business partners and the like. While this license is 115 | intended to facilitate the commercial use of the Program, the Contributor who 116 | includes the Program in a commercial product offering should do so in a 117 | manner which does not create potential liability for other Contributors. 118 | Therefore, if a Contributor includes the Program in a commercial product 119 | offering, such Contributor ("Commercial Contributor") hereby agrees to defend 120 | and indemnify every other Contributor ("Indemnified Contributor") against any 121 | losses, damages and costs (collectively "Losses") arising from claims, 122 | lawsuits and other legal actions brought by a third party against the 123 | Indemnified Contributor to the extent caused by the acts or omissions of such 124 | Commercial Contributor in connection with its distribution of the Program in 125 | a commercial product offering. The obligations in this section do not apply 126 | to any claims or Losses relating to any actual or alleged intellectual 127 | property infringement. In order to qualify, an Indemnified Contributor must: 128 | a) promptly notify the Commercial Contributor in writing of such claim, and 129 | b) allow the Commercial Contributor tocontrol, and cooperate with the 130 | Commercial Contributor in, the defense and any related settlement 131 | negotiations. The Indemnified Contributor may participate in any such claim 132 | at its own expense. 133 | 134 | For example, a Contributor might include the Program in a commercial product 135 | offering, Product X. That Contributor is then a Commercial Contributor. If 136 | that Commercial Contributor then makes performance claims, or offers 137 | warranties related to Product X, those performance claims and warranties are 138 | such Commercial Contributor's responsibility alone. Under this section, the 139 | Commercial Contributor would have to defend claims against the other 140 | Contributors related to those performance claims and warranties, and if a 141 | court requires any other Contributor to pay any damages as a result, the 142 | Commercial Contributor must pay those damages. 143 | 144 | 5. NO WARRANTY 145 | 146 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON 147 | AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER 148 | EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR 149 | CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A 150 | PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the 151 | appropriateness of using and distributing the Program and assumes all risks 152 | associated with its exercise of rights under this Agreement , including but 153 | not limited to the risks and costs of program errors, compliance with 154 | applicable laws, damage to or loss of data, programs or equipment, and 155 | unavailability or interruption of operations. 156 | 157 | 6. DISCLAIMER OF LIABILITY 158 | 159 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY 160 | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, 161 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION 162 | LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 163 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 164 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 165 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY 166 | OF SUCH DAMAGES. 167 | 168 | 7. GENERAL 169 | 170 | If any provision of this Agreement is invalid or unenforceable under 171 | applicable law, it shall not affect the validity or enforceability of the 172 | remainder of the terms of this Agreement, and without further action by the 173 | parties hereto, such provision shall be reformed to the minimum extent 174 | necessary to make such provision valid and enforceable. 175 | 176 | If Recipient institutes patent litigation against any entity (including a 177 | cross-claim or counterclaim in a lawsuit) alleging that the Program itself 178 | (excluding combinations of the Program with other software or hardware) 179 | infringes such Recipient's patent(s), then such Recipient's rights granted 180 | under Section 2(b) shall terminate as of the date such litigation is filed. 181 | 182 | All Recipient's rights under this Agreement shall terminate if it fails to 183 | comply with any of the material terms or conditions of this Agreement and 184 | does not cure such failure in a reasonable period of time after becoming 185 | aware of such noncompliance. If all Recipient's rights under this Agreement 186 | terminate, Recipient agrees to cease use and distribution of the Program as 187 | soon as reasonably practicable. However, Recipient's obligations under this 188 | Agreement and any licenses granted by Recipient relating to the Program shall 189 | continue and survive. 190 | 191 | Everyone is permitted to copy and distribute copies of this Agreement, but in 192 | order to avoid inconsistency the Agreement is copyrighted and may only be 193 | modified in the following manner. The Agreement Steward reserves the right to 194 | publish new versions (including revisions) of this Agreement from time to 195 | time. No one other than the Agreement Steward has the right to modify this 196 | Agreement. The Eclipse Foundation is the initial Agreement Steward. The 197 | Eclipse Foundation may assign the responsibility to serve as the Agreement 198 | Steward to a suitable separate entity. Each new version of the Agreement will 199 | be given a distinguishing version number. The Program (including 200 | Contributions) may always be distributed subject to the version of the 201 | Agreement under which it was received. In addition, after a new version of 202 | the Agreement is published, Contributor may elect to distribute the Program 203 | (including its Contributions) under the new version. Except as expressly 204 | stated in Sections 2(a) and 2(b) above, Recipient receives no rights or 205 | licenses to the intellectual property of any Contributor under this 206 | Agreement, whether expressly, by implication, estoppel or otherwise. All 207 | rights in the Program not expressly granted under this Agreement are 208 | reserved. 209 | 210 | This Agreement is governed by the laws of the State of New York and the 211 | intellectual property laws of the United States of America. No party to this 212 | Agreement will bring a legal action under this Agreement more than one year 213 | after the cause of action arose. Each party waives its rights to a jury trial 214 | in any resulting litigation. 215 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # om.next with python server demo 2 | 3 | I used this code as demo at the Tokyo iOS meetup on Nov 13th 2015. 4 | 5 | ## Usage 6 | 7 | - `lein cljsbuild once` 8 | - `pip3 install -i server/requirements.txt` 9 | - `python3 server/manage.py runserver` 10 | - `natal launch` 11 | 12 | ## License 13 | 14 | Copyright © 2015 MIT @ David Mohl 15 | -------------------------------------------------------------------------------- /doc/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction to demo 2 | 3 | TODO: write [great documentation](http://jacobian.org/writing/what-to-write/) 4 | -------------------------------------------------------------------------------- /native/.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/React.js 13 | .*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js 14 | .*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js 15 | .*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js 16 | 17 | # Ignore commoner tests 18 | .*/node_modules/commoner/test/.* 19 | 20 | # See https://github.com/facebook/flow/issues/442 21 | .*/react-tools/node_modules/commoner/lib/reader.js 22 | 23 | # Ignore jest 24 | .*/node_modules/jest-cli/.* 25 | 26 | # Ignore Website 27 | .*/website/.* 28 | 29 | [include] 30 | 31 | [libs] 32 | node_modules/react-native/Libraries/react-native/react-native-interface.js 33 | 34 | [options] 35 | module.system=haste 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 40 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' 41 | 42 | suppress_type=$FlowIssue 43 | suppress_type=$FlowFixMe 44 | suppress_type=$FixMe 45 | 46 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 47 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 49 | 50 | [version] 51 | 0.17.0 52 | -------------------------------------------------------------------------------- /native/.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 | # Android/IJ 26 | # 27 | .idea 28 | .gradle 29 | local.properties 30 | 31 | # node.js 32 | # 33 | node_modules/ 34 | npm-debug.log 35 | -------------------------------------------------------------------------------- /native/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /native/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 | StyleSheet, 11 | Text, 12 | View, 13 | } = React; 14 | 15 | var demo = React.createClass({ 16 | render: function() { 17 | return ( 18 | 19 | 20 | Welcome to React Native! 21 | 22 | 23 | To get started, edit index.ios.js 24 | 25 | 26 | Press Cmd+R to reload,{'\n'} 27 | Cmd+D or shake for dev menu 28 | 29 | 30 | ); 31 | } 32 | }); 33 | 34 | var styles = StyleSheet.create({ 35 | container: { 36 | flex: 1, 37 | justifyContent: 'center', 38 | alignItems: 'center', 39 | backgroundColor: '#F5FCFF', 40 | }, 41 | welcome: { 42 | fontSize: 20, 43 | textAlign: 'center', 44 | margin: 10, 45 | }, 46 | instructions: { 47 | textAlign: 'center', 48 | color: '#333333', 49 | marginBottom: 5, 50 | }, 51 | }); 52 | 53 | AppRegistry.registerComponent('demo', () => demo); 54 | -------------------------------------------------------------------------------- /native/ios/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '8.0' 3 | 4 | pod "Ambly", "~> 0.6.0" 5 | -------------------------------------------------------------------------------- /native/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Ambly (0.6.0): 3 | - GCDWebServer/WebDAV (~> 3.2.2) 4 | - GCDWebServer/Core (3.2.7) 5 | - GCDWebServer/WebDAV (3.2.7): 6 | - GCDWebServer/Core 7 | 8 | DEPENDENCIES: 9 | - Ambly (~> 0.6.0) 10 | 11 | SPEC CHECKSUMS: 12 | Ambly: cf953b8208d534a999704f8a009897132c37a46f 13 | GCDWebServer: 76a9540371d5f12f850b32ec7f555dd2d266e543 14 | 15 | COCOAPODS: 0.39.0 16 | -------------------------------------------------------------------------------- /native/ios/demo.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 /* demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* demoTests.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 | 6E909279A2166865BE405548 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B794510D002A7CD710C6533 /* libPods.a */; }; 26 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 27 | FE01CE2B7FBAC8FAFAED7C98 /* out in Resources */ = {isa = PBXBuildFile; fileRef = FE01CE2A7FBAC8FAFAED7C98 /* out */; }; 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 = demo; 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; path = 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 /* demoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = demoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 118 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 119 | 00E356F21AD99517003FC87E /* demoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = demoTests.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 /* demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 123 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = demo/AppDelegate.h; sourceTree = ""; }; 124 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = demo/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 = demo/Images.xcassets; sourceTree = ""; }; 127 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = demo/Info.plist; sourceTree = ""; }; 128 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = demo/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 | 7663690CCD51F0C9ED87E88C /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 131 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 132 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 133 | 8B794510D002A7CD710C6533 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 134 | E31EB89FE194BA7B22236317 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 135 | FE01CE2A7FBAC8FAFAED7C98 /* out */ = {isa = PBXFileReference; lastKnownFileType = folder; name = out; path = ../../target/out; sourceTree = ""; }; 136 | /* End PBXFileReference section */ 137 | 138 | /* Begin PBXFrameworksBuildPhase section */ 139 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 140 | isa = PBXFrameworksBuildPhase; 141 | buildActionMask = 2147483647; 142 | files = ( 143 | ); 144 | runOnlyForDeploymentPostprocessing = 0; 145 | }; 146 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 147 | isa = PBXFrameworksBuildPhase; 148 | buildActionMask = 2147483647; 149 | files = ( 150 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 151 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 152 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 153 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 154 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 155 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 156 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 157 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 158 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 159 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 160 | 6E909279A2166865BE405548 /* libPods.a in Frameworks */, 161 | ); 162 | runOnlyForDeploymentPostprocessing = 0; 163 | }; 164 | /* End PBXFrameworksBuildPhase section */ 165 | 166 | /* Begin PBXGroup section */ 167 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 171 | ); 172 | name = Products; 173 | sourceTree = ""; 174 | }; 175 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 179 | ); 180 | name = Products; 181 | sourceTree = ""; 182 | }; 183 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 187 | ); 188 | name = Products; 189 | sourceTree = ""; 190 | }; 191 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 195 | ); 196 | name = Products; 197 | sourceTree = ""; 198 | }; 199 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 203 | ); 204 | name = Products; 205 | sourceTree = ""; 206 | }; 207 | 00E356EF1AD99517003FC87E /* demoTests */ = { 208 | isa = PBXGroup; 209 | children = ( 210 | 00E356F21AD99517003FC87E /* demoTests.m */, 211 | 00E356F01AD99517003FC87E /* Supporting Files */, 212 | ); 213 | path = demoTests; 214 | sourceTree = ""; 215 | }; 216 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | 00E356F11AD99517003FC87E /* Info.plist */, 220 | ); 221 | name = "Supporting Files"; 222 | sourceTree = ""; 223 | }; 224 | 139105B71AF99BAD00B5F7CC /* Products */ = { 225 | isa = PBXGroup; 226 | children = ( 227 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 228 | ); 229 | name = Products; 230 | sourceTree = ""; 231 | }; 232 | 139FDEE71B06529A00C62182 /* Products */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 236 | ); 237 | name = Products; 238 | sourceTree = ""; 239 | }; 240 | 13B07FAE1A68108700A75B9A /* demo */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 244 | FE01CE2A7FBAC8FAFAED7C98 /* out */, 245 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 246 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 247 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 248 | 13B07FB61A68108700A75B9A /* Info.plist */, 249 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 250 | 13B07FB71A68108700A75B9A /* main.m */, 251 | ); 252 | name = demo; 253 | sourceTree = ""; 254 | }; 255 | 146834001AC3E56700842450 /* Products */ = { 256 | isa = PBXGroup; 257 | children = ( 258 | 146834041AC3E56700842450 /* libReact.a */, 259 | ); 260 | name = Products; 261 | sourceTree = ""; 262 | }; 263 | 78C398B11ACF4ADC00677621 /* Products */ = { 264 | isa = PBXGroup; 265 | children = ( 266 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 267 | ); 268 | name = Products; 269 | sourceTree = ""; 270 | }; 271 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 272 | isa = PBXGroup; 273 | children = ( 274 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 275 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 276 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 277 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 278 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 279 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 280 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 281 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 282 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 283 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 284 | ); 285 | name = Libraries; 286 | sourceTree = ""; 287 | }; 288 | 832341B11AAA6A8300B99B32 /* Products */ = { 289 | isa = PBXGroup; 290 | children = ( 291 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 292 | ); 293 | name = Products; 294 | sourceTree = ""; 295 | }; 296 | 83CBB9F61A601CBA00E9B192 = { 297 | isa = PBXGroup; 298 | children = ( 299 | 13B07FAE1A68108700A75B9A /* demo */, 300 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 301 | 00E356EF1AD99517003FC87E /* demoTests */, 302 | 83CBBA001A601CBA00E9B192 /* Products */, 303 | 8F03BCDDFB5D33DF9DBA19E9 /* Pods */, 304 | A5F94DF3F4725FCEEADDFDBC /* Frameworks */, 305 | ); 306 | indentWidth = 2; 307 | sourceTree = ""; 308 | tabWidth = 2; 309 | }; 310 | 83CBBA001A601CBA00E9B192 /* Products */ = { 311 | isa = PBXGroup; 312 | children = ( 313 | 13B07F961A680F5B00A75B9A /* demo.app */, 314 | 00E356EE1AD99517003FC87E /* demoTests.xctest */, 315 | ); 316 | name = Products; 317 | sourceTree = ""; 318 | }; 319 | 8F03BCDDFB5D33DF9DBA19E9 /* Pods */ = { 320 | isa = PBXGroup; 321 | children = ( 322 | 7663690CCD51F0C9ED87E88C /* Pods.debug.xcconfig */, 323 | E31EB89FE194BA7B22236317 /* Pods.release.xcconfig */, 324 | ); 325 | name = Pods; 326 | sourceTree = ""; 327 | }; 328 | A5F94DF3F4725FCEEADDFDBC /* Frameworks */ = { 329 | isa = PBXGroup; 330 | children = ( 331 | 8B794510D002A7CD710C6533 /* libPods.a */, 332 | ); 333 | name = Frameworks; 334 | sourceTree = ""; 335 | }; 336 | /* End PBXGroup section */ 337 | 338 | /* Begin PBXNativeTarget section */ 339 | 00E356ED1AD99517003FC87E /* demoTests */ = { 340 | isa = PBXNativeTarget; 341 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "demoTests" */; 342 | buildPhases = ( 343 | 00E356EA1AD99517003FC87E /* Sources */, 344 | 00E356EB1AD99517003FC87E /* Frameworks */, 345 | 00E356EC1AD99517003FC87E /* Resources */, 346 | ); 347 | buildRules = ( 348 | ); 349 | dependencies = ( 350 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 351 | ); 352 | name = demoTests; 353 | productName = demoTests; 354 | productReference = 00E356EE1AD99517003FC87E /* demoTests.xctest */; 355 | productType = "com.apple.product-type.bundle.unit-test"; 356 | }; 357 | 13B07F861A680F5B00A75B9A /* demo */ = { 358 | isa = PBXNativeTarget; 359 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "demo" */; 360 | buildPhases = ( 361 | 1F686BFA0D03FEB26EBE41ED /* Check Pods Manifest.lock */, 362 | 13B07F871A680F5B00A75B9A /* Sources */, 363 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 364 | 13B07F8E1A680F5B00A75B9A /* Resources */, 365 | 7C30456DD0CB3937214FCDC4 /* Embed Pods Frameworks */, 366 | 1E6C236981CC9738771B3FC2 /* Copy Pods Resources */, 367 | ); 368 | buildRules = ( 369 | ); 370 | dependencies = ( 371 | ); 372 | name = demo; 373 | productName = "Hello World"; 374 | productReference = 13B07F961A680F5B00A75B9A /* demo.app */; 375 | productType = "com.apple.product-type.application"; 376 | }; 377 | /* End PBXNativeTarget section */ 378 | 379 | /* Begin PBXProject section */ 380 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 381 | isa = PBXProject; 382 | attributes = { 383 | LastUpgradeCheck = 0610; 384 | ORGANIZATIONNAME = Facebook; 385 | TargetAttributes = { 386 | 00E356ED1AD99517003FC87E = { 387 | CreatedOnToolsVersion = 6.2; 388 | TestTargetID = 13B07F861A680F5B00A75B9A; 389 | }; 390 | }; 391 | }; 392 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "demo" */; 393 | compatibilityVersion = "Xcode 3.2"; 394 | developmentRegion = English; 395 | hasScannedForEncodings = 0; 396 | knownRegions = ( 397 | en, 398 | Base, 399 | ); 400 | mainGroup = 83CBB9F61A601CBA00E9B192; 401 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 402 | projectDirPath = ""; 403 | projectReferences = ( 404 | { 405 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 406 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 407 | }, 408 | { 409 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 410 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 411 | }, 412 | { 413 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 414 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 415 | }, 416 | { 417 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 418 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 419 | }, 420 | { 421 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 422 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 423 | }, 424 | { 425 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 426 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 427 | }, 428 | { 429 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 430 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 431 | }, 432 | { 433 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 434 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 435 | }, 436 | { 437 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 438 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 439 | }, 440 | { 441 | ProductGroup = 146834001AC3E56700842450 /* Products */; 442 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 443 | }, 444 | ); 445 | projectRoot = ""; 446 | targets = ( 447 | 13B07F861A680F5B00A75B9A /* demo */, 448 | 00E356ED1AD99517003FC87E /* demoTests */, 449 | ); 450 | }; 451 | /* End PBXProject section */ 452 | 453 | /* Begin PBXReferenceProxy section */ 454 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 455 | isa = PBXReferenceProxy; 456 | fileType = archive.ar; 457 | path = libRCTActionSheet.a; 458 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 459 | sourceTree = BUILT_PRODUCTS_DIR; 460 | }; 461 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 462 | isa = PBXReferenceProxy; 463 | fileType = archive.ar; 464 | path = libRCTGeolocation.a; 465 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 466 | sourceTree = BUILT_PRODUCTS_DIR; 467 | }; 468 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 469 | isa = PBXReferenceProxy; 470 | fileType = archive.ar; 471 | path = libRCTImage.a; 472 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 473 | sourceTree = BUILT_PRODUCTS_DIR; 474 | }; 475 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 476 | isa = PBXReferenceProxy; 477 | fileType = archive.ar; 478 | path = libRCTNetwork.a; 479 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 480 | sourceTree = BUILT_PRODUCTS_DIR; 481 | }; 482 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 483 | isa = PBXReferenceProxy; 484 | fileType = archive.ar; 485 | path = libRCTVibration.a; 486 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 487 | sourceTree = BUILT_PRODUCTS_DIR; 488 | }; 489 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 490 | isa = PBXReferenceProxy; 491 | fileType = archive.ar; 492 | path = libRCTSettings.a; 493 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 494 | sourceTree = BUILT_PRODUCTS_DIR; 495 | }; 496 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 497 | isa = PBXReferenceProxy; 498 | fileType = archive.ar; 499 | path = libRCTWebSocket.a; 500 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 501 | sourceTree = BUILT_PRODUCTS_DIR; 502 | }; 503 | 146834041AC3E56700842450 /* libReact.a */ = { 504 | isa = PBXReferenceProxy; 505 | fileType = archive.ar; 506 | path = libReact.a; 507 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 508 | sourceTree = BUILT_PRODUCTS_DIR; 509 | }; 510 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 511 | isa = PBXReferenceProxy; 512 | fileType = archive.ar; 513 | path = libRCTLinking.a; 514 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 515 | sourceTree = BUILT_PRODUCTS_DIR; 516 | }; 517 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 518 | isa = PBXReferenceProxy; 519 | fileType = archive.ar; 520 | path = libRCTText.a; 521 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 522 | sourceTree = BUILT_PRODUCTS_DIR; 523 | }; 524 | /* End PBXReferenceProxy section */ 525 | 526 | /* Begin PBXResourcesBuildPhase section */ 527 | 00E356EC1AD99517003FC87E /* Resources */ = { 528 | isa = PBXResourcesBuildPhase; 529 | buildActionMask = 2147483647; 530 | files = ( 531 | ); 532 | runOnlyForDeploymentPostprocessing = 0; 533 | }; 534 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 535 | isa = PBXResourcesBuildPhase; 536 | buildActionMask = 2147483647; 537 | files = ( 538 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, 539 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 540 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 541 | FE01CE2B7FBAC8FAFAED7C98 /* out in Resources */, 542 | ); 543 | runOnlyForDeploymentPostprocessing = 0; 544 | }; 545 | /* End PBXResourcesBuildPhase section */ 546 | 547 | /* Begin PBXShellScriptBuildPhase section */ 548 | 1E6C236981CC9738771B3FC2 /* Copy Pods Resources */ = { 549 | isa = PBXShellScriptBuildPhase; 550 | buildActionMask = 2147483647; 551 | files = ( 552 | ); 553 | inputPaths = ( 554 | ); 555 | name = "Copy Pods Resources"; 556 | outputPaths = ( 557 | ); 558 | runOnlyForDeploymentPostprocessing = 0; 559 | shellPath = /bin/sh; 560 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 561 | showEnvVarsInLog = 0; 562 | }; 563 | 1F686BFA0D03FEB26EBE41ED /* Check Pods Manifest.lock */ = { 564 | isa = PBXShellScriptBuildPhase; 565 | buildActionMask = 2147483647; 566 | files = ( 567 | ); 568 | inputPaths = ( 569 | ); 570 | name = "Check Pods Manifest.lock"; 571 | outputPaths = ( 572 | ); 573 | runOnlyForDeploymentPostprocessing = 0; 574 | shellPath = /bin/sh; 575 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 576 | showEnvVarsInLog = 0; 577 | }; 578 | 7C30456DD0CB3937214FCDC4 /* Embed Pods Frameworks */ = { 579 | isa = PBXShellScriptBuildPhase; 580 | buildActionMask = 2147483647; 581 | files = ( 582 | ); 583 | inputPaths = ( 584 | ); 585 | name = "Embed Pods Frameworks"; 586 | outputPaths = ( 587 | ); 588 | runOnlyForDeploymentPostprocessing = 0; 589 | shellPath = /bin/sh; 590 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; 591 | showEnvVarsInLog = 0; 592 | }; 593 | /* End PBXShellScriptBuildPhase section */ 594 | 595 | /* Begin PBXSourcesBuildPhase section */ 596 | 00E356EA1AD99517003FC87E /* Sources */ = { 597 | isa = PBXSourcesBuildPhase; 598 | buildActionMask = 2147483647; 599 | files = ( 600 | 00E356F31AD99517003FC87E /* demoTests.m in Sources */, 601 | ); 602 | runOnlyForDeploymentPostprocessing = 0; 603 | }; 604 | 13B07F871A680F5B00A75B9A /* Sources */ = { 605 | isa = PBXSourcesBuildPhase; 606 | buildActionMask = 2147483647; 607 | files = ( 608 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 609 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 610 | ); 611 | runOnlyForDeploymentPostprocessing = 0; 612 | }; 613 | /* End PBXSourcesBuildPhase section */ 614 | 615 | /* Begin PBXTargetDependency section */ 616 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 617 | isa = PBXTargetDependency; 618 | target = 13B07F861A680F5B00A75B9A /* demo */; 619 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 620 | }; 621 | /* End PBXTargetDependency section */ 622 | 623 | /* Begin PBXVariantGroup section */ 624 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 625 | isa = PBXVariantGroup; 626 | children = ( 627 | 13B07FB21A68108700A75B9A /* Base */, 628 | ); 629 | name = LaunchScreen.xib; 630 | path = demo; 631 | sourceTree = ""; 632 | }; 633 | /* End PBXVariantGroup section */ 634 | 635 | /* Begin XCBuildConfiguration section */ 636 | 00E356F61AD99517003FC87E /* Debug */ = { 637 | isa = XCBuildConfiguration; 638 | buildSettings = { 639 | BUNDLE_LOADER = "$(TEST_HOST)"; 640 | FRAMEWORK_SEARCH_PATHS = ( 641 | "$(SDKROOT)/Developer/Library/Frameworks", 642 | "$(inherited)", 643 | ); 644 | GCC_PREPROCESSOR_DEFINITIONS = ( 645 | "DEBUG=1", 646 | "$(inherited)", 647 | ); 648 | INFOPLIST_FILE = demoTests/Info.plist; 649 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 650 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 651 | PRODUCT_NAME = "$(TARGET_NAME)"; 652 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo"; 653 | }; 654 | name = Debug; 655 | }; 656 | 00E356F71AD99517003FC87E /* Release */ = { 657 | isa = XCBuildConfiguration; 658 | buildSettings = { 659 | BUNDLE_LOADER = "$(TEST_HOST)"; 660 | COPY_PHASE_STRIP = NO; 661 | FRAMEWORK_SEARCH_PATHS = ( 662 | "$(SDKROOT)/Developer/Library/Frameworks", 663 | "$(inherited)", 664 | ); 665 | INFOPLIST_FILE = demoTests/Info.plist; 666 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 667 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 668 | PRODUCT_NAME = "$(TARGET_NAME)"; 669 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo"; 670 | }; 671 | name = Release; 672 | }; 673 | 13B07F941A680F5B00A75B9A /* Debug */ = { 674 | isa = XCBuildConfiguration; 675 | baseConfigurationReference = 7663690CCD51F0C9ED87E88C /* Pods.debug.xcconfig */; 676 | buildSettings = { 677 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 678 | DEAD_CODE_STRIPPING = NO; 679 | HEADER_SEARCH_PATHS = ( 680 | "$(inherited)", 681 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 682 | "$(SRCROOT)/../node_modules/react-native/React/**", 683 | ); 684 | INFOPLIST_FILE = demo/Info.plist; 685 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 686 | OTHER_LDFLAGS = "${inherited}"; 687 | PRODUCT_NAME = demo; 688 | }; 689 | name = Debug; 690 | }; 691 | 13B07F951A680F5B00A75B9A /* Release */ = { 692 | isa = XCBuildConfiguration; 693 | baseConfigurationReference = E31EB89FE194BA7B22236317 /* Pods.release.xcconfig */; 694 | buildSettings = { 695 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 696 | HEADER_SEARCH_PATHS = ( 697 | "$(inherited)", 698 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 699 | "$(SRCROOT)/../node_modules/react-native/React/**", 700 | ); 701 | INFOPLIST_FILE = demo/Info.plist; 702 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 703 | OTHER_LDFLAGS = "${inherited}"; 704 | PRODUCT_NAME = demo; 705 | }; 706 | name = Release; 707 | }; 708 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 709 | isa = XCBuildConfiguration; 710 | buildSettings = { 711 | ALWAYS_SEARCH_USER_PATHS = NO; 712 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 713 | CLANG_CXX_LIBRARY = "libc++"; 714 | CLANG_ENABLE_MODULES = YES; 715 | CLANG_ENABLE_OBJC_ARC = YES; 716 | CLANG_WARN_BOOL_CONVERSION = YES; 717 | CLANG_WARN_CONSTANT_CONVERSION = YES; 718 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 719 | CLANG_WARN_EMPTY_BODY = YES; 720 | CLANG_WARN_ENUM_CONVERSION = YES; 721 | CLANG_WARN_INT_CONVERSION = YES; 722 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 723 | CLANG_WARN_UNREACHABLE_CODE = YES; 724 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 725 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 726 | COPY_PHASE_STRIP = NO; 727 | ENABLE_STRICT_OBJC_MSGSEND = YES; 728 | GCC_C_LANGUAGE_STANDARD = gnu99; 729 | GCC_DYNAMIC_NO_PIC = NO; 730 | GCC_OPTIMIZATION_LEVEL = 0; 731 | GCC_PREPROCESSOR_DEFINITIONS = ( 732 | "DEBUG=1", 733 | "$(inherited)", 734 | ); 735 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 736 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 737 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 738 | GCC_WARN_UNDECLARED_SELECTOR = YES; 739 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 740 | GCC_WARN_UNUSED_FUNCTION = YES; 741 | GCC_WARN_UNUSED_VARIABLE = YES; 742 | HEADER_SEARCH_PATHS = ( 743 | "$(inherited)", 744 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 745 | "$(SRCROOT)/../node_modules/react-native/React/**", 746 | ); 747 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 748 | MTL_ENABLE_DEBUG_INFO = YES; 749 | ONLY_ACTIVE_ARCH = YES; 750 | SDKROOT = iphoneos; 751 | }; 752 | name = Debug; 753 | }; 754 | 83CBBA211A601CBA00E9B192 /* Release */ = { 755 | isa = XCBuildConfiguration; 756 | buildSettings = { 757 | ALWAYS_SEARCH_USER_PATHS = NO; 758 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 759 | CLANG_CXX_LIBRARY = "libc++"; 760 | CLANG_ENABLE_MODULES = YES; 761 | CLANG_ENABLE_OBJC_ARC = YES; 762 | CLANG_WARN_BOOL_CONVERSION = YES; 763 | CLANG_WARN_CONSTANT_CONVERSION = YES; 764 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 765 | CLANG_WARN_EMPTY_BODY = YES; 766 | CLANG_WARN_ENUM_CONVERSION = YES; 767 | CLANG_WARN_INT_CONVERSION = YES; 768 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 769 | CLANG_WARN_UNREACHABLE_CODE = YES; 770 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 771 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 772 | COPY_PHASE_STRIP = YES; 773 | ENABLE_NS_ASSERTIONS = NO; 774 | ENABLE_STRICT_OBJC_MSGSEND = YES; 775 | GCC_C_LANGUAGE_STANDARD = gnu99; 776 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 777 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 778 | GCC_WARN_UNDECLARED_SELECTOR = YES; 779 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 780 | GCC_WARN_UNUSED_FUNCTION = YES; 781 | GCC_WARN_UNUSED_VARIABLE = YES; 782 | HEADER_SEARCH_PATHS = ( 783 | "$(inherited)", 784 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 785 | "$(SRCROOT)/../node_modules/react-native/React/**", 786 | ); 787 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 788 | MTL_ENABLE_DEBUG_INFO = NO; 789 | SDKROOT = iphoneos; 790 | VALIDATE_PRODUCT = YES; 791 | }; 792 | name = Release; 793 | }; 794 | /* End XCBuildConfiguration section */ 795 | 796 | /* Begin XCConfigurationList section */ 797 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "demoTests" */ = { 798 | isa = XCConfigurationList; 799 | buildConfigurations = ( 800 | 00E356F61AD99517003FC87E /* Debug */, 801 | 00E356F71AD99517003FC87E /* Release */, 802 | ); 803 | defaultConfigurationIsVisible = 0; 804 | defaultConfigurationName = Release; 805 | }; 806 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "demo" */ = { 807 | isa = XCConfigurationList; 808 | buildConfigurations = ( 809 | 13B07F941A680F5B00A75B9A /* Debug */, 810 | 13B07F951A680F5B00A75B9A /* Release */, 811 | ); 812 | defaultConfigurationIsVisible = 0; 813 | defaultConfigurationName = Release; 814 | }; 815 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "demo" */ = { 816 | isa = XCConfigurationList; 817 | buildConfigurations = ( 818 | 83CBBA201A601CBA00E9B192 /* Debug */, 819 | 83CBBA211A601CBA00E9B192 /* Release */, 820 | ); 821 | defaultConfigurationIsVisible = 0; 822 | defaultConfigurationName = Release; 823 | }; 824 | /* End XCConfigurationList section */ 825 | }; 826 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 827 | } 828 | -------------------------------------------------------------------------------- /native/ios/demo.xcodeproj/xcshareddata/xcschemes/demo.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 | -------------------------------------------------------------------------------- /native/ios/demo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /native/ios/demo/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 | -------------------------------------------------------------------------------- /native/ios/demo/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 | #import "RCTEventDispatcher.h" 14 | #import "ABYServer.h" 15 | #import "ABYContextManager.h" 16 | #import "RCTContextExecutor.h" 17 | 18 | /** 19 | This class exists so that a client-created `JSGlobalContextRef` 20 | instance and optional JavaScript thread can be injected 21 | into an `RCTContextExecutor`. 22 | */ 23 | @interface ABYContextExecutor : RCTContextExecutor 24 | 25 | /** 26 | Sets the JavaScript thread that will be used when `init`ing 27 | an instance of this class. If not set, `[NSThread mainThread]` 28 | will be used. 29 | 30 | @param thread the thread 31 | */ 32 | +(void) setJavaScriptThread:(NSThread*)thread; 33 | 34 | /** 35 | Sets the context that will be used when `init`ing an instance 36 | of this class. 37 | @param context the context 38 | */ 39 | +(void) setContext:(JSGlobalContextRef)context; 40 | 41 | @end 42 | 43 | static NSThread* staticJavaScriptThread = nil; 44 | static JSGlobalContextRef staticContext; 45 | 46 | @implementation ABYContextExecutor 47 | 48 | RCT_EXPORT_MODULE() 49 | 50 | - (instancetype)init 51 | { 52 | id me = [self initWithJavaScriptThread:(staticJavaScriptThread ? staticJavaScriptThread : [NSThread mainThread]) 53 | globalContextRef:staticContext]; 54 | staticJavaScriptThread = nil; 55 | JSGlobalContextRelease(staticContext); 56 | return me; 57 | } 58 | 59 | +(void) setJavaScriptThread:(NSThread*)thread 60 | { 61 | staticJavaScriptThread = thread; 62 | } 63 | 64 | +(void) setContext:(JSGlobalContextRef)context 65 | { 66 | staticContext = JSGlobalContextRetain(context); 67 | } 68 | 69 | @end 70 | 71 | 72 | @interface AppDelegate() 73 | 74 | @property (strong, nonatomic) ABYServer* replServer; 75 | @property (strong, nonatomic) ABYContextManager* contextManager; 76 | @property (strong, nonatomic) NSURL* compilerOutputDirectory; 77 | 78 | @end 79 | 80 | @implementation AppDelegate 81 | 82 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 83 | { 84 | NSURL *jsCodeLocation; 85 | 86 | /** 87 | * Loading JavaScript code - uncomment the one you want. 88 | * 89 | * OPTION 1 90 | * Load from development server. Start the server from the repository root: 91 | * 92 | * $ npm start 93 | * 94 | * To run on device, change `localhost` to the IP address of your computer 95 | * (you can get this by typing `ifconfig` into the terminal and selecting the 96 | * `inet` value under `en0:`) and make sure your computer and iOS device are 97 | * on the same Wi-Fi network. 98 | */ 99 | 100 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; 101 | 102 | /** 103 | * OPTION 2 104 | * Load from pre-bundled file on disk. To re-generate the static bundle 105 | * from the root of your project directory, run 106 | * 107 | * $ react-native bundle --minify 108 | * 109 | * see http://facebook.github.io/react-native/docs/runningondevice.html 110 | */ 111 | 112 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 113 | 114 | // Set up the ClojureScript compiler output directory 115 | self.compilerOutputDirectory = [[self privateDocumentsDirectory] URLByAppendingPathComponent:@"cljs-out"]; 116 | 117 | // Set up our context manager 118 | self.contextManager = [[ABYContextManager alloc] initWithContext:JSGlobalContextCreate(NULL) 119 | compilerOutputDirectory:self.compilerOutputDirectory]; 120 | 121 | // Inject our context using ABYContextExecutor 122 | [ABYContextExecutor setContext:self.contextManager.context]; 123 | 124 | // Set React Native to intstantiate our ABYContextExecutor, doing this by slipping the executorClass 125 | // assignement between alloc and initWithBundleURL:moduleProvider:launchOptions: 126 | RCTBridge *bridge = [RCTBridge alloc]; 127 | bridge.executorClass = [ABYContextExecutor class]; 128 | bridge = [bridge initWithBundleURL:jsCodeLocation 129 | moduleProvider:nil 130 | launchOptions:launchOptions]; 131 | 132 | // Set up a root view using the bridge defined above 133 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 134 | moduleName:@"demo" 135 | initialProperties:nil]; 136 | 137 | // Set up to be notified when the React Native UI is up 138 | [[NSNotificationCenter defaultCenter] addObserver:self 139 | selector:@selector(contentDidAppear) 140 | name:RCTContentDidAppearNotification 141 | object:rootView]; 142 | 143 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 144 | UIViewController *rootViewController = [[UIViewController alloc] init]; 145 | rootViewController.view = rootView; 146 | self.window.rootViewController = rootViewController; 147 | [self.window makeKeyAndVisible]; 148 | return YES; 149 | } 150 | 151 | - (NSURL *)privateDocumentsDirectory 152 | { 153 | NSURL *libraryDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject]; 154 | 155 | return [libraryDirectory URLByAppendingPathComponent:@"Private Documents"]; 156 | } 157 | 158 | - (void)createDirectoriesUpTo:(NSURL*)directory 159 | { 160 | if (![[NSFileManager defaultManager] fileExistsAtPath:[directory path]]) { 161 | NSError *error = nil; 162 | 163 | if (![[NSFileManager defaultManager] createDirectoryAtPath:[directory path] 164 | withIntermediateDirectories:YES 165 | attributes:nil 166 | error:&error]) { 167 | NSLog(@"Can't create directory %@ [%@]", [directory path], error); 168 | abort(); 169 | } 170 | } 171 | } 172 | 173 | -(void)requireAppNamespaces:(JSContext*)context 174 | { 175 | [context evaluateScript:[NSString stringWithFormat:@"goog.require('%@');", [self munge:@"demo.core"]]]; 176 | } 177 | 178 | - (JSValue*)getValue:(NSString*)name inNamespace:(NSString*)namespace fromContext:(JSContext*)context 179 | { 180 | JSValue* namespaceValue = nil; 181 | for (NSString* namespaceElement in [namespace componentsSeparatedByString: @"."]) { 182 | if (namespaceValue) { 183 | namespaceValue = namespaceValue[[self munge:namespaceElement]]; 184 | } else { 185 | namespaceValue = context[[self munge:namespaceElement]]; 186 | } 187 | } 188 | 189 | return namespaceValue[[self munge:name]]; 190 | } 191 | 192 | - (NSString*)munge:(NSString*)s 193 | { 194 | return [[[s stringByReplacingOccurrencesOfString:@"-" withString:@"_"] 195 | stringByReplacingOccurrencesOfString:@"!" withString:@"_BANG_"] 196 | stringByReplacingOccurrencesOfString:@"?" withString:@"_QMARK_"]; 197 | } 198 | 199 | - (void)contentDidAppear 200 | { 201 | // Ensure private documents directory exists 202 | [self createDirectoriesUpTo:[self privateDocumentsDirectory]]; 203 | 204 | // Copy resources from bundle "out" to compilerOutputDirectory 205 | 206 | NSFileManager* fileManager = [NSFileManager defaultManager]; 207 | fileManager.delegate = self; 208 | 209 | // First blow away old compiler output directory 210 | [fileManager removeItemAtPath:self.compilerOutputDirectory.path error:nil]; 211 | 212 | // Copy files from bundle to compiler output driectory 213 | NSString *outPath = [[NSBundle mainBundle] pathForResource:@"out" ofType:nil]; 214 | [fileManager copyItemAtPath:outPath toPath:self.compilerOutputDirectory.path error:nil]; 215 | 216 | [self.contextManager setUpAmblyImportScript]; 217 | 218 | NSString* mainJsFilePath = [[self.compilerOutputDirectory URLByAppendingPathComponent:@"main" isDirectory:NO] URLByAppendingPathExtension:@"js"].path; 219 | 220 | NSURL* googDirectory = [self.compilerOutputDirectory URLByAppendingPathComponent:@"goog"]; 221 | 222 | [self.contextManager bootstrapWithDepsFilePath:mainJsFilePath 223 | googBasePath:[[googDirectory URLByAppendingPathComponent:@"base" isDirectory:NO] URLByAppendingPathExtension:@"js"].path]; 224 | 225 | JSContext* context = [JSContext contextWithJSGlobalContextRef:self.contextManager.context]; 226 | [self requireAppNamespaces:context]; 227 | 228 | JSValue* initFn = [self getValue:@"init" inNamespace:@"demo.core" fromContext:context]; 229 | NSAssert(!initFn.isUndefined, @"Could not find the app init function"); 230 | [initFn callWithArguments:@[]]; 231 | 232 | // Send a nonsense UI event to cause React Native to load our Om UI 233 | RCTRootView* rootView = (RCTRootView*)self.window.rootViewController.view; 234 | [rootView.bridge.modules[@"RCTEventDispatcher"] sendInputEventWithName:@"dummy" body:@{@"target": @1}]; 235 | 236 | // Now that React Native has been initialized, fire up our REPL server 237 | self.replServer = [[ABYServer alloc] initWithContext:self.contextManager.context 238 | compilerOutputDirectory:self.compilerOutputDirectory]; 239 | [self.replServer startListening]; 240 | } 241 | 242 | @end 243 | -------------------------------------------------------------------------------- /native/ios/demo/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 | -------------------------------------------------------------------------------- /native/ios/demo/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 | } -------------------------------------------------------------------------------- /native/ios/demo/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSAllowsArbitraryLoads 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /native/ios/demo/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 | -------------------------------------------------------------------------------- /native/ios/demoTests/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 | -------------------------------------------------------------------------------- /native/ios/demoTests/demoTests.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 "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 240 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface demoTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation demoTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /native/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 | -------------------------------------------------------------------------------- /native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node_modules/react-native/packager/packager.sh" 7 | }, 8 | "dependencies": { 9 | "react-native": "0.13.0" 10 | } 11 | } -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject hanbaiki "0.1.0-SNAPSHOT" 2 | :description "FIXME: write description" 3 | :url "http://example.com/FIXME" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :dependencies [[org.clojure/clojure "1.7.0"] 7 | [org.clojure/clojurescript "1.7.170"] 8 | [org.omcljs/om "1.0.0-alpha22-snapshot"] 9 | [org.clojure/data.json "0.2.6"] 10 | [org.omcljs/ambly "0.6.0"] 11 | [com.cognitect/transit-clj "0.8.281"] 12 | [com.cognitect/transit-cljs "0.8.225"] 13 | [org.clojure/core.async "0.1.346.0-17112a-alpha"] 14 | [cljs-http "0.1.30" :exclusions 15 | [org.clojure/clojure org.clojure/clojurescript 16 | com.cognitect/transit-cljs]] 17 | [com.cemerick/piggieback "0.2.0"]] 18 | :profiles {:dev {:dependencies [[org.clojure/tools.nrepl "0.2.10"]]}} 19 | :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]} 20 | 21 | :plugins [[lein-cljsbuild "1.1.1"]] 22 | :cljsbuild {:builds {:dev {:source-paths ["src"] 23 | :compiler {:output-to "target/out/main.js" 24 | :output-dir "target/out" 25 | :optimizations :none}}}}) 26 | -------------------------------------------------------------------------------- /server/api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvcrn/om-react-native-demo/6742951598832a6b2ad394163bd42dd186c59dbe/server/api/__init__.py -------------------------------------------------------------------------------- /server/api/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /server/api/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvcrn/om-react-native-demo/6742951598832a6b2ad394163bd42dd186c59dbe/server/api/migrations/__init__.py -------------------------------------------------------------------------------- /server/api/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /server/api/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /server/api/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from django.http import HttpResponse 3 | import json 4 | 5 | 6 | def extract_keys(data, keys): 7 | out = {} 8 | for key in keys: 9 | if key in data: 10 | out[key] = data[key] 11 | 12 | return out 13 | 14 | 15 | def extract(data, key): 16 | try: 17 | out = [] 18 | for d in data: 19 | row = {} 20 | for subquery_element in key: 21 | # print("querying for: %s in %s" % (subquery_element, d)) 22 | if type(subquery_element) == dict: 23 | sub_key = next(iter(subquery_element.keys())) 24 | sub_val = next(iter(subquery_element.values())) 25 | row[sub_key] = extract_keys(d[sub_key], sub_val) 26 | else: 27 | row[subquery_element] = d[subquery_element] 28 | 29 | out.append(row) 30 | 31 | return out 32 | except Exception as e: 33 | print(e) 34 | 35 | # Create your views here. 36 | def foo(request): 37 | 38 | query = json.loads(str(request.body, 'utf8')) 39 | print(request.body) 40 | 41 | test_data = { 42 | "~:app/posts": [ 43 | {"~:user": {"~:username": "David", "~:age": 23}, "~:id": 1, "~:content": "Hello iOS meetup!"}, 44 | {"~:user": {"~:username": "Fred", "~:age": 15}, "~:id": 2, "~:content": "Hi I'm Fred"}, 45 | {"~:user": {"~:username": "Paul", "~:age": 100}, "~:id": 3, "~:content": "Anyone wanna hang out?"}, 46 | {"~:user": {"~:username": "Jiyoon", "~:age": 30}, "~:id": 4, "~:content": "What is this app?"}, 47 | {"~:user": {"~:username": "Bob", "~:age": 20}, "~:id": 5, "~:content": "Hey guys!"}, 48 | {"~:user": {"~:username": "Mark", "~:age": 15}, "~:id": 6, "~:content": "iOS rocks"}, 49 | {"~:user": {"~:username": "Jiwon", "~:age": 22}, "~:id": 7, "~:content": "I think android is better"}, 50 | {"~:user": {"~:username": "Dude", "~:age": 38}, "~:id": 8, "~:content": "I am on the server :)"}, 51 | ], 52 | } 53 | 54 | out = {} 55 | for queryset in query["~:remote"]: 56 | for target, subquery in queryset.items(): 57 | print("Client is requesting %s inside %s" % (subquery, target)) 58 | out[target] = extract(test_data[target], subquery) 59 | 60 | response = HttpResponse(json.dumps(out)) 61 | response['Content-Type'] = "application/json" 62 | return response 63 | -------------------------------------------------------------------------------- /server/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvcrn/om-react-native-demo/6742951598832a6b2ad394163bd42dd186c59dbe/server/db.sqlite3 -------------------------------------------------------------------------------- /server/demo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dvcrn/om-react-native-demo/6742951598832a6b2ad394163bd42dd186c59dbe/server/demo/__init__.py -------------------------------------------------------------------------------- /server/demo/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for demo project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.8.5. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.8/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.8/ref/settings/ 11 | """ 12 | 13 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 14 | import os 15 | 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '^8yv91cw9$4qvw_hn@gtplo0b0=bd4ak=f!1c=65*$4f8-imtz' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = ["*"] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = ( 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | ) 41 | 42 | MIDDLEWARE_CLASSES = ( 43 | 'django.contrib.sessions.middleware.SessionMiddleware', 44 | 'django.middleware.common.CommonMiddleware', 45 | #'django.middleware.csrf.CsrfViewMiddleware', 46 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 47 | 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 48 | 'django.contrib.messages.middleware.MessageMiddleware', 49 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 50 | 'django.middleware.security.SecurityMiddleware', 51 | ) 52 | 53 | ROOT_URLCONF = 'demo.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [], 59 | 'APP_DIRS': True, 60 | 'OPTIONS': { 61 | 'context_processors': [ 62 | 'django.template.context_processors.debug', 63 | 'django.template.context_processors.request', 64 | 'django.contrib.auth.context_processors.auth', 65 | 'django.contrib.messages.context_processors.messages', 66 | ], 67 | }, 68 | }, 69 | ] 70 | 71 | WSGI_APPLICATION = 'demo.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/1.8/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 81 | } 82 | } 83 | 84 | 85 | # Internationalization 86 | # https://docs.djangoproject.com/en/1.8/topics/i18n/ 87 | 88 | LANGUAGE_CODE = 'en-us' 89 | 90 | TIME_ZONE = 'UTC' 91 | 92 | USE_I18N = True 93 | 94 | USE_L10N = True 95 | 96 | USE_TZ = True 97 | 98 | 99 | # Static files (CSS, JavaScript, Images) 100 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ 101 | 102 | STATIC_URL = '/static/' 103 | -------------------------------------------------------------------------------- /server/demo/urls.py: -------------------------------------------------------------------------------- 1 | """hanbaiki URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.8/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Add an import: from blog import urls as blog_urls 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) 15 | """ 16 | from django.conf.urls import include, url 17 | from django.contrib import admin 18 | from api.views import foo 19 | 20 | urlpatterns = [ 21 | url(r'^admin/', include(admin.site.urls)), 22 | url(r'^api.json$', foo), 23 | ] 24 | -------------------------------------------------------------------------------- /server/demo/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for hanbaiki project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /server/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /src/demo/core.cljs: -------------------------------------------------------------------------------- 1 | ;; Need to set js/React first so that Om can load 2 | (set! js/React (js/require "react-native/Libraries/react-native/react-native.js")) 3 | 4 | (ns demo.core 5 | (:require-macros [cljs.core.async.macros :refer [go]]) 6 | (:require [om.next :as om :refer-macros [defui]] 7 | [cognitect.transit :as t] 8 | [cljs.core.async :refer [chan put!]]) 9 | (:import [goog.net XhrIo])) 10 | 11 | ;; Reset js/React back as the form above loads in an different React 12 | (set! js/React (js/require "react-native/Libraries/react-native/react-native.js")) 13 | 14 | 15 | ;; Setup some methods to help create React Native elements 16 | (defn view [opts & children] 17 | (apply js/React.createElement js/React.View (clj->js opts) children)) 18 | 19 | (defn text [opts & children] 20 | (apply js/React.createElement js/React.Text (clj->js opts) children)) 21 | 22 | (enable-console-print!) 23 | 24 | ;; Set up our Om UI 25 | (def app-state (atom {:app/msg "Welcome to om"})) 26 | 27 | (defui TimelineComponent 28 | static om/IQuery 29 | (query [this] 30 | '[:app/msg]) 31 | Object 32 | (render [this] 33 | (let [{:keys [app/msg]} (om/props this)] 34 | (view {:style {:flexDirection "column" :margin 40}} 35 | (text nil msg))))) 36 | 37 | ;; om.next parser 38 | (defmulti read om/dispatch) 39 | (defmethod read :default 40 | [{:keys [state]} k _] 41 | (let [st @state] 42 | (if-let [[_ v] (find st k)] 43 | {:value v} 44 | {:value :not-found}))) 45 | 46 | (def reconciler 47 | (om/reconciler 48 | {:state app-state 49 | :parser (om/parser {:read read}) 50 | :root-render #(.render js/React %1 %2) 51 | :root-unmount #(.unmountComponentAtNode js/React %)})) 52 | 53 | ;; (defui Post 54 | ;; static om/Ident 55 | ;; (ident [this {:keys [id]}] 56 | ;; [:post/by-id id]) 57 | ;; static om/IQuery 58 | ;; (query [this] 59 | ;; '[:id {:user [:username]} :content]) 60 | ;; Object 61 | ;; (render [this] 62 | ;; (let [{:keys [id user content]} (om/props this) 63 | ;; {:keys [username]} user] 64 | ;; (view {:style {:marginBottom 20}} 65 | ;; (text {:style {:fontSize 25}} username) 66 | ;; (text {:style {:fontSize 20}} (str ">> " content)) 67 | ;; )))) 68 | 69 | ;; (def post (om/factory Post)) 70 | 71 | 72 | ;; (defui TimelineComponent 73 | ;; static om/IQuery 74 | ;; (query [this] 75 | ;; (let [subquery (om/get-query Post)] 76 | ;; `[{:app/posts ~subquery}])) 77 | ;; Object 78 | ;; (render [this] 79 | ;; (let [{:keys [app/posts]} (om/props this)] 80 | ;; (view {:style {:flexDirection "column" :margin 40}} 81 | ;; (apply view nil 82 | ;; (map post posts)))))) 83 | 84 | ;; ;; Parsing 85 | ;; (defn transit-post [url] 86 | ;; (fn [edn cb] 87 | ;; (.send XhrIo url 88 | ;; (fn [e] 89 | ;; (this-as this 90 | ;; (cb (t/read (t/reader :json-verbose) (.getResponseText this))))) 91 | ;; "POST" (t/write (t/writer :json-verbose) edn) 92 | ;; #js {"Content-Type" "application/transit+json"}))) 93 | 94 | ;; (defn get-data [state key] 95 | ;; (let [st @state] 96 | ;; (into [] (map #(get-in st %) (get st key))))) 97 | 98 | ;; ;; om.next parser 99 | ;; (defmulti read om/dispatch) 100 | ;; (defmethod read :default 101 | ;; [{:keys [state]} k _] 102 | ;; (let [st @state] 103 | ;; (if-let [[_ v] (find st k)] 104 | ;; {:value v} 105 | ;; {:value :not-found}))) 106 | 107 | ;; (defmethod read :app/posts 108 | ;; [{:keys [state] :as env} key params] 109 | ;; (if (find @state key) 110 | ;; {:value (get-data state key)} 111 | ;; {:remote true})) 112 | 113 | ;; (def reconciler 114 | ;; (om/reconciler 115 | ;; {:state app-state 116 | ;; :parser (om/parser {:read read}) 117 | ;; :normalize true 118 | ;; :send (transit-post "http://localhost:8000/api.json") 119 | ;; :root-render #(.render js/React %1 %2) 120 | ;; :root-unmount #(.unmountComponentAtNode js/React %)})) 121 | 122 | (om/add-root! reconciler TimelineComponent 1) 123 | 124 | (defn ^:export init [] 125 | ((fn render [] 126 | (.requestAnimationFrame js/window render)))) 127 | -------------------------------------------------------------------------------- /test/demo/core_test.clj: -------------------------------------------------------------------------------- 1 | (ns demo.core-test 2 | (:require [clojure.test :refer :all] 3 | [demo.core :refer :all])) 4 | 5 | (deftest a-test 6 | (testing "FIXME, I fail." 7 | (is (= 0 1)))) 8 | --------------------------------------------------------------------------------