├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── LICENSE ├── README.md ├── __tests__ └── App-test.js ├── app.json ├── babel.config.js ├── dj-airhorn-sound-effect.mp3 ├── index.js ├── ios ├── Podfile ├── Podfile.lock ├── RealNative.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── RealNative-tvOS.xcscheme │ │ └── RealNative.xcscheme ├── RealNative.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── RealNative │ ├── Base.lproj │ └── LaunchScreen.xib │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ └── Info.plist ├── metro.config.js ├── package.json ├── patches └── react-native+0.62.0-rc.5.patch ├── src ├── AppDelegate.m ├── Components.c ├── Components.h ├── ReactNative.c ├── ReactNative.h ├── Utils.c ├── Utils.h └── main.m └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 41 | 42 | suppress_type=$FlowIssue 43 | suppress_type=$FlowFixMe 44 | suppress_type=$FlowFixMeProps 45 | suppress_type=$FlowFixMeState 46 | 47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 50 | 51 | [lints] 52 | sketchy-null-number=warn 53 | sketchy-null-mixed=warn 54 | sketchy-number=warn 55 | untyped-type-import=warn 56 | nonstrict-import=warn 57 | deprecated-type=warn 58 | unsafe-getters-setters=warn 59 | inexact-spread=warn 60 | unnecessary-invariant=warn 61 | signature-verification-failure=warn 62 | deprecated-utility=error 63 | 64 | [strict] 65 | deprecated-type 66 | nonstrict-import 67 | sketchy-null 68 | unclear-type 69 | unsafe-getters-setters 70 | untyped-import 71 | untyped-type-import 72 | 73 | [version] 74 | ^0.113.0 75 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.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 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT license 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | ██████╗ ███████╗ █████╗ ██╗ ███╗ ██╗ █████╗ ████████╗██╗██╗ ██╗███████╗ 3 | ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ██║██╔══██╗╚══██╔══╝██║██║ ██║██╔════╝ 4 | ██████╔╝█████╗ ███████║██║ ██╔██╗ ██║███████║ ██║ ██║██║ ██║█████╗ 5 | ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╗██║██╔══██║ ██║ ██║╚██╗ ██╔╝██╔══╝ 6 | ██║ ██║███████╗██║ ██║███████╗ ██║ ╚████║██║ ██║ ██║ ██║ ╚████╔╝ ███████╗ 7 | ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ 8 | ``` 9 | 10 | ℹ️ _This was [an April Fool’s 2020 project](https://twitter.com/alloy/status/1245654709421002754). While there may be interesting learnings to take away from this, I would not advice creating applications in this manner generally._ 11 | 12 | A [React Native](https://reactnative.dev) application with _only_ user-land **C** code. For those of us that _do_ want to make use of React’s approach to defining views, but also realize that modern languages like **Objective-C** and **Swift** are just too high-level. Really, stitching together views needs to be optimized as much as possible. (PRs to port this code to assembler are much appreciated.) 13 | 14 | Highlights include: 15 | 16 | * Change code, re-compile, wait. Finally have that time again to [play with swords](https://xkcd.com/303/). 17 | * No longer be required to neatly separate view/controller code from native [threaded] code that affects the entire system. 18 | * Actual **C**SS (even if just flexbox). 19 | 20 | See the [Components.c](./src/Components.c) file for the definitions of the components that make up the app and as a starting point to browse [the rest of the user-land source](./src) from. 21 | 22 | ## Install 23 | 24 | ```bash 25 | git clone https://github.com/alloy/RealNative.git 26 | cd RealNative 27 | yarn install 28 | cd ios 29 | pod install 30 | cd .. 31 | npx react-native run-ios 32 | ``` 33 | 34 | ## LICENSE 35 | 36 | Available under the [MIT license](./LICENSE). 37 | 38 | Thanks to [Richard J. Ross III](https://stackoverflow.com/users/427309/richard-j-ross-iii) for [porting](https://stackoverflow.com/a/10290255/95397) the basic scaffolding of an iOS app to C. 39 | -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RealNative", 3 | "displayName": "RealNative" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /dj-airhorn-sound-effect.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alloy/RealNative/3f1988092cd12bce674ca95d3fbf56b8bfdef2bf/dj-airhorn-sound-effect.mp3 -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry, YellowBox} from 'react-native'; 6 | import {name as appName} from './app.json'; 7 | 8 | // Metro's `require` function will warn when we use it with a path, 9 | // so disable this now before we invoke the native components. 10 | YellowBox.ignoreWarnings(['Requiring module']); 11 | 12 | AppRegistry.registerComponent(appName, () => AppComponent); 13 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | def add_flipper_pods! 5 | version = '~> 0.30.2' 6 | pod 'FlipperKit', version, :configuration => 'Debug' 7 | pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug' 8 | pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug' 9 | pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug' 10 | pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug' 11 | end 12 | 13 | # Post Install processing for Flipper 14 | def flipper_post_install(installer) 15 | installer.pods_project.targets.each do |target| 16 | if target.name == 'YogaKit' 17 | target.build_configurations.each do |config| 18 | config.build_settings['SWIFT_VERSION'] = '4.1' 19 | end 20 | end 21 | end 22 | end 23 | 24 | target 'RealNative' do 25 | # Pods for RealNative 26 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" 27 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" 28 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" 29 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" 30 | pod 'React', :path => '../node_modules/react-native/' 31 | pod 'React-Core', :path => '../node_modules/react-native/' 32 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' 33 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 34 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 35 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 36 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 37 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 38 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 39 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 40 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 41 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 42 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 43 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' 44 | 45 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 46 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 47 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 48 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 49 | pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon" 50 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 51 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true 52 | 53 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 54 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 55 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 56 | 57 | use_native_modules! 58 | 59 | # Enables Flipper. 60 | # 61 | # Note that if you have use_frameworks! enabled, Flipper will not work and 62 | # you should disable these next few lines. 63 | add_flipper_pods! 64 | post_install do |installer| 65 | flipper_post_install(installer) 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - CocoaAsyncSocket (7.6.3) 4 | - CocoaLibEvent (1.0.0) 5 | - DoubleConversion (1.1.6) 6 | - FBLazyVector (0.62.0-rc.5) 7 | - FBReactNativeSpec (0.62.0-rc.5): 8 | - Folly (= 2018.10.22.00) 9 | - RCTRequired (= 0.62.0-rc.5) 10 | - RCTTypeSafety (= 0.62.0-rc.5) 11 | - React-Core (= 0.62.0-rc.5) 12 | - React-jsi (= 0.62.0-rc.5) 13 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 14 | - Flipper (0.30.2): 15 | - Flipper-Folly (~> 2.1) 16 | - Flipper-RSocket (~> 1.0) 17 | - Flipper-DoubleConversion (1.1.7) 18 | - Flipper-Folly (2.1.1): 19 | - boost-for-react-native 20 | - CocoaLibEvent (~> 1.0) 21 | - Flipper-DoubleConversion 22 | - Flipper-Glog 23 | - OpenSSL-Universal (= 1.0.2.19) 24 | - Flipper-Glog (0.3.6) 25 | - Flipper-PeerTalk (0.0.4) 26 | - Flipper-RSocket (1.0.0): 27 | - Flipper-Folly (~> 2.0) 28 | - FlipperKit (0.30.2): 29 | - FlipperKit/Core (= 0.30.2) 30 | - FlipperKit/Core (0.30.2): 31 | - Flipper (~> 0.30.2) 32 | - FlipperKit/CppBridge 33 | - FlipperKit/FBCxxFollyDynamicConvert 34 | - FlipperKit/FBDefines 35 | - FlipperKit/FKPortForwarding 36 | - FlipperKit/CppBridge (0.30.2): 37 | - Flipper (~> 0.30.2) 38 | - FlipperKit/FBCxxFollyDynamicConvert (0.30.2): 39 | - Flipper-Folly (~> 2.1) 40 | - FlipperKit/FBDefines (0.30.2) 41 | - FlipperKit/FKPortForwarding (0.30.2): 42 | - CocoaAsyncSocket (~> 7.6) 43 | - Flipper-PeerTalk (~> 0.0.4) 44 | - FlipperKit/FlipperKitHighlightOverlay (0.30.2) 45 | - FlipperKit/FlipperKitLayoutPlugin (0.30.2): 46 | - FlipperKit/Core 47 | - FlipperKit/FlipperKitHighlightOverlay 48 | - FlipperKit/FlipperKitLayoutTextSearchable 49 | - YogaKit (~> 1.18) 50 | - FlipperKit/FlipperKitLayoutTextSearchable (0.30.2) 51 | - FlipperKit/FlipperKitNetworkPlugin (0.30.2): 52 | - FlipperKit/Core 53 | - FlipperKit/FlipperKitReactPlugin (0.30.2): 54 | - FlipperKit/Core 55 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.30.2): 56 | - FlipperKit/Core 57 | - FlipperKit/SKIOSNetworkPlugin (0.30.2): 58 | - FlipperKit/Core 59 | - FlipperKit/FlipperKitNetworkPlugin 60 | - Folly (2018.10.22.00): 61 | - boost-for-react-native 62 | - DoubleConversion 63 | - Folly/Default (= 2018.10.22.00) 64 | - glog 65 | - Folly/Default (2018.10.22.00): 66 | - boost-for-react-native 67 | - DoubleConversion 68 | - glog 69 | - glog (0.3.5) 70 | - OpenSSL-Universal (1.0.2.19): 71 | - OpenSSL-Universal/Static (= 1.0.2.19) 72 | - OpenSSL-Universal/Static (1.0.2.19) 73 | - RCTRequired (0.62.0-rc.5) 74 | - RCTTypeSafety (0.62.0-rc.5): 75 | - FBLazyVector (= 0.62.0-rc.5) 76 | - Folly (= 2018.10.22.00) 77 | - RCTRequired (= 0.62.0-rc.5) 78 | - React-Core (= 0.62.0-rc.5) 79 | - React (0.62.0-rc.5): 80 | - React-Core (= 0.62.0-rc.5) 81 | - React-Core/DevSupport (= 0.62.0-rc.5) 82 | - React-Core/RCTWebSocket (= 0.62.0-rc.5) 83 | - React-RCTActionSheet (= 0.62.0-rc.5) 84 | - React-RCTAnimation (= 0.62.0-rc.5) 85 | - React-RCTBlob (= 0.62.0-rc.5) 86 | - React-RCTImage (= 0.62.0-rc.5) 87 | - React-RCTLinking (= 0.62.0-rc.5) 88 | - React-RCTNetwork (= 0.62.0-rc.5) 89 | - React-RCTSettings (= 0.62.0-rc.5) 90 | - React-RCTText (= 0.62.0-rc.5) 91 | - React-RCTVibration (= 0.62.0-rc.5) 92 | - React-Core (0.62.0-rc.5): 93 | - Folly (= 2018.10.22.00) 94 | - glog 95 | - React-Core/Default (= 0.62.0-rc.5) 96 | - React-cxxreact (= 0.62.0-rc.5) 97 | - React-jsi (= 0.62.0-rc.5) 98 | - React-jsiexecutor (= 0.62.0-rc.5) 99 | - Yoga 100 | - React-Core/CoreModulesHeaders (0.62.0-rc.5): 101 | - Folly (= 2018.10.22.00) 102 | - glog 103 | - React-Core/Default 104 | - React-cxxreact (= 0.62.0-rc.5) 105 | - React-jsi (= 0.62.0-rc.5) 106 | - React-jsiexecutor (= 0.62.0-rc.5) 107 | - Yoga 108 | - React-Core/Default (0.62.0-rc.5): 109 | - Folly (= 2018.10.22.00) 110 | - glog 111 | - React-cxxreact (= 0.62.0-rc.5) 112 | - React-jsi (= 0.62.0-rc.5) 113 | - React-jsiexecutor (= 0.62.0-rc.5) 114 | - Yoga 115 | - React-Core/DevSupport (0.62.0-rc.5): 116 | - Folly (= 2018.10.22.00) 117 | - glog 118 | - React-Core/Default (= 0.62.0-rc.5) 119 | - React-Core/RCTWebSocket (= 0.62.0-rc.5) 120 | - React-cxxreact (= 0.62.0-rc.5) 121 | - React-jsi (= 0.62.0-rc.5) 122 | - React-jsiexecutor (= 0.62.0-rc.5) 123 | - React-jsinspector (= 0.62.0-rc.5) 124 | - Yoga 125 | - React-Core/RCTActionSheetHeaders (0.62.0-rc.5): 126 | - Folly (= 2018.10.22.00) 127 | - glog 128 | - React-Core/Default 129 | - React-cxxreact (= 0.62.0-rc.5) 130 | - React-jsi (= 0.62.0-rc.5) 131 | - React-jsiexecutor (= 0.62.0-rc.5) 132 | - Yoga 133 | - React-Core/RCTAnimationHeaders (0.62.0-rc.5): 134 | - Folly (= 2018.10.22.00) 135 | - glog 136 | - React-Core/Default 137 | - React-cxxreact (= 0.62.0-rc.5) 138 | - React-jsi (= 0.62.0-rc.5) 139 | - React-jsiexecutor (= 0.62.0-rc.5) 140 | - Yoga 141 | - React-Core/RCTBlobHeaders (0.62.0-rc.5): 142 | - Folly (= 2018.10.22.00) 143 | - glog 144 | - React-Core/Default 145 | - React-cxxreact (= 0.62.0-rc.5) 146 | - React-jsi (= 0.62.0-rc.5) 147 | - React-jsiexecutor (= 0.62.0-rc.5) 148 | - Yoga 149 | - React-Core/RCTImageHeaders (0.62.0-rc.5): 150 | - Folly (= 2018.10.22.00) 151 | - glog 152 | - React-Core/Default 153 | - React-cxxreact (= 0.62.0-rc.5) 154 | - React-jsi (= 0.62.0-rc.5) 155 | - React-jsiexecutor (= 0.62.0-rc.5) 156 | - Yoga 157 | - React-Core/RCTLinkingHeaders (0.62.0-rc.5): 158 | - Folly (= 2018.10.22.00) 159 | - glog 160 | - React-Core/Default 161 | - React-cxxreact (= 0.62.0-rc.5) 162 | - React-jsi (= 0.62.0-rc.5) 163 | - React-jsiexecutor (= 0.62.0-rc.5) 164 | - Yoga 165 | - React-Core/RCTNetworkHeaders (0.62.0-rc.5): 166 | - Folly (= 2018.10.22.00) 167 | - glog 168 | - React-Core/Default 169 | - React-cxxreact (= 0.62.0-rc.5) 170 | - React-jsi (= 0.62.0-rc.5) 171 | - React-jsiexecutor (= 0.62.0-rc.5) 172 | - Yoga 173 | - React-Core/RCTSettingsHeaders (0.62.0-rc.5): 174 | - Folly (= 2018.10.22.00) 175 | - glog 176 | - React-Core/Default 177 | - React-cxxreact (= 0.62.0-rc.5) 178 | - React-jsi (= 0.62.0-rc.5) 179 | - React-jsiexecutor (= 0.62.0-rc.5) 180 | - Yoga 181 | - React-Core/RCTTextHeaders (0.62.0-rc.5): 182 | - Folly (= 2018.10.22.00) 183 | - glog 184 | - React-Core/Default 185 | - React-cxxreact (= 0.62.0-rc.5) 186 | - React-jsi (= 0.62.0-rc.5) 187 | - React-jsiexecutor (= 0.62.0-rc.5) 188 | - Yoga 189 | - React-Core/RCTVibrationHeaders (0.62.0-rc.5): 190 | - Folly (= 2018.10.22.00) 191 | - glog 192 | - React-Core/Default 193 | - React-cxxreact (= 0.62.0-rc.5) 194 | - React-jsi (= 0.62.0-rc.5) 195 | - React-jsiexecutor (= 0.62.0-rc.5) 196 | - Yoga 197 | - React-Core/RCTWebSocket (0.62.0-rc.5): 198 | - Folly (= 2018.10.22.00) 199 | - glog 200 | - React-Core/Default (= 0.62.0-rc.5) 201 | - React-cxxreact (= 0.62.0-rc.5) 202 | - React-jsi (= 0.62.0-rc.5) 203 | - React-jsiexecutor (= 0.62.0-rc.5) 204 | - Yoga 205 | - React-CoreModules (0.62.0-rc.5): 206 | - FBReactNativeSpec (= 0.62.0-rc.5) 207 | - Folly (= 2018.10.22.00) 208 | - RCTTypeSafety (= 0.62.0-rc.5) 209 | - React-Core/CoreModulesHeaders (= 0.62.0-rc.5) 210 | - React-RCTImage (= 0.62.0-rc.5) 211 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 212 | - React-cxxreact (0.62.0-rc.5): 213 | - boost-for-react-native (= 1.63.0) 214 | - DoubleConversion 215 | - Folly (= 2018.10.22.00) 216 | - glog 217 | - React-jsinspector (= 0.62.0-rc.5) 218 | - React-jsi (0.62.0-rc.5): 219 | - boost-for-react-native (= 1.63.0) 220 | - DoubleConversion 221 | - Folly (= 2018.10.22.00) 222 | - glog 223 | - React-jsi/Default (= 0.62.0-rc.5) 224 | - React-jsi/Default (0.62.0-rc.5): 225 | - boost-for-react-native (= 1.63.0) 226 | - DoubleConversion 227 | - Folly (= 2018.10.22.00) 228 | - glog 229 | - React-jsiexecutor (0.62.0-rc.5): 230 | - DoubleConversion 231 | - Folly (= 2018.10.22.00) 232 | - glog 233 | - React-cxxreact (= 0.62.0-rc.5) 234 | - React-jsi (= 0.62.0-rc.5) 235 | - React-jsinspector (0.62.0-rc.5) 236 | - React-RCTActionSheet (0.62.0-rc.5): 237 | - React-Core/RCTActionSheetHeaders (= 0.62.0-rc.5) 238 | - React-RCTAnimation (0.62.0-rc.5): 239 | - FBReactNativeSpec (= 0.62.0-rc.5) 240 | - Folly (= 2018.10.22.00) 241 | - RCTTypeSafety (= 0.62.0-rc.5) 242 | - React-Core/RCTAnimationHeaders (= 0.62.0-rc.5) 243 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 244 | - React-RCTBlob (0.62.0-rc.5): 245 | - FBReactNativeSpec (= 0.62.0-rc.5) 246 | - Folly (= 2018.10.22.00) 247 | - React-Core/RCTBlobHeaders (= 0.62.0-rc.5) 248 | - React-Core/RCTWebSocket (= 0.62.0-rc.5) 249 | - React-jsi (= 0.62.0-rc.5) 250 | - React-RCTNetwork (= 0.62.0-rc.5) 251 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 252 | - React-RCTImage (0.62.0-rc.5): 253 | - FBReactNativeSpec (= 0.62.0-rc.5) 254 | - Folly (= 2018.10.22.00) 255 | - RCTTypeSafety (= 0.62.0-rc.5) 256 | - React-Core/RCTImageHeaders (= 0.62.0-rc.5) 257 | - React-RCTNetwork (= 0.62.0-rc.5) 258 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 259 | - React-RCTLinking (0.62.0-rc.5): 260 | - FBReactNativeSpec (= 0.62.0-rc.5) 261 | - React-Core/RCTLinkingHeaders (= 0.62.0-rc.5) 262 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 263 | - React-RCTNetwork (0.62.0-rc.5): 264 | - FBReactNativeSpec (= 0.62.0-rc.5) 265 | - Folly (= 2018.10.22.00) 266 | - RCTTypeSafety (= 0.62.0-rc.5) 267 | - React-Core/RCTNetworkHeaders (= 0.62.0-rc.5) 268 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 269 | - React-RCTSettings (0.62.0-rc.5): 270 | - FBReactNativeSpec (= 0.62.0-rc.5) 271 | - Folly (= 2018.10.22.00) 272 | - RCTTypeSafety (= 0.62.0-rc.5) 273 | - React-Core/RCTSettingsHeaders (= 0.62.0-rc.5) 274 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 275 | - React-RCTText (0.62.0-rc.5): 276 | - React-Core/RCTTextHeaders (= 0.62.0-rc.5) 277 | - React-RCTVibration (0.62.0-rc.5): 278 | - FBReactNativeSpec (= 0.62.0-rc.5) 279 | - Folly (= 2018.10.22.00) 280 | - React-Core/RCTVibrationHeaders (= 0.62.0-rc.5) 281 | - ReactCommon/turbomodule/core (= 0.62.0-rc.5) 282 | - ReactCommon/callinvoker (0.62.0-rc.5): 283 | - DoubleConversion 284 | - Folly (= 2018.10.22.00) 285 | - glog 286 | - React-cxxreact (= 0.62.0-rc.5) 287 | - ReactCommon/turbomodule/core (0.62.0-rc.5): 288 | - DoubleConversion 289 | - Folly (= 2018.10.22.00) 290 | - glog 291 | - React-Core (= 0.62.0-rc.5) 292 | - React-cxxreact (= 0.62.0-rc.5) 293 | - React-jsi (= 0.62.0-rc.5) 294 | - ReactCommon/callinvoker (= 0.62.0-rc.5) 295 | - Yoga (1.14.0) 296 | - YogaKit (1.18.1): 297 | - Yoga (~> 1.14) 298 | 299 | DEPENDENCIES: 300 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 301 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 302 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 303 | - FlipperKit (~> 0.30.2) 304 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.30.2) 305 | - FlipperKit/FlipperKitReactPlugin (~> 0.30.2) 306 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.30.2) 307 | - FlipperKit/SKIOSNetworkPlugin (~> 0.30.2) 308 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 309 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 310 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 311 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 312 | - React (from `../node_modules/react-native/`) 313 | - React-Core (from `../node_modules/react-native/`) 314 | - React-Core/DevSupport (from `../node_modules/react-native/`) 315 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 316 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 317 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 318 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 319 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 320 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 321 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 322 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 323 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 324 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 325 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 326 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 327 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 328 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 329 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 330 | - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`) 331 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 332 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 333 | 334 | SPEC REPOS: 335 | https://cdn.cocoapods.org/: 336 | - boost-for-react-native 337 | - CocoaAsyncSocket 338 | - CocoaLibEvent 339 | - Flipper 340 | - Flipper-DoubleConversion 341 | - Flipper-Folly 342 | - Flipper-Glog 343 | - Flipper-PeerTalk 344 | - Flipper-RSocket 345 | - FlipperKit 346 | - OpenSSL-Universal 347 | - YogaKit 348 | 349 | EXTERNAL SOURCES: 350 | DoubleConversion: 351 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 352 | FBLazyVector: 353 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 354 | FBReactNativeSpec: 355 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 356 | Folly: 357 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 358 | glog: 359 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 360 | RCTRequired: 361 | :path: "../node_modules/react-native/Libraries/RCTRequired" 362 | RCTTypeSafety: 363 | :path: "../node_modules/react-native/Libraries/TypeSafety" 364 | React: 365 | :path: "../node_modules/react-native/" 366 | React-Core: 367 | :path: "../node_modules/react-native/" 368 | React-CoreModules: 369 | :path: "../node_modules/react-native/React/CoreModules" 370 | React-cxxreact: 371 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 372 | React-jsi: 373 | :path: "../node_modules/react-native/ReactCommon/jsi" 374 | React-jsiexecutor: 375 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 376 | React-jsinspector: 377 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 378 | React-RCTActionSheet: 379 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 380 | React-RCTAnimation: 381 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 382 | React-RCTBlob: 383 | :path: "../node_modules/react-native/Libraries/Blob" 384 | React-RCTImage: 385 | :path: "../node_modules/react-native/Libraries/Image" 386 | React-RCTLinking: 387 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 388 | React-RCTNetwork: 389 | :path: "../node_modules/react-native/Libraries/Network" 390 | React-RCTSettings: 391 | :path: "../node_modules/react-native/Libraries/Settings" 392 | React-RCTText: 393 | :path: "../node_modules/react-native/Libraries/Text" 394 | React-RCTVibration: 395 | :path: "../node_modules/react-native/Libraries/Vibration" 396 | ReactCommon: 397 | :path: "../node_modules/react-native/ReactCommon" 398 | Yoga: 399 | :path: "../node_modules/react-native/ReactCommon/yoga" 400 | 401 | SPEC CHECKSUMS: 402 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 403 | CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 404 | CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f 405 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 406 | FBLazyVector: a9acf3fc9058f0a06ff8ff40d876025cf89fc326 407 | FBReactNativeSpec: ca7ec9c06345f5ba53118dd22db915486f27d0f7 408 | Flipper: 10b225e352595f521be0e5badddd90e241336e89 409 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 410 | Flipper-Folly: 2de3d03e0acc7064d5e4ed9f730e2f217486f162 411 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 412 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 413 | Flipper-RSocket: 1260a31c05c238eabfa9bb8a64e3983049048371 414 | FlipperKit: 88b7f0d0cf907ddc2137b85eeb7f3d4d8d9395c8 415 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 416 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28 417 | OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 418 | RCTRequired: 8f1dd8582716f10ba3763029a8313146df2ae8de 419 | RCTTypeSafety: 0fba7626dcbaccf374f72bc3249e8e64396ad536 420 | React: 9f449f4b3748d56ec37c936e6b2f43230d5a9fe7 421 | React-Core: 28a580f7e9a692c24bde0b96c3edf926f7108fe8 422 | React-CoreModules: 9be7515a0b6039b3d0907910e0b5f4dca6d78dc6 423 | React-cxxreact: a660513eb5a780094bb0f0e6240e38e7895fd2a1 424 | React-jsi: 6eb628cbb8b427609cc7867da5c390b57284fb88 425 | React-jsiexecutor: 7f96dd5e1264c67b2143e73af54f86abda99cde6 426 | React-jsinspector: a3017d13fbcb7f4c42dcbcd415b97135ac3f0f41 427 | React-RCTActionSheet: f4c23f31ca9a1f85a734ce18a31de1dfd0054ddb 428 | React-RCTAnimation: 8e7f07139ce580b939700ba4af8f8daa0da8884c 429 | React-RCTBlob: 449577dc262e0fa7455fac8468d9b64fb9a9d919 430 | React-RCTImage: a19d9fcb4986097bd58b4b0e4b9134576bb6d1c0 431 | React-RCTLinking: 21825311f405295951afd10f09e276d177f8403a 432 | React-RCTNetwork: 51feac57b893e94ee85fb46870b6bef7c4b58145 433 | React-RCTSettings: 81676b6e50109cd96db42ac8117c32716e01ab10 434 | React-RCTText: 3bd3aabfefc2317e48cc9fd5eac2023f9b9a4456 435 | React-RCTVibration: 892e403408a4cd8471071d0f447db73be21e05ab 436 | ReactCommon: da01dd55154d473c5c0538d64ff91ebacdd1f7ee 437 | Yoga: e0448a3eecac22245fae6ce1b291c557b93b06af 438 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 439 | 440 | PODFILE CHECKSUM: 52c94f6d374147b391776fb91dc465ac8f288f26 441 | 442 | COCOAPODS: 1.8.4 443 | -------------------------------------------------------------------------------- /ios/RealNative.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 07EA9E711BC512318BB1B5AA /* libPods-RealNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A7D03413498778212A72C6BA /* libPods-RealNative.a */; }; 11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 12 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 5117ECB82434D5270035A3D0 /* dj-airhorn-sound-effect.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5117ECB72434D5260035A3D0 /* dj-airhorn-sound-effect.mp3 */; }; 16 | 5117ECBB2434E1620035A3D0 /* Components.c in Sources */ = {isa = PBXBuildFile; fileRef = 5117ECBA2434E1620035A3D0 /* Components.c */; }; 17 | 5117ECBE2434F2F20035A3D0 /* Utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 5117ECBD2434F2F20035A3D0 /* Utils.c */; }; 18 | 5117ECC12434F3F80035A3D0 /* ReactNative.c in Sources */ = {isa = PBXBuildFile; fileRef = 5117ECC02434F3F70035A3D0 /* ReactNative.c */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 13B07F961A680F5B00A75B9A /* RealNative.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RealNative.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ../src/AppDelegate.m; sourceTree = ""; }; 24 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 25 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RealNative/Images.xcassets; sourceTree = ""; }; 26 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RealNative/Info.plist; sourceTree = ""; }; 27 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../src/main.m; sourceTree = ""; }; 28 | 13B42951BE453F3585FA7757 /* Pods-RealNative-RealNativeTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative-RealNativeTests.debug.xcconfig"; path = "Target Support Files/Pods-RealNative-RealNativeTests/Pods-RealNative-RealNativeTests.debug.xcconfig"; sourceTree = ""; }; 29 | 18D05479232301B4F478F681 /* Pods-RealNative.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative.debug.xcconfig"; path = "Target Support Files/Pods-RealNative/Pods-RealNative.debug.xcconfig"; sourceTree = ""; }; 30 | 233147C030663DC2903E7C36 /* libPods-RealNative-RealNativeTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RealNative-RealNativeTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 39A34F9714928489A83E2C6A /* libPods-RealNative-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RealNative-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 46D9CDC0E167B34C61F6B538 /* Pods-RealNative-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative-tvOS.release.xcconfig"; path = "Target Support Files/Pods-RealNative-tvOS/Pods-RealNative-tvOS.release.xcconfig"; sourceTree = ""; }; 33 | 4977ACF6FF78766BB27E5256 /* Pods-RealNative-RealNativeTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative-RealNativeTests.release.xcconfig"; path = "Target Support Files/Pods-RealNative-RealNativeTests/Pods-RealNative-RealNativeTests.release.xcconfig"; sourceTree = ""; }; 34 | 5117ECB72434D5260035A3D0 /* dj-airhorn-sound-effect.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = "dj-airhorn-sound-effect.mp3"; path = "../dj-airhorn-sound-effect.mp3"; sourceTree = ""; }; 35 | 5117ECB92434E1620035A3D0 /* Components.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Components.h; path = ../src/Components.h; sourceTree = ""; }; 36 | 5117ECBA2434E1620035A3D0 /* Components.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = Components.c; path = ../src/Components.c; sourceTree = ""; }; 37 | 5117ECBC2434F2F20035A3D0 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = ../src/Utils.h; sourceTree = ""; }; 38 | 5117ECBD2434F2F20035A3D0 /* Utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Utils.c; path = ../src/Utils.c; sourceTree = ""; }; 39 | 5117ECBF2434F3F70035A3D0 /* ReactNative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReactNative.h; path = ../src/ReactNative.h; sourceTree = ""; }; 40 | 5117ECC02434F3F70035A3D0 /* ReactNative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ReactNative.c; path = ../src/ReactNative.c; sourceTree = ""; }; 41 | 746C9677B7BBFCDD8B415D90 /* Pods-RealNative-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-RealNative-tvOSTests/Pods-RealNative-tvOSTests.release.xcconfig"; sourceTree = ""; }; 42 | A7D03413498778212A72C6BA /* libPods-RealNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RealNative.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | CDEBCF258429A64264F66A7D /* Pods-RealNative.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative.release.xcconfig"; path = "Target Support Files/Pods-RealNative/Pods-RealNative.release.xcconfig"; sourceTree = ""; }; 44 | DC8437EA50E7A493A9E807BE /* Pods-RealNative-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-RealNative-tvOSTests/Pods-RealNative-tvOSTests.debug.xcconfig"; sourceTree = ""; }; 45 | E181BAAF63FB0129160849D1 /* Pods-RealNative-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealNative-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-RealNative-tvOS/Pods-RealNative-tvOS.debug.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 48 | F02B44DDC1F189C6C0223566 /* libPods-RealNative-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RealNative-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | 07EA9E711BC512318BB1B5AA /* libPods-RealNative.a in Frameworks */, 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | 13B07FAE1A68108700A75B9A /* RealNative */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 13B07FB71A68108700A75B9A /* main.m */, 67 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 68 | 5117ECBF2434F3F70035A3D0 /* ReactNative.h */, 69 | 5117ECC02434F3F70035A3D0 /* ReactNative.c */, 70 | 5117ECBC2434F2F20035A3D0 /* Utils.h */, 71 | 5117ECBD2434F2F20035A3D0 /* Utils.c */, 72 | 5117ECB92434E1620035A3D0 /* Components.h */, 73 | 5117ECBA2434E1620035A3D0 /* Components.c */, 74 | 5117ECB72434D5260035A3D0 /* dj-airhorn-sound-effect.mp3 */, 75 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 76 | 13B07FB61A68108700A75B9A /* Info.plist */, 77 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 78 | ); 79 | name = RealNative; 80 | sourceTree = ""; 81 | }; 82 | 1C37005F273413251C69264F /* Pods */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 18D05479232301B4F478F681 /* Pods-RealNative.debug.xcconfig */, 86 | CDEBCF258429A64264F66A7D /* Pods-RealNative.release.xcconfig */, 87 | 13B42951BE453F3585FA7757 /* Pods-RealNative-RealNativeTests.debug.xcconfig */, 88 | 4977ACF6FF78766BB27E5256 /* Pods-RealNative-RealNativeTests.release.xcconfig */, 89 | E181BAAF63FB0129160849D1 /* Pods-RealNative-tvOS.debug.xcconfig */, 90 | 46D9CDC0E167B34C61F6B538 /* Pods-RealNative-tvOS.release.xcconfig */, 91 | DC8437EA50E7A493A9E807BE /* Pods-RealNative-tvOSTests.debug.xcconfig */, 92 | 746C9677B7BBFCDD8B415D90 /* Pods-RealNative-tvOSTests.release.xcconfig */, 93 | ); 94 | path = Pods; 95 | sourceTree = ""; 96 | }; 97 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 101 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 102 | A7D03413498778212A72C6BA /* libPods-RealNative.a */, 103 | 233147C030663DC2903E7C36 /* libPods-RealNative-RealNativeTests.a */, 104 | 39A34F9714928489A83E2C6A /* libPods-RealNative-tvOS.a */, 105 | F02B44DDC1F189C6C0223566 /* libPods-RealNative-tvOSTests.a */, 106 | ); 107 | name = Frameworks; 108 | sourceTree = ""; 109 | }; 110 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | ); 114 | name = Libraries; 115 | sourceTree = ""; 116 | }; 117 | 83CBB9F61A601CBA00E9B192 = { 118 | isa = PBXGroup; 119 | children = ( 120 | 13B07FAE1A68108700A75B9A /* RealNative */, 121 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 122 | 83CBBA001A601CBA00E9B192 /* Products */, 123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 124 | 1C37005F273413251C69264F /* Pods */, 125 | ); 126 | indentWidth = 2; 127 | sourceTree = ""; 128 | tabWidth = 2; 129 | usesTabs = 0; 130 | }; 131 | 83CBBA001A601CBA00E9B192 /* Products */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 13B07F961A680F5B00A75B9A /* RealNative.app */, 135 | ); 136 | name = Products; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 13B07F861A680F5B00A75B9A /* RealNative */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RealNative" */; 145 | buildPhases = ( 146 | C0CEA15AF81129F6DEE3A0AE /* [CP] Check Pods Manifest.lock */, 147 | FD10A7F022414F080027D42C /* Start Packager */, 148 | 13B07F871A680F5B00A75B9A /* Sources */, 149 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 150 | 13B07F8E1A680F5B00A75B9A /* Resources */, 151 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 152 | ); 153 | buildRules = ( 154 | ); 155 | dependencies = ( 156 | ); 157 | name = RealNative; 158 | productName = RealNative; 159 | productReference = 13B07F961A680F5B00A75B9A /* RealNative.app */; 160 | productType = "com.apple.product-type.application"; 161 | }; 162 | /* End PBXNativeTarget section */ 163 | 164 | /* Begin PBXProject section */ 165 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 166 | isa = PBXProject; 167 | attributes = { 168 | LastUpgradeCheck = 1130; 169 | TargetAttributes = { 170 | 13B07F861A680F5B00A75B9A = { 171 | LastSwiftMigration = 1120; 172 | }; 173 | }; 174 | }; 175 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RealNative" */; 176 | compatibilityVersion = "Xcode 3.2"; 177 | developmentRegion = en; 178 | hasScannedForEncodings = 0; 179 | knownRegions = ( 180 | en, 181 | Base, 182 | ); 183 | mainGroup = 83CBB9F61A601CBA00E9B192; 184 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 185 | projectDirPath = ""; 186 | projectRoot = ""; 187 | targets = ( 188 | 13B07F861A680F5B00A75B9A /* RealNative */, 189 | ); 190 | }; 191 | /* End PBXProject section */ 192 | 193 | /* Begin PBXResourcesBuildPhase section */ 194 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 195 | isa = PBXResourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 5117ECB82434D5270035A3D0 /* dj-airhorn-sound-effect.mp3 in Resources */, 199 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 200 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | /* End PBXResourcesBuildPhase section */ 205 | 206 | /* Begin PBXShellScriptBuildPhase section */ 207 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 208 | isa = PBXShellScriptBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | ); 212 | inputPaths = ( 213 | ); 214 | name = "Bundle React Native code and images"; 215 | outputPaths = ( 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | shellPath = /bin/sh; 219 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 220 | }; 221 | C0CEA15AF81129F6DEE3A0AE /* [CP] Check Pods Manifest.lock */ = { 222 | isa = PBXShellScriptBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | ); 226 | inputFileListPaths = ( 227 | ); 228 | inputPaths = ( 229 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 230 | "${PODS_ROOT}/Manifest.lock", 231 | ); 232 | name = "[CP] Check Pods Manifest.lock"; 233 | outputFileListPaths = ( 234 | ); 235 | outputPaths = ( 236 | "$(DERIVED_FILE_DIR)/Pods-RealNative-checkManifestLockResult.txt", 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | shellPath = /bin/sh; 240 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 241 | showEnvVarsInLog = 0; 242 | }; 243 | FD10A7F022414F080027D42C /* Start Packager */ = { 244 | isa = PBXShellScriptBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | ); 248 | inputFileListPaths = ( 249 | ); 250 | inputPaths = ( 251 | ); 252 | name = "Start Packager"; 253 | outputFileListPaths = ( 254 | ); 255 | outputPaths = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | shellPath = /bin/sh; 259 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 260 | showEnvVarsInLog = 0; 261 | }; 262 | /* End PBXShellScriptBuildPhase section */ 263 | 264 | /* Begin PBXSourcesBuildPhase section */ 265 | 13B07F871A680F5B00A75B9A /* Sources */ = { 266 | isa = PBXSourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | 5117ECBE2434F2F20035A3D0 /* Utils.c in Sources */, 270 | 5117ECBB2434E1620035A3D0 /* Components.c in Sources */, 271 | 5117ECC12434F3F80035A3D0 /* ReactNative.c in Sources */, 272 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 273 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | /* End PBXSourcesBuildPhase section */ 278 | 279 | /* Begin PBXVariantGroup section */ 280 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 281 | isa = PBXVariantGroup; 282 | children = ( 283 | 13B07FB21A68108700A75B9A /* Base */, 284 | ); 285 | name = LaunchScreen.xib; 286 | path = RealNative; 287 | sourceTree = ""; 288 | }; 289 | /* End PBXVariantGroup section */ 290 | 291 | /* Begin XCBuildConfiguration section */ 292 | 13B07F941A680F5B00A75B9A /* Debug */ = { 293 | isa = XCBuildConfiguration; 294 | baseConfigurationReference = 18D05479232301B4F478F681 /* Pods-RealNative.debug.xcconfig */; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CLANG_ENABLE_MODULES = YES; 298 | CURRENT_PROJECT_VERSION = 1; 299 | ENABLE_BITCODE = NO; 300 | ENABLE_STRICT_OBJC_MSGSEND = NO; 301 | GCC_PREPROCESSOR_DEFINITIONS = ( 302 | "$(inherited)", 303 | "FB_SONARKIT_ENABLED=1", 304 | ); 305 | INFOPLIST_FILE = RealNative/Info.plist; 306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 307 | OTHER_LDFLAGS = ( 308 | "$(inherited)", 309 | "-ObjC", 310 | "-lc++", 311 | ); 312 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 313 | PRODUCT_NAME = RealNative; 314 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 315 | SWIFT_VERSION = 5.0; 316 | VERSIONING_SYSTEM = "apple-generic"; 317 | }; 318 | name = Debug; 319 | }; 320 | 13B07F951A680F5B00A75B9A /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = CDEBCF258429A64264F66A7D /* Pods-RealNative.release.xcconfig */; 323 | buildSettings = { 324 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 325 | CLANG_ENABLE_MODULES = YES; 326 | CURRENT_PROJECT_VERSION = 1; 327 | ENABLE_STRICT_OBJC_MSGSEND = NO; 328 | INFOPLIST_FILE = RealNative/Info.plist; 329 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 330 | OTHER_LDFLAGS = ( 331 | "$(inherited)", 332 | "-ObjC", 333 | "-lc++", 334 | ); 335 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 336 | PRODUCT_NAME = RealNative; 337 | SWIFT_VERSION = 5.0; 338 | VERSIONING_SYSTEM = "apple-generic"; 339 | }; 340 | name = Release; 341 | }; 342 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 347 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 348 | CLANG_CXX_LIBRARY = "libc++"; 349 | CLANG_ENABLE_MODULES = YES; 350 | CLANG_ENABLE_OBJC_ARC = YES; 351 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 352 | CLANG_WARN_BOOL_CONVERSION = YES; 353 | CLANG_WARN_COMMA = YES; 354 | CLANG_WARN_CONSTANT_CONVERSION = YES; 355 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 356 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 357 | CLANG_WARN_EMPTY_BODY = YES; 358 | CLANG_WARN_ENUM_CONVERSION = YES; 359 | CLANG_WARN_INFINITE_RECURSION = YES; 360 | CLANG_WARN_INT_CONVERSION = YES; 361 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 362 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 366 | CLANG_WARN_STRICT_PROTOTYPES = YES; 367 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 368 | CLANG_WARN_UNREACHABLE_CODE = YES; 369 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 371 | COPY_PHASE_STRIP = NO; 372 | ENABLE_STRICT_OBJC_MSGSEND = YES; 373 | ENABLE_TESTABILITY = YES; 374 | GCC_C_LANGUAGE_STANDARD = gnu99; 375 | GCC_DYNAMIC_NO_PIC = NO; 376 | GCC_NO_COMMON_BLOCKS = YES; 377 | GCC_OPTIMIZATION_LEVEL = 0; 378 | GCC_PREPROCESSOR_DEFINITIONS = ( 379 | "DEBUG=1", 380 | "$(inherited)", 381 | ); 382 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 390 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 391 | LIBRARY_SEARCH_PATHS = ( 392 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 393 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 394 | "\"$(inherited)\"", 395 | ); 396 | MTL_ENABLE_DEBUG_INFO = YES; 397 | ONLY_ACTIVE_ARCH = YES; 398 | SDKROOT = iphoneos; 399 | }; 400 | name = Debug; 401 | }; 402 | 83CBBA211A601CBA00E9B192 /* Release */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | ALWAYS_SEARCH_USER_PATHS = NO; 406 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 407 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 408 | CLANG_CXX_LIBRARY = "libc++"; 409 | CLANG_ENABLE_MODULES = YES; 410 | CLANG_ENABLE_OBJC_ARC = YES; 411 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 412 | CLANG_WARN_BOOL_CONVERSION = YES; 413 | CLANG_WARN_COMMA = YES; 414 | CLANG_WARN_CONSTANT_CONVERSION = YES; 415 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 416 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 417 | CLANG_WARN_EMPTY_BODY = YES; 418 | CLANG_WARN_ENUM_CONVERSION = YES; 419 | CLANG_WARN_INFINITE_RECURSION = YES; 420 | CLANG_WARN_INT_CONVERSION = YES; 421 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 422 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 423 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 424 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 425 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 426 | CLANG_WARN_STRICT_PROTOTYPES = YES; 427 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 428 | CLANG_WARN_UNREACHABLE_CODE = YES; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 431 | COPY_PHASE_STRIP = YES; 432 | ENABLE_NS_ASSERTIONS = NO; 433 | ENABLE_STRICT_OBJC_MSGSEND = YES; 434 | GCC_C_LANGUAGE_STANDARD = gnu99; 435 | GCC_NO_COMMON_BLOCKS = YES; 436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 438 | GCC_WARN_UNDECLARED_SELECTOR = YES; 439 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 440 | GCC_WARN_UNUSED_FUNCTION = YES; 441 | GCC_WARN_UNUSED_VARIABLE = YES; 442 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 443 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 444 | LIBRARY_SEARCH_PATHS = ( 445 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 446 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 447 | "\"$(inherited)\"", 448 | ); 449 | MTL_ENABLE_DEBUG_INFO = NO; 450 | SDKROOT = iphoneos; 451 | VALIDATE_PRODUCT = YES; 452 | }; 453 | name = Release; 454 | }; 455 | /* End XCBuildConfiguration section */ 456 | 457 | /* Begin XCConfigurationList section */ 458 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RealNative" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 13B07F941A680F5B00A75B9A /* Debug */, 462 | 13B07F951A680F5B00A75B9A /* Release */, 463 | ); 464 | defaultConfigurationIsVisible = 0; 465 | defaultConfigurationName = Release; 466 | }; 467 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RealNative" */ = { 468 | isa = XCConfigurationList; 469 | buildConfigurations = ( 470 | 83CBBA201A601CBA00E9B192 /* Debug */, 471 | 83CBBA211A601CBA00E9B192 /* Release */, 472 | ); 473 | defaultConfigurationIsVisible = 0; 474 | defaultConfigurationName = Release; 475 | }; 476 | /* End XCConfigurationList section */ 477 | }; 478 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 479 | } 480 | -------------------------------------------------------------------------------- /ios/RealNative.xcodeproj/xcshareddata/xcschemes/RealNative-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/RealNative.xcodeproj/xcshareddata/xcschemes/RealNative.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/RealNative.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/RealNative.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/RealNative/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 | -------------------------------------------------------------------------------- /ios/RealNative/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ios/RealNative/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/RealNative/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | RealNative 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RealNative", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "postinstall": "patch-package", 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start", 10 | "test": "jest", 11 | "lint": "eslint ." 12 | }, 13 | "dependencies": { 14 | "react": "16.11.0", 15 | "react-native": "0.62.0-rc.5" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.6.2", 19 | "@babel/runtime": "^7.6.2", 20 | "@react-native-community/eslint-config": "^0.0.5", 21 | "babel-jest": "^24.9.0", 22 | "eslint": "^6.5.1", 23 | "jest": "^24.9.0", 24 | "metro-react-native-babel-preset": "^0.58.0", 25 | "patch-package": "^6.2.1", 26 | "react-test-renderer": "16.11.0" 27 | }, 28 | "jest": { 29 | "preset": "react-native" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /patches/react-native+0.62.0-rc.5.patch: -------------------------------------------------------------------------------- 1 | diff --git a/node_modules/react-native/React/.DS_Store b/node_modules/react-native/React/.DS_Store 2 | new file mode 100644 3 | index 0000000..840d889 4 | Binary files /dev/null and b/node_modules/react-native/React/.DS_Store differ 5 | diff --git a/node_modules/react-native/React/Base/RCTBridgeDelegate.h b/node_modules/react-native/React/Base/RCTBridgeDelegate.h 6 | index 2ae1b8b..483ef48 100644 7 | --- a/node_modules/react-native/React/Base/RCTBridgeDelegate.h 8 | +++ b/node_modules/react-native/React/Base/RCTBridgeDelegate.h 9 | @@ -77,4 +77,6 @@ 10 | */ 11 | - (NSDictionary *)extraLazyModuleClassesForBridge:(RCTBridge *)bridge; 12 | 13 | +- (void)bridgeDidInitializeJSGlobalContext:(void *)contextRef; 14 | + 15 | @end 16 | diff --git a/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm b/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm 17 | index 18b0e09..f83c283 100644 18 | --- a/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm 19 | +++ b/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm 20 | @@ -362,6 +362,10 @@ - (void)start 21 | dispatch_group_enter(prepareBridge); 22 | [self ensureOnJavaScriptThread:^{ 23 | [weakSelf _initializeBridge:executorFactory]; 24 | + 25 | + facebook::jsi::Runtime &runtime = *(facebook::jsi::Runtime *)weakSelf.runtime; 26 | + [weakSelf.delegate bridgeDidInitializeJSGlobalContext:runtime.context()]; 27 | + 28 | dispatch_group_leave(prepareBridge); 29 | }]; 30 | 31 | diff --git a/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp b/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp 32 | index a6e59fb..cac57f6 100644 33 | --- a/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp 34 | +++ b/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp 35 | @@ -51,6 +51,8 @@ class JSCRuntime : public jsi::Runtime { 36 | const std::string& sourceURL) override; 37 | jsi::Object global() override; 38 | 39 | + void * context() override; 40 | + 41 | std::string description() override; 42 | 43 | bool isInspectable() override; 44 | @@ -403,6 +405,10 @@ jsi::Object JSCRuntime::global() { 45 | return createObject(JSContextGetGlobalObject(ctx_)); 46 | } 47 | 48 | +void * JSCRuntime::context() { 49 | + return ctx_; 50 | +} 51 | + 52 | std::string JSCRuntime::description() { 53 | if (desc_.empty()) { 54 | desc_ = std::string(""; 55 | diff --git a/node_modules/react-native/ReactCommon/jsi/jsi/jsi.h b/node_modules/react-native/ReactCommon/jsi/jsi/jsi.h 56 | index 33e3008..835f517 100644 57 | --- a/node_modules/react-native/ReactCommon/jsi/jsi/jsi.h 58 | +++ b/node_modules/react-native/ReactCommon/jsi/jsi/jsi.h 59 | @@ -188,6 +188,8 @@ class Runtime { 60 | /// \return the global object 61 | virtual Object global() = 0; 62 | 63 | + virtual void *context() = 0; 64 | + 65 | /// \return a short printable description of the instance. This 66 | /// should only be used by logging, debugging, and other 67 | /// developer-facing callers. 68 | diff --git a/node_modules/react-native/scripts/.packager.env b/node_modules/react-native/scripts/.packager.env 69 | new file mode 100644 70 | index 0000000..361f5fb 71 | --- /dev/null 72 | +++ b/node_modules/react-native/scripts/.packager.env 73 | @@ -0,0 +1 @@ 74 | +export RCT_METRO_PORT=8081 75 | -------------------------------------------------------------------------------- /src/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * This file only has the `.m` extname so `ENABLE_STRICT_OBJC_MSGSEND` can be disabled in the build settings. 3 | * A PR to change build settings such that `.c` files are also excluded is very welcome. 4 | */ 5 | 6 | #import 7 | #import 8 | 9 | #import "Components.h" 10 | 11 | struct AppDelegate 12 | { 13 | Class isa; 14 | id window; 15 | }; 16 | 17 | Class AppDelegateClass; 18 | 19 | static void 20 | InitializeFlipper(void *application) 21 | { 22 | id layoutDescriptorMapper = objc_msgSend(objc_msgSend(objc_getClass("SKDescriptorMapper"), sel_getUid("alloc")), sel_getUid("initWithDefaults")); 23 | id layoutPlugin = objc_msgSend(objc_msgSend(objc_getClass("FlipperKitLayoutPlugin"), sel_getUid("alloc")), sel_getUid("initWithRootNode:withDescriptorMapper:"), application, layoutDescriptorMapper); 24 | id userDefaultsPlugin = objc_msgSend(objc_msgSend(objc_getClass("FKUserDefaultsPlugin"), sel_getUid("alloc")), sel_getUid("initWithSuiteName:"), NULL); 25 | id reactPlugin = objc_msgSend(objc_getClass("FlipperKitReactPlugin"), sel_getUid("new")); 26 | id networkPlugin = objc_msgSend(objc_msgSend(objc_getClass("FlipperKitNetworkPlugin"), sel_getUid("alloc")), sel_getUid("initWithNetworkAdapter:"), objc_msgSend(objc_getClass("SKIOSNetworkAdapter"), sel_getUid("new"))); 27 | 28 | id flipperClient = objc_msgSend(objc_getClass("FlipperClient"), sel_getUid("sharedClient")); 29 | objc_msgSend(flipperClient, sel_getUid("addPlugin:"), layoutPlugin); 30 | objc_msgSend(flipperClient, sel_getUid("addPlugin:"), userDefaultsPlugin); 31 | objc_msgSend(flipperClient, sel_getUid("addPlugin:"), reactPlugin); 32 | objc_msgSend(flipperClient, sel_getUid("addPlugin:"), networkPlugin); 33 | objc_msgSend(flipperClient, sel_getUid("start")); 34 | } 35 | 36 | static BOOL 37 | AppDelegate_didFinishLaunching(struct AppDelegate *self, SEL _cmd, void *application, void *options) 38 | { 39 | InitializeFlipper(application); 40 | 41 | id bridge = objc_msgSend(objc_msgSend(objc_getClass("RCTBridge"), sel_getUid("alloc")), sel_getUid("initWithDelegate:launchOptions:"), self, NULL); 42 | id rootView = objc_msgSend(objc_msgSend(objc_getClass("RCTRootView"), sel_getUid("alloc")), sel_getUid("initWithBridge:moduleName:initialProperties:"), bridge, CFSTR("RealNative"), NULL); 43 | 44 | CGRect (*getBounds)(id receiver, SEL operation); 45 | getBounds = (CGRect (*)(id, SEL))objc_msgSend_stret; 46 | CGRect screenRect = getBounds(objc_msgSend(objc_getClass("UIScreen"), sel_getUid("mainScreen")), sel_getUid("bounds")); 47 | self->window = objc_msgSend(objc_getClass("UIWindow"), sel_getUid("alloc")); 48 | self->window = objc_msgSend(self->window, sel_getUid("initWithFrame:"), screenRect); 49 | 50 | id viewController = objc_msgSend(objc_msgSend(objc_getClass("UIViewController"), sel_getUid("alloc")), sel_getUid("init")); 51 | objc_msgSend(viewController, sel_getUid("setView:"), rootView); 52 | objc_msgSend(self->window, sel_getUid("setRootViewController:"), viewController); 53 | objc_msgSend(self->window, sel_getUid("makeKeyAndVisible")); 54 | 55 | return YES; 56 | } 57 | 58 | static id 59 | AppDelegate_window(struct AppDelegate *self, SEL _cmd) 60 | { 61 | return self->window; 62 | } 63 | 64 | static id 65 | AppDelegate_sourceURLForBridge(struct AppDelegate *self, SEL _cmd, id bridge) 66 | { 67 | return objc_msgSend(objc_msgSend(objc_getClass("RCTBundleURLProvider"), sel_getUid("sharedSettings")), sel_getUid("jsBundleURLForBundleRoot:fallbackResource:"), CFSTR("index"), NULL); 68 | } 69 | 70 | static void 71 | AppDelegate_bridgeDidInitializeJSGlobalContext(struct AppDelegate *self, SEL _cmd, void *contextRef) 72 | { 73 | DefineComponents((JSGlobalContextRef)contextRef); 74 | } 75 | 76 | __attribute__((constructor)) 77 | static void InitializeAppDelegate() 78 | { 79 | AppDelegateClass = objc_allocateClassPair(objc_getClass("UIResponder"), "AppDelegate", 0); 80 | class_addIvar(AppDelegateClass, "window", sizeof(id), 0, "@"); 81 | class_addMethod(AppDelegateClass, sel_getUid("window"), (IMP)AppDelegate_window, "i@:"); 82 | class_addMethod(AppDelegateClass, sel_getUid("application:didFinishLaunchingWithOptions:"), (IMP)AppDelegate_didFinishLaunching, "i@:@@"); 83 | class_addMethod(AppDelegateClass, sel_getUid("sourceURLForBridge:"), (IMP)AppDelegate_sourceURLForBridge, "i@:@"); 84 | class_addMethod(AppDelegateClass, sel_getUid("bridgeDidInitializeJSGlobalContext:"), (IMP)AppDelegate_bridgeDidInitializeJSGlobalContext, "i@:@^v"); 85 | objc_registerClassPair(AppDelegateClass); 86 | } 87 | -------------------------------------------------------------------------------- /src/Components.c: -------------------------------------------------------------------------------- 1 | #import "Components.h" 2 | #import "Utils.h" 3 | #import "ReactNative.h" 4 | 5 | #import 6 | 7 | static SystemSoundID AirhornSoundID = 0; 8 | 9 | #pragma mark - 10 | #pragma mark Components 11 | 12 | /** 13 | * ```js 14 | * () => { 15 | * AudioServicesPlaySystemSound(AirhornSoundID); 16 | * console.log("Pew Pew Peeeeeew"); 17 | * } 18 | * ``` 19 | */ 20 | static JSValueRef 21 | DJAirhornButtonOnPressHandler( 22 | JSContextRef ctx, 23 | JSObjectRef function, 24 | JSObjectRef thisObject, 25 | size_t argumentCount, 26 | const JSValueRef arguments[], 27 | JSValueRef* exception 28 | ) { 29 | AudioServicesPlaySystemSound(AirhornSoundID); 30 | 31 | JSStringRef message = JSStringCreateWithUTF8CString("Pew Pew Peeeeeew"); 32 | ConsoleLog(ctx, JSValueMakeString(ctx, message)); 33 | JSStringRelease(message); 34 | 35 | return JSValueMakeUndefined(ctx); 36 | } 37 | 38 | /** 39 | * ```js 40 | * () => { 41 | * const RNButtonComponent = require("react-native").Button; 42 | * const props = { 43 | * title: "Pew Pew Peeeeeew", 44 | * onPress: DJAirhornButtonOnPressHandler, 45 | * }; 46 | * return React.createElement(RNButtonComponent, props); 47 | * } 48 | * ``` 49 | */ 50 | static JSValueRef 51 | DJAirhornButtonComponent( 52 | JSContextRef ctx, 53 | JSObjectRef function, 54 | JSObjectRef thisObject, 55 | size_t argumentCount, 56 | const JSValueRef arguments[], 57 | JSValueRef* exception 58 | ) { 59 | JSObjectRef RNButtonComponent = (JSObjectRef)ObjectGet(ctx, ReactNativeModule(ctx), "Button"); 60 | 61 | JSObjectRef props = JSObjectMake(ctx, NULL, NULL); 62 | ObjectSetString(ctx, props, "title", "Pew Pew Peeeeeew"); 63 | ObjectSetValue(ctx, props, "onPress", JSObjectMakeFunctionWithCallback(ctx, NULL, &DJAirhornButtonOnPressHandler)); 64 | 65 | JSValueRef element = ReactCreateElement(ctx, RNButtonComponent, props, NULL); 66 | return element; 67 | } 68 | 69 | /** 70 | * ```js 71 | * (props) => { 72 | * const RNViewComponent = require("react-native").View; 73 | * const children = props.children; 74 | * const containerStyle = { 75 | * flex: 1, 76 | * backgroundColor: "#f60", 77 | * justifyContent: "center", 78 | * alignItems: "center", 79 | * }; 80 | * const containerProps = { 81 | * style: containerStyle, 82 | * }; 83 | * return React.createElement(RNViewComponent, containerProps, children); 84 | * } 85 | * ``` 86 | */ 87 | static JSValueRef 88 | ContainerComponent( 89 | JSContextRef ctx, 90 | JSObjectRef function, 91 | JSObjectRef thisObject, 92 | size_t argumentCount, 93 | const JSValueRef arguments[], 94 | JSValueRef* exception 95 | ) { 96 | JSObjectRef RNViewComponent = (JSObjectRef)ObjectGet(ctx, ReactNativeModule(ctx), "View"); 97 | 98 | JSObjectRef props = (JSObjectRef)arguments[0]; 99 | JSObjectRef children = (JSObjectRef)ObjectGet(ctx, props, "children"); 100 | 101 | /** 102 | * Putting the C back in CSS 103 | */ 104 | JSObjectRef containerStyle = JSObjectMake(ctx, NULL, NULL); 105 | ObjectSetNumber(ctx, containerStyle, "flex", 1); 106 | ObjectSetString(ctx, containerStyle, "backgroundColor", "#f60"); 107 | ObjectSetString(ctx, containerStyle, "justifyContent", "center"); 108 | ObjectSetString(ctx, containerStyle, "alignItems", "center"); 109 | 110 | JSObjectRef containerProps = JSObjectMake(ctx, NULL, NULL); 111 | ObjectSetValue(ctx, containerProps, "style", containerStyle); 112 | 113 | JSValueRef element = ReactCreateElement(ctx, RNViewComponent, containerProps, children); 114 | return element; 115 | } 116 | 117 | /** 118 | * ```js 119 | * (props) => { 120 | * const buttonProps = { 121 | * key: "epic-button", 122 | * }; 123 | * const buttonElement = React.createElement(DJAirhornButtonComponent, buttonProps); 124 | * const containerProps = { 125 | * style: containerStyle, 126 | * }; 127 | * const containerElement = React.createElement(ContainerComponent, null, [buttonElement]); 128 | * console.log(containerElement); 129 | * return containerElement; 130 | * } 131 | * ``` 132 | */ 133 | static JSValueRef 134 | AppComponent( 135 | JSContextRef ctx, 136 | JSObjectRef function, 137 | JSObjectRef thisObject, 138 | size_t argumentCount, 139 | const JSValueRef arguments[], 140 | JSValueRef* exception 141 | ) { 142 | JSObjectRef globalObject = JSContextGetGlobalObject(ctx); 143 | JSObjectRef DJAirhornButtonComponent = (JSObjectRef)ObjectGet(ctx, globalObject, "DJAirhornButtonComponent"); 144 | JSObjectRef ContainerComponent = (JSObjectRef)ObjectGet(ctx, globalObject, "ContainerComponent"); 145 | 146 | JSObjectRef buttonProps = JSObjectMake(ctx, NULL, NULL); 147 | ObjectSetString(ctx, buttonProps, "key", "epic-button"); 148 | JSValueRef buttonElement = ReactCreateElement(ctx, DJAirhornButtonComponent, buttonProps, NULL); 149 | 150 | JSObjectRef children = JSObjectMakeArray(ctx, 1, &buttonElement, NULL); 151 | JSValueRef containerElement = ReactCreateElement(ctx, ContainerComponent, NULL, children); 152 | 153 | // Get your console.log debugging on! 154 | ConsoleLog(ctx, containerElement); 155 | 156 | return containerElement; 157 | } 158 | 159 | #pragma mark - 160 | #pragma mark Initialize 161 | 162 | static void 163 | DefineComponent( 164 | JSContextRef ctx, 165 | char *componentName, 166 | JSObjectCallAsFunctionCallback componentImplementation 167 | ) { 168 | JSObjectRef globalObject = JSContextGetGlobalObject(ctx); 169 | JSStringRef jsComponentName = JSStringCreateWithUTF8CString(componentName); 170 | JSObjectRef component = JSObjectMakeFunctionWithCallback(ctx, jsComponentName, componentImplementation); 171 | JSStringRelease(jsComponentName); 172 | ObjectSetValue(ctx, globalObject, componentName, component); 173 | } 174 | 175 | void DefineComponents(JSContextRef ctx) 176 | { 177 | if (AirhornSoundID == 0) { 178 | CFURLRef airhornSampleURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("dj-airhorn-sound-effect"), CFSTR("mp3"), NULL); 179 | AudioServicesCreateSystemSoundID(airhornSampleURL, &AirhornSoundID); 180 | CFRelease(airhornSampleURL); 181 | } 182 | 183 | DefineComponent(ctx, "DJAirhornButtonComponent", &DJAirhornButtonComponent); 184 | DefineComponent(ctx, "ContainerComponent", &ContainerComponent); 185 | DefineComponent(ctx, "AppComponent", &AppComponent); 186 | } 187 | -------------------------------------------------------------------------------- /src/Components.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | void DefineComponents(JSContextRef ctx); 4 | -------------------------------------------------------------------------------- /src/ReactNative.c: -------------------------------------------------------------------------------- 1 | #import "ReactNative.h" 2 | #import "Utils.h" 3 | 4 | void ConsoleLog(JSContextRef ctx, JSValueRef value) 5 | { 6 | JSObjectRef globalObject = JSContextGetGlobalObject(ctx); 7 | JSObjectRef consoleObject = (JSObjectRef)ObjectGet(ctx, globalObject, "console"); 8 | JSObjectRef logFunction = (JSObjectRef)ObjectGet(ctx, consoleObject, "log"); 9 | JSObjectCallAsFunction(ctx, logFunction, NULL, 1, &value, NULL); 10 | } 11 | 12 | JSValueRef Require(JSContextRef ctx, char *moduleId) 13 | { 14 | JSObjectRef globalObject = JSContextGetGlobalObject(ctx); 15 | 16 | // This is Metro’s `require` function: 17 | // https://github.com/facebook/metro/blob/e8fecfea/packages/metro/src/lib/polyfills/require.js#L65 18 | JSObjectRef requireFunction = (JSObjectRef)ObjectGet(ctx, globalObject, "__r");\ 19 | 20 | JSStringRef moduleIdName = JSStringCreateWithUTF8CString(moduleId); 21 | JSValueRef moduleIdNameValue = JSValueMakeString(ctx, moduleIdName); 22 | JSValueRef error = NULL; 23 | JSValueRef result = JSObjectCallAsFunction(ctx, requireFunction, NULL, 1, &moduleIdNameValue, &error); 24 | JSStringRelease(moduleIdName); 25 | 26 | if (error) { 27 | ConsoleLog(ctx, error); 28 | return NULL; 29 | } else { 30 | return result; 31 | } 32 | } 33 | 34 | JSValueRef ReactCreateElement(JSContextRef ctx, JSObjectRef component, JSObjectRef props, JSValueRef children) 35 | { 36 | JSObjectRef ReactModule = (JSObjectRef)Require(ctx, "node_modules/react/index.js"); 37 | JSObjectRef createElement = (JSObjectRef)ObjectGet(ctx, ReactModule, "createElement"); 38 | 39 | if (children == NULL) { 40 | children = JSObjectMakeArray(ctx, 0, NULL, NULL); 41 | } 42 | if (props == NULL) { 43 | props = JSObjectMake(ctx, NULL, NULL); 44 | } 45 | 46 | JSValueRef args[3] = { component, props, children }; 47 | JSValueRef element = JSObjectCallAsFunction(ctx, createElement, NULL, 3, args, NULL); 48 | return element; 49 | } 50 | 51 | JSObjectRef ReactNativeModule(JSContextRef ctx) 52 | { 53 | return (JSObjectRef)Require(ctx, "node_modules/react-native/index.js"); 54 | } 55 | -------------------------------------------------------------------------------- /src/ReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | void ConsoleLog(JSContextRef ctx, JSValueRef value); 4 | 5 | JSValueRef Require(JSContextRef ctx, char *moduleId); 6 | 7 | JSObjectRef ReactNativeModule(JSContextRef ctx); 8 | 9 | // Technically from the `react` package, not `react-native` ¯\_(ツ)_/¯ 10 | JSValueRef ReactCreateElement(JSContextRef ctx, JSObjectRef component, JSObjectRef props, JSValueRef children); 11 | -------------------------------------------------------------------------------- /src/Utils.c: -------------------------------------------------------------------------------- 1 | #import "Utils.h" 2 | 3 | JSValueRef ObjectGet(JSContextRef ctx, JSObjectRef obj, char *key) 4 | { 5 | JSStringRef keyName = JSStringCreateWithUTF8CString(key); 6 | JSValueRef result = JSObjectGetProperty(ctx, obj, keyName, NULL); 7 | JSStringRelease(keyName); 8 | return result; 9 | } 10 | 11 | void ObjectSetValue(JSContextRef ctx, JSObjectRef obj, char *key, JSValueRef value) 12 | { 13 | JSStringRef k = JSStringCreateWithUTF8CString(key); 14 | JSObjectSetProperty(ctx, obj, k, value, kJSPropertyAttributeNone, NULL); 15 | JSStringRelease(k); 16 | } 17 | 18 | void ObjectSetString(JSContextRef ctx, JSObjectRef obj, char *key, char *value) 19 | { 20 | JSStringRef v = JSStringCreateWithUTF8CString(value); 21 | ObjectSetValue(ctx, obj, key, JSValueMakeString(ctx, v)); 22 | JSStringRelease(v); 23 | } 24 | 25 | void ObjectSetNumber(JSContextRef ctx, JSObjectRef obj, char *key, double value) 26 | { 27 | ObjectSetValue(ctx, obj, key, JSValueMakeNumber(ctx, value)); 28 | } 29 | -------------------------------------------------------------------------------- /src/Utils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Any self respecting JS app has got to have a ‘utils’ file. 3 | */ 4 | 5 | #import 6 | 7 | JSValueRef ObjectGet(JSContextRef ctx, JSObjectRef obj, char *key); 8 | 9 | void ObjectSetValue(JSContextRef ctx, JSObjectRef obj, char *key, JSValueRef value); 10 | 11 | void ObjectSetString(JSContextRef ctx, JSObjectRef obj, char *key, char *value); 12 | 13 | void ObjectSetNumber(JSContextRef ctx, JSObjectRef obj, char *key, double value); 14 | -------------------------------------------------------------------------------- /src/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * This file only has the `.m` extname so `ENABLE_STRICT_OBJC_MSGSEND` can be disabled in the build settings. 3 | * A PR to change build settings such that `.c` files are also excluded is very welcome. 4 | */ 5 | 6 | #import 7 | #import 8 | #import 9 | 10 | extern int UIApplicationMain(int, ...); 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | __weak id autoreleasePool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_registerName("alloc")), sel_registerName("init")); 15 | UIApplicationMain(argc, argv, nil, CFSTR("AppDelegate")); 16 | objc_msgSend(autoreleasePool, sel_registerName("drain")); 17 | } 18 | --------------------------------------------------------------------------------