├── .babelrc ├── .buckconfig ├── .expo ├── packager-info.json ├── packager-info.json.2812294343 ├── packager-info.json.639911137 └── settings.json ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .vscode ├── .react │ ├── debuggerWorker.js │ ├── index.bundle │ └── index.map ├── launch.json └── settings.json ├── .watchmanconfig ├── Icon-Round.afdesign ├── Icon.afdesign ├── LICENSE ├── Privacy.MD ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ ├── release │ │ ├── .app-release.apk.icloud │ │ ├── app-release.apk │ │ └── output.json │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── index.android.bundle │ │ └── index.android.bundle.meta │ │ ├── java │ │ └── com │ │ │ └── opencalc │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app.json ├── app ├── App.js ├── app.json ├── components │ ├── CalculatorAdditionalButtonsContainer.js │ ├── CalculatorButton.js │ ├── CalculatorButtonsContainer.js │ ├── CalculatorLandscapeButtonsContainer.js │ └── CalculatorResponse.js ├── configs │ └── Configs.js ├── constants │ ├── Colors.js │ └── Constants.js ├── core │ ├── CalculatorBrain.js │ ├── OperationTypes.js │ ├── Operations.js │ └── __tests__ │ │ └── CalculatorBrain-test.js └── utils │ ├── CalculatorUtils.js │ ├── LayoutBuilder.js │ ├── Orientation.js │ ├── Utils.js │ ├── Validator.js │ └── __tests__ │ ├── Utils-test.js │ └── Validator-test.js ├── iOS App Icon Template.afdesign ├── index.js ├── ios ├── OpenCalc-tvOS │ └── Info.plist ├── OpenCalc-tvOSTests │ └── Info.plist ├── OpenCalc.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── OpenCalc-tvOS.xcscheme │ │ └── OpenCalc.xcscheme ├── OpenCalc │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-20@3x-1.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-83.5@2x.png │ │ │ ├── Icon-Small-40.png │ │ │ ├── Icon-Small-40@2x.png │ │ │ ├── Icon-Small-40@3x.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x.png │ │ │ └── iTunesArtwork@2x.png │ │ ├── Contents.json │ │ └── iTunesArtwork.imageset │ │ │ ├── Contents.json │ │ │ ├── iTunesArtwork.png │ │ │ ├── iTunesArtwork@2x.png │ │ │ └── iTunesArtwork@3x.png │ ├── Info.plist │ └── main.m ├── OpenCalcTests │ ├── Info.plist │ └── OpenCalcTests.m └── main.jsbundle.meta ├── package-lock.json ├── package.json ├── release_notes.md └── screenshots ├── Art ├── Feature-Graphic.png └── Icon-Round.png ├── Nexus 9 ├── Screenshot_1530095758.png ├── Screenshot_1530095766.png ├── Screenshot_1530095774.png ├── Screenshot_1530095788.png ├── Screenshot_1530095795.png └── Screenshot_1530095807.png ├── Pixel 2 ├── Screenshot_1530095302.png ├── Screenshot_1530095314.png ├── Screenshot_1530095337.png ├── Screenshot_1530095349.png └── Screenshot_1530095357.png ├── iPad Air 2 ├── ipad-air-landscape.afdesign ├── ipad-air-landscape.psd ├── ipad-air-portrait.afdesign └── ipad-air-portrait.psd ├── iPad Pro 2 ├── Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-25 at 07.14.32.png ├── Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-25 at 07.14.39.png ├── Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.28.57.png ├── Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.44.49.png └── Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.45.29.png ├── iPhone 6 ├── Simulator Screen Shot - iPhone 6 - 2018-06-26 at 05.54.04.png ├── Simulator Screen Shot - iPhone 6 - 2018-06-26 at 06.07.25.png └── Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 05.26.09.png ├── iPhone 8+ ├── Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.02.png ├── Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.22.png ├── Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.46.png ├── Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.57.png └── Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.22.27.png ├── iPhone 8 ├── Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.19.png ├── Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.31.png ├── Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.56.png ├── Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.16.13.png ├── Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.16.48.png ├── iphone-8-landscape.afdesign ├── iphone-8-landscape.psd ├── iphone-8-portrait.afdesign └── iphone-8-portrait.psd └── iPhone X ├── iphone-x-landscape.afdesign ├── iphone-x-landscape.psd ├── iphone-x-portrait.afdesign └── iphone-x-portrait.psd /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.expo/packager-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "expoServerPort": null, 3 | "packagerPort": 19001, 4 | "packagerPid": 13052 5 | } -------------------------------------------------------------------------------- /.expo/packager-info.json.2812294343: -------------------------------------------------------------------------------- 1 | { 2 | "expoServerPort": null, 3 | "packagerPort": null, 4 | "packagerPid": null 5 | } -------------------------------------------------------------------------------- /.expo/packager-info.json.639911137: -------------------------------------------------------------------------------- 1 | { 2 | "expoServerPort": null, 3 | "packagerPort": null, 4 | "packagerPid": null 5 | } -------------------------------------------------------------------------------- /.expo/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "hostType": "tunnel", 3 | "lanType": "ip", 4 | "dev": true, 5 | "minify": false, 6 | "urlRandomness": null 7 | } -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | [include] 23 | 24 | [libs] 25 | node_modules/react-native/Libraries/react-native/react-native-interface.js 26 | node_modules/react-native/flow/ 27 | node_modules/react-native/flow-github/ 28 | 29 | [options] 30 | emoji=true 31 | 32 | module.system=haste 33 | 34 | munge_underscores=true 35 | 36 | 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\)$' -> 'RelativeImageStub' 37 | 38 | module.file_ext=.js 39 | module.file_ext=.jsx 40 | module.file_ext=.json 41 | module.file_ext=.native.js 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 52 | 53 | [version] 54 | ^0.75.0 55 | -------------------------------------------------------------------------------- /.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 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.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 | -------------------------------------------------------------------------------- /.vscode/.react/debuggerWorker.js: -------------------------------------------------------------------------------- 1 | 2 | // Initialize some variables before react-native code would access them 3 | var onmessage=null, self=global; 4 | // Cache Node's original require as __debug__.require 5 | global.__debug__={require: require}; 6 | // avoid Node's GLOBAL deprecation warning 7 | Object.defineProperty(global, "GLOBAL", { 8 | configurable: true, 9 | writable: true, 10 | enumerable: true, 11 | value: global 12 | }); 13 | 14 | var vscodeHandlers = { 15 | 'vscode_reloadApp': function () { 16 | try { 17 | global.require('NativeModules').DevMenu.reload(); 18 | } catch (err) { 19 | // ignore 20 | } 21 | }, 22 | 'vscode_showDevMenu': function () { 23 | try { 24 | var DevMenu = global.require('NativeModules').DevMenu.show(); 25 | } catch (err) { 26 | // ignore 27 | } 28 | } 29 | }; 30 | 31 | process.on("message", function (message) { 32 | if (message.data && vscodeHandlers[message.data.method]) { 33 | vscodeHandlers[message.data.method](); 34 | } else if(onmessage) { 35 | onmessage(message); 36 | } 37 | }); 38 | 39 | var postMessage = function(message){ 40 | process.send(message); 41 | }; 42 | 43 | if (!self.postMessage) { 44 | self.postMessage = postMessage; 45 | } 46 | 47 | var importScripts = (function(){ 48 | var fs=require('fs'), vm=require('vm'); 49 | return function(scriptUrl){ 50 | var scriptCode = fs.readFileSync(scriptUrl, "utf8"); 51 | vm.runInThisContext(scriptCode, {filename: scriptUrl}); 52 | }; 53 | })(); 54 | 55 | /** 56 | * Copyright (c) 2015-present, Facebook, Inc. 57 | * 58 | * This source code is licensed under the MIT license found in the 59 | * LICENSE file in the root directory of this source tree. 60 | */ 61 | 62 | /* global __fbBatchedBridge, self, importScripts, postMessage, onmessage: true */ 63 | /* eslint no-unused-vars: 0 */ 64 | 65 | 'use strict'; 66 | 67 | onmessage = (function() { 68 | var visibilityState; 69 | var showVisibilityWarning = (function() { 70 | var hasWarned = false; 71 | return function() { 72 | // Wait until `YellowBox` gets initialized before displaying the warning. 73 | if (hasWarned || console.warn.toString().includes('[native code]')) { 74 | return; 75 | } 76 | hasWarned = true; 77 | console.warn( 78 | 'Remote debugger is in a background tab which may cause apps to ' + 79 | 'perform slowly. Fix this by foregrounding the tab (or opening it in ' + 80 | 'a separate window).' 81 | ); 82 | }; 83 | })(); 84 | 85 | var messageHandlers = { 86 | 'executeApplicationScript': function(message, sendReply) { 87 | for (var key in message.inject) { 88 | self[key] = JSON.parse(message.inject[key]); 89 | } 90 | var error; 91 | try { 92 | importScripts(message.url); 93 | } catch (err) { 94 | error = err.message; 95 | } 96 | sendReply(null /* result */, error); 97 | }, 98 | 'setDebuggerVisibility': function(message) { 99 | visibilityState = message.visibilityState; 100 | }, 101 | }; 102 | 103 | return function(message) { 104 | if (visibilityState === 'hidden') { 105 | showVisibilityWarning(); 106 | } 107 | 108 | var object = message.data; 109 | 110 | var sendReply = function(result, error) { 111 | postMessage({replyID: object.id, result: result, error: error}); 112 | }; 113 | 114 | var handler = messageHandlers[object.method]; 115 | if (handler) { 116 | // Special cased handlers 117 | handler(object, sendReply); 118 | } else { 119 | // Other methods get called on the bridge 120 | var returnValue = [[], [], [], 0]; 121 | var error; 122 | try { 123 | if (typeof __fbBatchedBridge === 'object') { 124 | returnValue = __fbBatchedBridge[object.method].apply(null, object.arguments); 125 | } else { 126 | error = 'Failed to call function, __fbBatchedBridge is undefined'; 127 | } 128 | } catch (err) { 129 | error = err.message; 130 | } finally { 131 | sendReply(JSON.stringify(returnValue), error); 132 | } 133 | } 134 | }; 135 | })(); 136 | 137 | // Notify debugger that we're done with loading 138 | // and started listening for IPC messages 139 | postMessage({workerLoaded:true}); -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Debug Android", 9 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 10 | "type": "reactnative", 11 | "request": "launch", 12 | "platform": "android", 13 | "sourceMaps": true, 14 | "outDir": "${workspaceRoot}/.vscode/.react" 15 | }, 16 | { 17 | "name": "Debug iOS", 18 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 19 | "type": "reactnative", 20 | "request": "launch", 21 | "platform": "ios", 22 | "sourceMaps": true, 23 | "outDir": "${workspaceRoot}/.vscode/.react" 24 | }, 25 | { 26 | "name": "Attach to packager", 27 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 28 | "type": "reactnative", 29 | "request": "attach", 30 | "sourceMaps": true, 31 | "outDir": "${workspaceRoot}/.vscode/.react" 32 | }, 33 | { 34 | "name": "Debug in Exponent", 35 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 36 | "type": "reactnative", 37 | "request": "launch", 38 | "platform": "exponent", 39 | "sourceMaps": true, 40 | "outDir": "${workspaceRoot}/.vscode/.react" 41 | } 42 | ] 43 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Icon-Round.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/Icon-Round.afdesign -------------------------------------------------------------------------------- /Icon.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/Icon.afdesign -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Branko 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Privacy.MD: -------------------------------------------------------------------------------- 1 | # Privacy Policy 2 | 3 | OpenCalc is an open source app. This product is provided at no cost and is for use as is. 4 | 5 | OpenCalc does not itself collect any information on its users. There are no advertisements or tracking. 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenCalc 2 | 3 | A free (thought and beer) calculator designed for all Apple devices. 4 | 5 | - No ads, in-app-purchases, tracking or permissions 6 | - Open source 7 | - In-line calculations as you type 8 | - Ability back-space 9 | - Simple clear design 10 | 11 | [More info](https://medium.com/ml-everything/a-free-open-source-ipad-calculator-and-why-your-app-wont-make-you-any-money-41eb5bd30d0e) 12 | 13 | MIT License 14 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.opencalc", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.opencalc", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion 23 98 | buildToolsVersion '27.0.3' 99 | 100 | defaultConfig { 101 | applicationId "com.twelve31labs.opencalc" 102 | minSdkVersion 16 103 | targetSdkVersion 22 104 | versionCode 3 105 | versionName "1.10" 106 | ndk { 107 | abiFilters "armeabi-v7a", "x86" 108 | } 109 | } 110 | splits { 111 | abi { 112 | reset() 113 | enable enableSeparateBuildPerCPUArchitecture 114 | universalApk false // If true, also generate a universal APK 115 | include "armeabi-v7a", "x86" 116 | } 117 | } 118 | signingConfigs { 119 | release { 120 | if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { 121 | storeFile file(MYAPP_RELEASE_STORE_FILE) 122 | storePassword MYAPP_RELEASE_STORE_PASSWORD 123 | keyAlias MYAPP_RELEASE_KEY_ALIAS 124 | keyPassword MYAPP_RELEASE_KEY_PASSWORD 125 | } 126 | } 127 | } 128 | buildTypes { 129 | release { 130 | minifyEnabled enableProguardInReleaseBuilds 131 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 132 | signingConfig signingConfigs.release 133 | } 134 | } 135 | // applicationVariants are e.g. debug, release 136 | applicationVariants.all { variant -> 137 | variant.outputs.each { output -> 138 | // For each separate APK per architecture, set a unique version code as described here: 139 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 140 | def versionCodes = ["armeabi-v7a":1, "x86":2] 141 | def abi = output.getFilter(OutputFile.ABI) 142 | if (abi != null) { // null for the universal-debug, universal-release variants 143 | output.versionCodeOverride = 144 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 145 | } 146 | } 147 | } 148 | } 149 | 150 | dependencies { 151 | compile fileTree(dir: "libs", include: ["*.jar"]) 152 | compile "com.android.support:appcompat-v7:23.0.1" 153 | compile "com.facebook.react:react-native:+" // From node_modules 154 | } 155 | 156 | // Run this once to be able to run the application with BUCK 157 | // puts all compile dependencies into folder libs for BUCK to use 158 | task copyDownloadableDepsToLibs(type: Copy) { 159 | from configurations.compile 160 | into 'libs' 161 | } 162 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # TextLayoutBuilder uses a non-public Android constructor within StaticLayout. 54 | # See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. 55 | -dontwarn android.text.StaticLayout 56 | 57 | # okhttp 58 | 59 | -keepattributes Signature 60 | -keepattributes *Annotation* 61 | -keep class okhttp3.** { *; } 62 | -keep interface okhttp3.** { *; } 63 | -dontwarn okhttp3.** 64 | 65 | # okio 66 | 67 | -keep class sun.misc.Unsafe { *; } 68 | -dontwarn java.nio.file.* 69 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 70 | -dontwarn okio.** 71 | -------------------------------------------------------------------------------- /android/app/release/.app-release.apk.icloud: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/release/.app-release.apk.icloud -------------------------------------------------------------------------------- /android/app/release/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/release/app-release.apk -------------------------------------------------------------------------------- /android/app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.10","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 10 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/src/main/assets/index.android.bundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/src/main/assets/index.android.bundle.meta -------------------------------------------------------------------------------- /android/app/src/main/java/com/opencalc/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.twelve31labs.opencalc; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "OpenCalc"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/opencalc/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.twelve31labs.opencalc; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.shell.MainReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | 11 | import java.util.Arrays; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | return Arrays.asList( 25 | new MainReactPackage() 26 | ); 27 | } 28 | 29 | @Override 30 | protected String getJSMainModuleName() { 31 | return "index"; 32 | } 33 | }; 34 | 35 | @Override 36 | public ReactNativeHost getReactNativeHost() { 37 | return mReactNativeHost; 38 | } 39 | 40 | @Override 41 | public void onCreate() { 42 | super.onCreate(); 43 | SoLoader.init(this, /* native exopackage */ false); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | OpenCalc 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.1.3' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | mavenLocal() 20 | jcenter() 21 | maven { 22 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 23 | url "$rootDir/../node_modules/react-native/android" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | 22 | MYAPP_RELEASE_STORE_FILE=my-release-key.keystore 23 | MYAPP_RELEASE_KEY_ALIAS=my-key-alias 24 | MYAPP_RELEASE_STORE_PASSWORD=detonate 25 | MYAPP_RELEASE_KEY_PASSWORD=detonate -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jun 19 08:42:13 EEST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'OpenCalc' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OpenCalc", 3 | "displayName": "OpenCalc" 4 | } -------------------------------------------------------------------------------- /app/App.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {StyleSheet, View, Clipboard} from 'react-native'; 4 | 5 | import CalculatorResponse from './components/CalculatorResponse'; 6 | 7 | import CalculatorBrain from './core/CalculatorBrain'; 8 | 9 | import Colors from './constants/Colors'; 10 | import Constants from './constants/Constants' 11 | 12 | import LayoutBuilder from './utils/LayoutBuilder' 13 | import {isNumeric} from './utils/Utils' 14 | import { Orientation, OrientationType } from './utils/Orientation'; 15 | 16 | import Toast, {DURATION} from 'react-native-easy-toast'; 17 | 18 | type Props = { 19 | brain: CalculatorBrain, 20 | }; 21 | 22 | type State = { 23 | topDisplay: string, 24 | bottomDisplay: string, 25 | altButtons: boolean, 26 | orientation: number, 27 | }; 28 | 29 | export default class App extends Component { 30 | static defaultProps = { 31 | brain: new CalculatorBrain() 32 | }; 33 | 34 | state = { 35 | topDisplay: ' ', 36 | bottomDisplay: ' ', 37 | altButtons: false, 38 | orientation: OrientationType.Portrait, 39 | }; 40 | 41 | componentDidMount() { 42 | this._updateOrientation(); 43 | } 44 | 45 | _updateOrientation() { 46 | const orientation = Orientation.getOrientation(); 47 | this.setState({ 48 | orientation: orientation}); 49 | } 50 | 51 | _orientationDidChange() { 52 | this._updateOrientation(); 53 | } 54 | 55 | _reset() { 56 | this.props.brain.clear(); 57 | this.updateDisplay(); 58 | } 59 | 60 | _handleCopyPress() { 61 | const bottomDisplay: string = this.props.brain.getResult().replace(' ','').replace(',',''); 62 | const topDisplay: string = this.props.brain.getDisplay().replace(' ','').replace(',',''); 63 | const saveString = isNumeric(bottomDisplay) ? bottomDisplay : isNumeric(topDisplay) ? topDisplay : null; 64 | if (saveString) { 65 | Clipboard.setString(saveString); 66 | this.refs.toast.show('Copied ' + saveString + ' to clipboard', DURATION.LENGTH_SHORT, () => {}); 67 | } else { 68 | this.refs.toast.show('Unable to copy to clipboard', DURATION.LENGTH_SHORT, () => {}); 69 | } 70 | } 71 | 72 | async _handlePastePress() { 73 | const value = await Clipboard.getString(); 74 | 75 | if (isNumeric(value)) { 76 | this.props.brain.clear(); 77 | this.props.brain.setItem(value); 78 | this.updateDisplay(); 79 | } else { 80 | this.refs.toast.show('Invalid clipboard value of ' + value); 81 | } 82 | } 83 | 84 | _handleButtonPress(button: string) { 85 | this.props.brain.setItem(button); 86 | this.updateDisplay(); 87 | } 88 | 89 | _deleteLast() { 90 | this.props.brain.deleteLast(); 91 | this.updateDisplay(); 92 | } 93 | 94 | _switchButtons() { 95 | this.setState({altButtons: !this.state.altButtons}); 96 | } 97 | 98 | updateDisplay() { 99 | const newTopDisplay = this.props.brain.getDisplay(); 100 | const newBottomDisplay = this.props.brain.getResult(); 101 | this.setState({ 102 | topDisplay: newTopDisplay, 103 | bottomDisplay: newBottomDisplay 104 | }); 105 | } 106 | 107 | render() { 108 | const buttonContainer = LayoutBuilder.buildButtonContainer( 109 | this, 110 | this.state.orientation, 111 | this.state.altButtons, 112 | this._handleButtonPress, 113 | this._reset, 114 | this._deleteLast, 115 | this._handleCopyPress, 116 | this._handlePastePress, 117 | this._switchButtons, 118 | ); 119 | 120 | return ( 121 | 122 | 123 | 127 | {buttonContainer} 128 | 129 | ); 130 | } 131 | } 132 | 133 | const styles = StyleSheet.create({ 134 | container: { 135 | flex: 1, 136 | backgroundColor: Colors.BLUE_DARK 137 | }, 138 | sideMenu: { 139 | backgroundColor: Colors.BLUE_DARK 140 | } 141 | }); 142 | -------------------------------------------------------------------------------- /app/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OpenCalc", 3 | "displayName": "OpenCalc", 4 | "expo": { 5 | "sdkVersion": "27.0.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /app/components/CalculatorAdditionalButtonsContainer.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {View, StyleSheet} from 'react-native'; 4 | import CalculatorButton from './CalculatorButton'; 5 | 6 | type Props = { 7 | handleButtonPress: (string) => any, 8 | reset: () => any, 9 | deleteLast: () => any, 10 | copy: () => any, 11 | paste: () => any, 12 | switchButton: () => any, 13 | }; 14 | 15 | class CalculatorAdditionalButtonsContainer extends Component { 16 | render() { 17 | const {handleButtonPress, reset, deleteLast, copy, paste, switchButton} = this.props; 18 | 19 | return ( 20 | 21 | 22 | 23 | 24 | '} handleButtonPress={switchButton}/> 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ); 65 | } 66 | } 67 | 68 | const styles = StyleSheet.create({ 69 | container: { 70 | flex: 3, 71 | }, 72 | 73 | row: { 74 | flex: 1, 75 | flexDirection: 'row', 76 | }, 77 | 78 | buttonGroup: { 79 | flex: 10, 80 | }, 81 | 82 | switchButtonGroup: { 83 | flex: 1, 84 | }, 85 | 86 | }); 87 | 88 | export default CalculatorAdditionalButtonsContainer; 89 | -------------------------------------------------------------------------------- /app/components/CalculatorButton.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {Text, StyleSheet, TouchableOpacity} from 'react-native'; 4 | import Colors from '../constants/Colors'; 5 | import Constants from '../constants/Constants' 6 | 7 | type Props = { 8 | operator: string, 9 | handleButtonPress: (string) => any, 10 | } 11 | 12 | class CalculatorButton extends Component { 13 | render() { 14 | const {operator, handleButtonPress} = this.props; 15 | 16 | return ( 17 | handleButtonPress(operator)}> 20 | 21 | {operator} 22 | 23 | 24 | ); 25 | } 26 | } 27 | 28 | const styles = StyleSheet.create({ 29 | container: { 30 | flex: 1, 31 | justifyContent: 'center', 32 | alignItems: 'center', 33 | backgroundColor: Colors.BLUE_LIGHT, 34 | borderColor: Colors.BLUE_LIGHT, 35 | 36 | margin: 1 37 | }, 38 | item: { 39 | color: Colors.WHITE, 40 | fontSize: 20 * (Constants.maxDimension / Constants.baseMaxDimension), 41 | } 42 | }); 43 | 44 | export default CalculatorButton; 45 | -------------------------------------------------------------------------------- /app/components/CalculatorButtonsContainer.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {View, StyleSheet} from 'react-native'; 4 | import CalculatorButton from './CalculatorButton'; 5 | 6 | type Props = { 7 | handleButtonPress: (string) => any, 8 | reset: () => any, 9 | deleteLast: () => any, 10 | switchButton: () => any, 11 | } 12 | 13 | export default class CalculatorButtonsContainer extends Component { 14 | render() { 15 | const {handleButtonPress, reset, deleteLast, switchButton} = this.props; 16 | 17 | return ( 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | ); 64 | } 65 | } 66 | 67 | const styles = StyleSheet.create({ 68 | container: { 69 | flex: 3, 70 | }, 71 | 72 | row: { 73 | flex: 1, 74 | flexDirection: 'row', 75 | }, 76 | 77 | buttonGroup: { 78 | flex: 10, 79 | }, 80 | 81 | switchButtonGroup: { 82 | flex: 1, 83 | }, 84 | 85 | }); 86 | -------------------------------------------------------------------------------- /app/components/CalculatorLandscapeButtonsContainer.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {View, StyleSheet} from 'react-native'; 4 | import CalculatorButton from './CalculatorButton'; 5 | 6 | type Props = { 7 | handleButtonPress: (string) => void, 8 | reset: () => void, 9 | deleteLast: () => void, 10 | copy: () => void, 11 | paste: () => void, 12 | }; 13 | 14 | export default class CalculatorLandscapeButtonsContainer extends Component { 15 | render() { 16 | const {handleButtonPress, reset, deleteLast, copy, paste} = this.props; 17 | 18 | return ( 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | ); 73 | } 74 | } 75 | 76 | const styles = StyleSheet.create({ 77 | container: { 78 | flex: 1.5, 79 | }, 80 | 81 | row: { 82 | flex: 1, 83 | flexDirection: 'row' 84 | } 85 | }); 86 | -------------------------------------------------------------------------------- /app/components/CalculatorResponse.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {SafeAreaView, Text, ScrollView, StyleSheet, TouchableHighlight, Alert, Clipboard, Dimensions} from 'react-native'; 4 | import Colors from '../constants/Colors'; 5 | import Constants from '../constants/Constants' 6 | 7 | import { isNumeric } from '../utils/Utils'; 8 | import { OrientationType } from '../utils/Orientation'; 9 | 10 | type Props = { 11 | topDisplay: string, 12 | bottomDisplay: string, 13 | orientation: number, 14 | }; 15 | 16 | 17 | class CalculatorResponse extends Component { 18 | topDisplayScroll: ScrollView; 19 | bottomDisplayScroll: ScrollView; 20 | 21 | constructor() { 22 | super(); 23 | } 24 | 25 | render() { 26 | const {bottomDisplay, topDisplay, orientation} = this.props; 27 | const h = Constants.height; 28 | const w = Constants.width; 29 | 30 | return ( 31 | 32 | {this.topDisplayScroll = scroll;}} 35 | onContentSizeChange={() => {this.topDisplayScroll.scrollToEnd(false);}} 36 | horizontal> 37 | {topDisplay} 38 | 39 | {this.bottomDisplayScroll = scroll;}} 42 | horizontal> 43 | {bottomDisplay} 44 | 45 | 46 | ); 47 | } 48 | } 49 | 50 | 51 | const styles = StyleSheet.create({ 52 | resultsContainer: { 53 | backgroundColor: Colors.BLUE_DARK, 54 | alignItems: 'flex-end', 55 | margin: 20, 56 | flexDirection: 'column', 57 | flex: 1, 58 | }, 59 | 60 | resultContainer: { 61 | backgroundColor: Colors.BLUE_DARK, 62 | flex: 1, 63 | }, 64 | 65 | topDisplay: { 66 | color: Colors.WHITE, 67 | fontSize: 40 * (Constants.maxDimension / Constants.baseMaxDimension), 68 | textAlignVertical: 'center', 69 | margin: 5, 70 | }, 71 | 72 | bottomDisplay: { 73 | fontSize: 45 * (Constants.maxDimension / Constants.baseMaxDimension), 74 | }, 75 | }); 76 | 77 | export default CalculatorResponse; 78 | -------------------------------------------------------------------------------- /app/configs/Configs.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | const Configs = Object.freeze({ 3 | 'MaxPrecision': 9, 4 | 'MinScientificNotation': 10e+9, 5 | 'MaxScientificNotation': 10e-9, 6 | 'ExponentialDecimalPlaces': 4, 7 | }); 8 | 9 | export default Configs -------------------------------------------------------------------------------- /app/constants/Colors.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | const Colors = Object.freeze({ 3 | BLUE_LIGHTEST: 'rgb(81,119,158)', 4 | BLUE_LIGHT: 'rgb(51,96,143)', 5 | BLUE_MEDIUM: 'rgb(32,80,130)', 6 | BLUE_DARK: 'rgb(27,71,117)', 7 | BLUE_DARKEST: 'rgb(12,54,99)', 8 | 9 | WHITE: 'rgb(255,255,255)', 10 | BLACK: 'rgb(0,0,0)', 11 | }); 12 | 13 | export default Colors; 14 | -------------------------------------------------------------------------------- /app/constants/Constants.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import {Dimensions, Platform} from 'react-native'; 3 | 4 | const Constants = Object.freeze({ 5 | height: Dimensions.get('window').height, 6 | width: Dimensions.get('window').width, 7 | maxDimension: Math.max(Dimensions.get('window').height, Dimensions.get('window').width), 8 | minDimension: Math.min(Dimensions.get('window').height, Dimensions.get('window').width), 9 | baseMaxDimension: (Platform.OS === 'ios') ? 667.0 : 750.0, 10 | }); 11 | 12 | export default Constants; -------------------------------------------------------------------------------- /app/core/CalculatorBrain.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | 3 | import {Operation, newOperation} from './Operations'; 4 | import {OperationType, OperationSubType, OperationArgs} from './OperationTypes'; 5 | 6 | import {zipWithIndexTwice, lastOrNull, isInArray, numberWithCommas, isNumeric} from '../utils/Utils'; 7 | import CalcUtils from '../utils/CalculatorUtils'; 8 | import Validator from '../utils/Validator'; 9 | 10 | export default class CalculatorBrain { 11 | queue: Array = []; 12 | cleared: boolean = true; 13 | 14 | clear() { 15 | this.queue = []; 16 | } 17 | 18 | setItem(item: string) { 19 | let op: Operation = newOperation(item, this.queue); 20 | let opToAdd: ?Operation; 21 | let cleared = false; 22 | if (op.operationType == OperationType.Equals) { 23 | opToAdd = this.setEquals(op); 24 | cleared = true; 25 | } else if (op.operationType === OperationType.Constant) { 26 | opToAdd = this.setOperand(op); 27 | } else if (op.operationType === OperationType.Operation) { 28 | opToAdd = this.setOperator(op); 29 | } else if (op.operationType === OperationType.Parenthesis) { 30 | opToAdd = this.setParenthesis(op); 31 | } 32 | 33 | if (opToAdd) { 34 | this.queue.push(opToAdd); 35 | if (opToAdd.operationArgs.has(OperationArgs.AddParenthesis)) { 36 | this.queue.push(newOperation('(')); 37 | } 38 | this.cleared = cleared; 39 | } 40 | } 41 | 42 | setEquals(op: Operation): ?Operation { 43 | if (Validator.validEquals(op, this.queue)) { 44 | const strResult: string = this.getResult(); 45 | const result: string = strResult.replace(/,/g, ''); 46 | const opArgs: Array = new Array(OperationArgs.Cleared); 47 | const opToAdd = newOperation(result, this.queue, opArgs); 48 | this.clear(); 49 | return opToAdd; 50 | } 51 | } 52 | 53 | setOperator(op: Operation): ?Operation { 54 | if (Validator.replaceOperator(op, this.queue)) { 55 | this.queue.pop(); 56 | } 57 | 58 | if (Validator.validOperator(op, this.queue)) { 59 | return op; 60 | } 61 | } 62 | 63 | setOperand(op: Operation): ?Operation { 64 | let newNumber: ?string; 65 | if (!Validator.validDigit(op.stringVal, this.queue)) { 66 | return null; 67 | } 68 | 69 | let lastOp: ?Operation = lastOrNull(this.queue); 70 | 71 | if (lastOp && ( 72 | this.cleared || 73 | lastOp.operationArgs.has(OperationArgs.NotParseable) || 74 | op.operationArgs.has(OperationArgs.NotParseable) && lastOp.operationType === OperationType.Constant) 75 | ) { 76 | this.queue.pop(); 77 | } else if (lastOp && lastOp.operationType === OperationType.Constant) { 78 | const lastNumber = this.queue.pop(); 79 | newNumber = lastNumber.stringVal + op.stringVal; 80 | } 81 | 82 | if (newNumber) { 83 | return newOperation(newNumber, this.queue); 84 | } else { 85 | return op; 86 | } 87 | } 88 | 89 | setParenthesis(op: Operation) { 90 | if (Validator.validParenthesis(op, this.queue)) { 91 | return op; 92 | } 93 | return null; 94 | } 95 | 96 | deleteLast() { 97 | if (this.queue.length === 0){ 98 | return; 99 | } 100 | 101 | const lastOpType: ?number = this.queue[this.queue.length - 1].operationType; 102 | if (lastOpType === OperationType.Constant) { 103 | const lastNum = this.queue.pop().stringVal; 104 | if (lastNum.length > 1) { 105 | const newNum = lastNum.substring(0, lastNum.length - 1); 106 | this.queue.push(newOperation(newNum, this.queue)); 107 | } 108 | } else { 109 | this.queue.pop(); 110 | } 111 | } 112 | 113 | getResult(): string { 114 | const numbers: Array = this.queue.filter(op => op.operationType === OperationType.Constant); 115 | const operatorsWithParenthesis = CalcUtils.getOperatorsWithParenthesis(this.queue); 116 | const evaluatedOps = this.evaluateParenthesis(operatorsWithParenthesis); 117 | try { 118 | const out = this.evaluate(numbers, evaluatedOps, null); 119 | if (out !== null && out !== undefined) { 120 | return numberWithCommas(out.toString()); 121 | } else { 122 | const first: ?Operation = numbers[0]; 123 | if (first && first.operationArgs.has(OperationArgs.PrintAlone)) { 124 | return numberWithCommas(first.val); 125 | } 126 | return ' '; 127 | } 128 | } catch (e) { 129 | return e.message; 130 | } 131 | } 132 | 133 | 134 | evaluateParenthesis(operators: Array, parenthesisPriority:number = 0): Array { 135 | // Returns operators with updated priority based on parenthesis 136 | if (operators.length == 0) { 137 | return operators; 138 | } 139 | 140 | const op: Operation = operators[0]; 141 | const remainingOps: Array = operators.slice(1, operators.length); 142 | let evaluatedOps: Array = []; 143 | 144 | if (op.operationType === OperationType.Parenthesis) { 145 | parenthesisPriority += op.priority; 146 | parenthesisPriority = Math.max(0, parenthesisPriority); 147 | } else { 148 | const newOp = op.copy(); 149 | newOp.priority += parenthesisPriority; 150 | evaluatedOps.push(newOp); 151 | } 152 | 153 | const remaining: Array = this.evaluateParenthesis(remainingOps, parenthesisPriority); 154 | return evaluatedOps.concat(remaining); 155 | } 156 | 157 | getDisplay(): string { 158 | if (this.queue.length === 0) { 159 | return ' ' 160 | } 161 | return this.queue.map(x => ( 162 | x.operationType == OperationType.Constant && 163 | !x.operationArgs.has(OperationArgs.PrintAsString)) ? 164 | numberWithCommas(x.stringVal, false) : 165 | x.stringVal).join(' ') 166 | } 167 | 168 | evaluate(numbers: Array, ops: Array, acc: ?number): ?number { 169 | if (ops.length === 0) { 170 | return acc; 171 | } 172 | 173 | let zippedOps: Array<[number,number,Operation]> = zipWithIndexTwice(ops); // e.g. 1 + 2 + 3 => returns (0, 0, +) (0, 0, -) 174 | let numUnary: number = 0; 175 | for (let idx = 0; idx < zippedOps.length; idx++) { 176 | // adjust for unary ops 177 | // e.g. sin cos 1 => 178 | // zippedOps = ((0, 0, sin), (1, 1, cos)) numbers = (1) 179 | // adjustedZippedOps = ((0, 0, sin), (1, 0 cos)) 180 | zippedOps[idx][1] -= numUnary; 181 | if (zippedOps[idx][2].operationSubType === OperationSubType.UnaryOp) { 182 | numUnary += 1; 183 | } 184 | } 185 | 186 | let maxPriority: [number,number,Operation] = zippedOps.reduce(function(a, b) { 187 | if (a[2].operationSubType === OperationSubType.UnaryOp) { 188 | // right to left on unary ops two unary ops 189 | // e.g. sin cos 1, evaluate cos(1) first 190 | return a[2].priority > b[2].priority ? a : b; 191 | } 192 | return a[2].priority >= b[2].priority ? a : b;}); 193 | 194 | const opIdx: number = maxPriority[0]; 195 | const numIdx: number = maxPriority[1]; 196 | const op: Operation = maxPriority[2]; 197 | 198 | const num1: ?Operation = numbers[numIdx]; 199 | const num2: ?Operation = numbers[numIdx + 1]; 200 | let head: Array = numbers.slice(0, numIdx); 201 | let tail: Array = numbers.slice(numIdx, numbers.length); 202 | 203 | let evaluatedNumber: boolean = false; 204 | 205 | if (num1) { 206 | if (op.operationSubType === OperationSubType.BackwardUnaryOp) { 207 | if (isNaN(num1.val)) { 208 | throw 'Number too long'; 209 | } 210 | acc = op.val(num1.val); 211 | tail = numbers.slice(numIdx + 1, numbers.length); 212 | evaluatedNumber = true; 213 | } else if (isInArray(op.operationSubType, Array(OperationSubType.UnaryOp, OperationSubType.BackwardUnaryOp))) { 214 | acc = op.val(num1.val); 215 | tail = numbers.slice(numIdx + 1, numbers.length); 216 | evaluatedNumber = true; 217 | } else if (op.operationSubType === OperationSubType.BinaryOp) { 218 | if (num2) { 219 | if (isNaN(num2.val)) { 220 | throw 'Number too long'; 221 | } 222 | acc = op.val(num1.val, num2.val); 223 | tail = numbers.slice(numIdx + 2, numbers.length); 224 | evaluatedNumber = true; 225 | } 226 | } 227 | } 228 | 229 | let newNumbers: Array; 230 | if (evaluatedNumber && acc !== null && acc !== undefined) { 231 | const newNumber = newOperation(acc.toString(), this.queue); 232 | newNumbers = head.concat([newNumber]).concat(tail); 233 | } else { 234 | newNumbers= head.concat(tail); 235 | } 236 | 237 | const newOps: Array = (opIdx > 0) ? 238 | ops.slice(0, opIdx).concat(ops.slice(opIdx + 1, ops.length)) : 239 | ops.slice(1, ops.length); 240 | 241 | return this.evaluate(newNumbers, newOps, acc); 242 | 243 | } 244 | } 245 | -------------------------------------------------------------------------------- /app/core/OperationTypes.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | export const OperationType = Object.freeze({ 3 | 'Constant': 1, 4 | 'Operation': 2, 5 | 'Equals': 3, 6 | 'Clear': 4, 7 | 'Parenthesis': 5, 8 | }); 9 | 10 | export const OperationSubType = Object.freeze({ 11 | 'Constant': 1, 12 | 'UnaryOp': 2, 13 | 'BackwardUnaryOp': 3, 14 | 'BinaryOp': 4, 15 | 'Equals': 5, 16 | 'Clear': 6, 17 | 'ParenthesisClose': 7, 18 | 'ParenthesisOpen': 8, 19 | }); 20 | 21 | export const OperationArgs = Object.freeze({ 22 | 'Cleared': 1, 23 | 'PrintAlone': 2, 24 | 'PrintAsString': 3, 25 | 'NotParseable': 4, 26 | 'AddParenthesis': 5, 27 | }); 28 | -------------------------------------------------------------------------------- /app/core/Operations.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import {isInArray, multiply} from '../utils/Utils'; 3 | import {OperationType, OperationSubType, OperationArgs} from './OperationTypes'; 4 | 5 | const OperationsOverloaded = Object.freeze({ 6 | '−': Object.freeze({ 7 | UnaryOp: 'neg', 8 | BinaryOp: '−' 9 | }) 10 | }); 11 | 12 | function factorial(num) 13 | { 14 | var rval=1; 15 | for (var i = 2; i <= num; i++) 16 | rval = rval * i; 17 | return rval; 18 | } 19 | 20 | export class Operation { 21 | stringVal: string; 22 | operationType: number; 23 | operationSubType: number; 24 | val: any; 25 | priority: number; 26 | operationArgs: Set; 27 | 28 | constructor( 29 | stringVal: string, 30 | operationType: number, 31 | operationSubType: number, 32 | val: any, 33 | priority: ?number, 34 | operationArgs: ?Set 35 | ) { 36 | this.stringVal = stringVal; 37 | this.operationType = operationType; 38 | this.operationSubType = operationSubType; 39 | this.val = val; 40 | this.priority = priority || -1; 41 | this.operationArgs = operationArgs || new Set(); 42 | } 43 | 44 | copy() { 45 | return new Operation(this.stringVal, this.operationType, this.operationSubType, this.val, this.priority,this.operationArgs); 46 | } 47 | } 48 | 49 | const showAsStringOptionArgs = new Set([OperationArgs.PrintAlone, OperationArgs.PrintAsString, OperationArgs.NotParseable]); 50 | const addParenthesis = new Set([OperationArgs.AddParenthesis]); 51 | 52 | export const DECIMAL = '.'; 53 | export const COMMA = ','; 54 | 55 | function roundZero(func, x) { 56 | const out = func(x); 57 | return (Math.abs(out) < Number.EPSILON) ? 0 : out; 58 | } 59 | 60 | const Operations = { 61 | '.': new Operation(DECIMAL, OperationType.Constant, OperationSubType.Constant, 0, -1), 62 | 'π': new Operation('π', OperationType.Constant, OperationSubType.Constant, Math.PI, -1, showAsStringOptionArgs), 63 | 'e': new Operation('e', OperationType.Constant, OperationSubType.Constant, Math.E, -1, showAsStringOptionArgs), 64 | '√': new Operation('√', OperationType.Operation, OperationSubType.UnaryOp, Math.sqrt, 6.0, addParenthesis), 65 | 'cos': new Operation('cos', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return roundZero(Math.cos, x)}, 6.0, addParenthesis), 66 | 'sin': new Operation('sin', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return roundZero(Math.sin, x)}, 6.0, addParenthesis), 67 | 'tan': new Operation('tan', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return roundZero(Math.tan, x)}, 6.0, addParenthesis), 68 | 'cosh': new Operation('cosh', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return roundZero(Math.cosh, x)}, 6.0, addParenthesis), 69 | 'sinh': new Operation('sinh', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return roundZero(Math.sinh, x)}, 6.0, addParenthesis), 70 | 'tanh': new Operation('tanh', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return roundZero(Math.tanh, x)}, 6.0, addParenthesis), 71 | 'log': new Operation('log', OperationType.Operation, OperationSubType.UnaryOp, Math.log, 6.0, addParenthesis), 72 | 'log10': new Operation('log10', OperationType.Operation, OperationSubType.UnaryOp, Math.log10, 6.0, addParenthesis), 73 | '%': new Operation('%', OperationType.Operation, OperationSubType.BackwardUnaryOp, function(x) {return x / 100.0}, 6.0), 74 | '!': new Operation('!', OperationType.Operation, OperationSubType.BackwardUnaryOp, function(x) {return factorial(x)}, 6.0), 75 | 'neg': new Operation('⁻', OperationType.Operation, OperationSubType.UnaryOp, function(x) {return -x;}, 6.0), 76 | '−': new Operation('−', OperationType.Operation, OperationSubType.BinaryOp, function(x, y) { return x - y; }, 2.0), 77 | '+': new Operation('+', OperationType.Operation, OperationSubType.BinaryOp, function(x, y) { return x + y; }, 2.0), 78 | '÷': new Operation('÷', OperationType.Operation, OperationSubType.BinaryOp, function(x, y) { return x / y; }, 4.0), 79 | '×': new Operation('×', OperationType.Operation, OperationSubType.BinaryOp, function(x, y) { return multiply(x, y) }, 4.0), 80 | 'xⁿ': new Operation('^', OperationType.Operation, OperationSubType.BinaryOp, function(x, y) { return Math.pow(x, y); }, 5.0), 81 | '=': new Operation('=', OperationType.Equals, OperationSubType.Equals, null), 82 | 'c': new Operation('c', OperationType.Clear, OperationSubType.Clear, null), 83 | '(': new Operation('(', OperationType.Parenthesis, OperationSubType.ParenthesisOpen, null, 7.0), 84 | ')': new Operation(')', OperationType.Parenthesis, OperationSubType.ParenthesisClose, null, -7.0) 85 | }; 86 | 87 | function getOverloadedOperation(opString: string, queue: ?Array) { 88 | const opOverload = OperationsOverloaded[opString]; 89 | if (opOverload && queue) { 90 | const lastOp = queue[queue.length - 1]; 91 | if (lastOp && isInArray(lastOp.operationSubType, Array( 92 | OperationSubType.Constant, OperationSubType.ParenthesisClose, OperationSubType.BackwardUnaryOp))) { 93 | return opOverload.BinaryOp; 94 | } else { 95 | return opOverload.UnaryOp; 96 | } 97 | } 98 | return opString; 99 | }; 100 | 101 | export function newOperation(opString: string, queue: ?Array, operationArgs: ?Array): Operation { 102 | const finalOpString = getOverloadedOperation(opString, queue); 103 | const newOp = (finalOpString in Operations) ? Operations[finalOpString].copy() : new Operation(finalOpString, OperationType.Constant, OperationSubType.Constant, Number(finalOpString)); 104 | if (operationArgs) { 105 | newOp.operationArgs = new Set([...newOp.operationArgs, ...operationArgs]); 106 | } 107 | return newOp; 108 | }; 109 | -------------------------------------------------------------------------------- /app/core/__tests__/CalculatorBrain-test.js: -------------------------------------------------------------------------------- 1 | 2 | // 'use strict'; 3 | 4 | import CalculatorBrain from '../CalculatorBrain'; 5 | 6 | function process(stringOps) { 7 | const ops = stringOps.split(' '); 8 | const brain = new CalculatorBrain(); 9 | for (let idx=0; idx < ops.length; idx++) { 10 | brain.setItem(ops[idx]); 11 | } 12 | return brain; 13 | } 14 | 15 | function checkDisplayAndResult(stringOps) { 16 | const brain = process(stringOps); 17 | const display = brain.getDisplay(); 18 | const result = brain.getResult(); 19 | return (display, result); 20 | } 21 | 22 | describe('CalculatorBrain', () => { 23 | it('adds 1 + 1 and displays correctly', () => { 24 | const out = checkDisplayAndResult('1 + 1'); 25 | expect(out).toBe(('1 + 1', '2')); 26 | }); 27 | 28 | it('adds 1000 + 1000 and displays correctly', () => { 29 | const out = checkDisplayAndResult('1000 + 1000'); 30 | expect(out).toBe(('1,000 + 1,000', '2,000')); 31 | }); 32 | 33 | it('respects order of operations', () => { 34 | const out = checkDisplayAndResult('( 1 + 2 ) × 3 ÷ 4'); 35 | expect(out).toBe(('(1 + 2) × 3 ÷ 4', '2.25')); 36 | }); 37 | 38 | it('displays zeros after decimals', () => { 39 | const out = checkDisplayAndResult('1.000'); 40 | expect(out).toBe(('1.000', ' ')); 41 | }); 42 | 43 | it('overrides operators correctly', () => { 44 | const out = checkDisplayAndResult('1 + × 4'); 45 | expect(out).toBe(('1 × 4', '4')); 46 | }); 47 | 48 | it('does not override negative operator', () => { 49 | const out = checkDisplayAndResult('1 × - 4'); 50 | expect(out).toBe(('1 × - 4', '-4')); 51 | }); 52 | 53 | it('handles unary ops correctly', () => { 54 | const out = checkDisplayAndResult('10 ! %'); 55 | expect(out).toBe(('10!%', '36,288')); 56 | }); 57 | 58 | it('handles unary ops correctly', () => { 59 | const out = checkDisplayAndResult('( 8 − 3 ) × 5'); 60 | expect(out).toBe(('(8 - 3) × 5', '25')); 61 | }); 62 | 63 | it('handles unary ops correctly', () => { 64 | const out = checkDisplayAndResult('8 − 3 × 5'); 65 | expect(out).toBe(('8 − 3 × 5', '-7')); 66 | }); 67 | 68 | }); 69 | -------------------------------------------------------------------------------- /app/utils/CalculatorUtils.js: -------------------------------------------------------------------------------- 1 | import {isInArray} from "./Utils"; 2 | import {OperationType, OperationSubType} from "../core/OperationTypes"; 3 | 4 | export default class CalculatorUtils { 5 | 6 | static getOperators(queue) { 7 | return queue.filter(op => isInArray(op.operationType, Array(OperationType.Operation))); 8 | } 9 | 10 | static getOperatorsWithParenthesis(queue) { 11 | return queue.filter(op => isInArray(op.operationType, Array(OperationType.Operation, OperationType.Parenthesis))); 12 | } 13 | 14 | static getLastOperationType(queue) { 15 | const lastOp = queue[queue.length - 1]; 16 | if (lastOp) { 17 | return lastOp.operationType; 18 | } 19 | return OperationType.Clear; 20 | } 21 | 22 | static getLastOperationSubType(queue) { 23 | const lastOp = queue[queue.length - 1]; 24 | if (lastOp) { 25 | return lastOp.operationSubType; 26 | } 27 | return OperationSubType.Clear; 28 | } 29 | 30 | static getLastNumber(queue) { 31 | return queue.filter(op => op.operationType == OperationType.Constant)[0] || 0; 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /app/utils/LayoutBuilder.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import React, {Component} from 'react'; 3 | import {View} from 'react-native'; 4 | import {TouchableOpacity} from 'react-native'; 5 | 6 | import CalculatorButtonsContainer from '../components/CalculatorButtonsContainer'; 7 | import CalculatorAdditionalButtonsContainer from '../components/CalculatorAdditionalButtonsContainer'; 8 | import CalculatorLandscapeButtonsContainer from '../components/CalculatorLandscapeButtonsContainer'; 9 | 10 | import Colors from '../constants/Colors'; 11 | import Constants from '../constants/Constants' 12 | 13 | import { OrientationType } from '../utils/Orientation'; 14 | 15 | export default class LayoutBuilder { 16 | 17 | static buildButtonContainer( 18 | obj: Component, 19 | orientation: number, 20 | altButtons: boolean, 21 | _handleButtonPress: (button: string) => any, 22 | _reset: () => any, 23 | _deleteLast: () => any, 24 | _handleCopyPress: () => any, 25 | _handlePastePress: () => any, 26 | _handleSwitchButton: () => any, 27 | ) { 28 | 29 | const calculatorButtonsContainer = ; 35 | 36 | const calculatorAdditionalButtonsContainer = ; 44 | 45 | const calculatorLandscapeButtonsContainer = ; 51 | 52 | if (orientation === OrientationType.Portrait) { 53 | return (altButtons) ? calculatorAdditionalButtonsContainer : calculatorButtonsContainer; 54 | } else if (orientation === OrientationType.Landscape) { 55 | return calculatorLandscapeButtonsContainer; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /app/utils/Orientation.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import {Dimensions} from 'react-native'; 3 | 4 | export const OrientationType = Object.freeze({ 5 | 'Portrait': 1, 6 | 'Landscape': 2, 7 | }); 8 | 9 | export class Orientation { 10 | static getOrientation() { 11 | // BUG: height to width relationship does not hold when in split screen on Android 12 | const {height, width} = Dimensions.get('window'); 13 | return (height > width) ? OrientationType.Portrait : OrientationType.Landscape; 14 | } 15 | } -------------------------------------------------------------------------------- /app/utils/Utils.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import Configs from '../configs/Configs'; 3 | import {DECIMAL, COMMA} from '../core/Operations'; 4 | 5 | const zip = (...rows: Array) => [...rows[0]].map((_,c) => rows.map(row => row[c])); 6 | 7 | export function zipWithIndexTwice(arr: Array): Array<[number,number,A]> { 8 | const index: Array = Array(); 9 | for (let i=0; i(arr: Array): ?A { 14 | if (arr.length === 0) { 15 | return null; 16 | } 17 | return arr[arr.length - 1]; 18 | } 19 | 20 | export function isNumeric(n: string): boolean { 21 | return !isNaN(parseFloat(n)) && isFinite(n); 22 | } 23 | 24 | export function isInArray(value: A, array: Array) { 25 | return array.indexOf(value) > -1; 26 | } 27 | 28 | function decimalPlaces(num: string): number { 29 | var match = (''+num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); 30 | if (!match) { return 0; } 31 | return Math.max( 32 | 0, 33 | // Number of digits right of decimal point. 34 | (match[1] ? match[1].length : 0) 35 | // Adjust for scientific notation. 36 | - (match[2] ? +match[2] : 0)); 37 | } 38 | 39 | export function multiply(a: number, b: number): number { 40 | const aDecimals = decimalPlaces(a.toString()); 41 | const bDecimals = decimalPlaces(b.toString()); 42 | const maxDecimals = Math.max(aDecimals, bDecimals); 43 | const multiplier = Math.pow(10, maxDecimals); 44 | const divisor = Math.pow(10, (maxDecimals * 2)); 45 | const result = (a * multiplier * b * multiplier) / divisor; 46 | return result; 47 | } 48 | 49 | function useExponential(num: number): bool { 50 | const absNum = Math.abs(num); 51 | return (absNum >= Configs.MinScientificNotation || (absNum > 0 && absNum <= Configs.MaxScientificNotation)) 52 | } 53 | export function numberWithCommas(x: string, round: ?boolean = true) { 54 | const xNumber = Number(x); 55 | const xString = (round && (decimalPlaces(x) > Configs.MaxPrecision)) ? xNumber.toFixed(Configs.MaxPrecision) : x; 56 | const parseRegex: RegExp = /\B(?=(\d{3})+(?!\d))/g 57 | if (useExponential(xNumber)) { 58 | return xNumber.toExponential(Configs.ExponentialDecimalPlaces); 59 | } else { 60 | // toLocaleString does not work in Android 61 | const parts = xString.split(DECIMAL); 62 | const head = parts[0].replace(parseRegex, COMMA) || '0'; 63 | const tail = (parts.length > 1) ? parts[1].toString() : ''; 64 | const decimalJoin = (xString.indexOf(DECIMAL) < 0) ? '' : DECIMAL; 65 | return head + decimalJoin + tail; 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /app/utils/Validator.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import CalcUtils from "./CalculatorUtils"; 3 | import {lastOrNull, isInArray} from './Utils'; 4 | 5 | import {DECIMAL, Operation} from "../core/Operations"; 6 | import {OperationType, OperationSubType, OperationArgs} from '../core/OperationTypes'; 7 | 8 | export default class Validator { 9 | 10 | static getLastEffectiveOperator(queue: Array): Operation { 11 | // filters out only operators relevant for validation 12 | const filterOut = Array(OperationSubType.BackwardUnaryOp, OperationSubType.ParenthesisClose, OperationSubType.ParenthesisOpen) 13 | const ops = queue.filter(x => !isInArray(x.operationSubType,filterOut)); 14 | return ops[ops.length - 1]; 15 | } 16 | 17 | static validOperator(op: Operation, queue: Array): boolean { 18 | const lastOp = this.getLastEffectiveOperator(queue); 19 | if (op.operationSubType === OperationSubType.UnaryOp) { 20 | return !lastOp || lastOp.operationSubType === OperationSubType.BinaryOp || lastOp.operationSubType === OperationSubType.UnaryOp 21 | } else if (op.operationSubType === OperationSubType.BackwardUnaryOp) { 22 | return lastOp && lastOp.operationType === OperationType.Constant; 23 | } else if (op.operationSubType === OperationSubType.BinaryOp) { 24 | return lastOp && ( 25 | lastOp.operationType === OperationType.Constant || lastOp.operationSubType === OperationSubType.BinaryOp); 26 | } else { 27 | return false; 28 | } 29 | } 30 | 31 | static validDigit(digit: string, queue: Array): boolean { 32 | const lastEffectiveOp: ?Operation = this.getLastEffectiveOperator(queue); 33 | const lastOp: ?Operation = lastOrNull(queue); 34 | if (lastEffectiveOp && digit === DECIMAL && lastEffectiveOp.operationType === OperationType.Constant) { 35 | return lastEffectiveOp.stringVal.indexOf(DECIMAL) === -1; 36 | } else if (lastOp && lastOp.operationSubType === OperationSubType.BackwardUnaryOp) { 37 | return false; 38 | } else if (lastOp && lastOp.operationSubType === OperationSubType.ParenthesisClose) { 39 | return false; 40 | } else { 41 | return true; 42 | } 43 | } 44 | 45 | static validEquals(op: Operation, queue: Array) { 46 | if (queue.length < 2) { 47 | return false; 48 | } 49 | return true; 50 | } 51 | 52 | static validParenthesis(op: Operation, queue: Array) { 53 | const lastOp: ?Operation = this.getLastEffectiveOperator(queue); 54 | 55 | if (op.operationSubType === OperationSubType.ParenthesisOpen) { 56 | return !lastOp || 57 | isInArray(lastOp.operationSubType, Array(OperationSubType.BinaryOp,OperationSubType.UnaryOp)); 58 | } else if (op.operationSubType === OperationSubType.ParenthesisClose) { 59 | if (lastOp && lastOp.operationType === OperationType.Constant) { 60 | const oParen: Array = queue.filter(op => op.operationType == OperationType.Parenthesis); 61 | const oParenPriority: number = (oParen.length > 0) ? oParen.reduce(function(a,b){return a + b.priority;}, 0) : 0; 62 | return (oParenPriority + op.priority) >= 0; 63 | } 64 | return false; 65 | } 66 | } 67 | 68 | static replaceOperator(op: Operation, queue: Array) { 69 | const lastOp: ?Operation = queue[queue.length - 1]; 70 | return ( 71 | (lastOp && ( 72 | lastOp.operationSubType === op.operationSubType && op.operationSubType === OperationSubType.BinaryOp 73 | )) 74 | ) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/utils/__tests__/Utils-test.js: -------------------------------------------------------------------------------- 1 | import {numberWithCommas, multiply} from '../Utils'; 2 | import Configs from '../../configs/Configs' 3 | 4 | describe('numberWithCommas', () => { 5 | it('must properly display commas', () => { 6 | const actual = numberWithCommas('1000000'); 7 | const expected = '1,000,000'; 8 | expect(actual).toBe(expected); 9 | }); 10 | 11 | it('must properly round down', () => { 12 | const actual = numberWithCommas('1.22222222222', true); 13 | const expected = '1.' + ('2'.repeat( Configs.MaxPrecision)); 14 | expect(actual).toBe(expected); 15 | }); 16 | 17 | it('must properly round up', () => { 18 | const actual = numberWithCommas('1.66666666666', true); 19 | const expected = '1.' + ('6'.repeat( Configs.MaxPrecision - 1)) + '7'; 20 | expect(actual).toBe(expected); 21 | }); 22 | 23 | it('must properly display 0s', () => { 24 | const actual = numberWithCommas('0.00', true); 25 | const expected = '0.00' 26 | expect(actual).toBe(expected); 27 | }); 28 | 29 | it('must properly display decimals', () => { 30 | const actual = numberWithCommas('.', true); 31 | const expected = '0.' 32 | expect(actual).toBe(expected); 33 | }); 34 | }); 35 | 36 | describe('multiply', () => { 37 | it('must properly multiply decimals', () =>{ 38 | const actual = multiply(0.1, 0.2); 39 | const expected = 0.02; 40 | expect(actual).toBe(expected); 41 | }) 42 | 43 | it('must properly multiply two decimals with different numbers of decimal places', () =>{ 44 | const actual = multiply(.38, .2); 45 | const expected = 0.076; 46 | expect(actual).toBe(expected); 47 | }) 48 | 49 | it('must properly multiply a decimal and a whole number', () =>{ 50 | const actual = multiply(0.38, 6); 51 | const expected = 2.28; 52 | expect(actual).toBe(expected); 53 | }) 54 | 55 | it('must properly multiply two whole numbers', () =>{ 56 | const actual = multiply(6, 6); 57 | const expected = 36; 58 | expect(actual).toBe(expected); 59 | }) 60 | 61 | it('must properly multiply negative decimals', () =>{ 62 | const actual = multiply(0.1, -0.2); 63 | const expected = -0.02; 64 | expect(actual).toBe(expected); 65 | }) 66 | }); 67 | -------------------------------------------------------------------------------- /app/utils/__tests__/Validator-test.js: -------------------------------------------------------------------------------- 1 | import Validator from '../Validator'; 2 | import {newOperation} from '../../core/Operations'; 3 | 4 | function createQueue(ops) { 5 | return ops.map((op) => newOperation(op)); 6 | } 7 | 8 | describe('Validator', () => { 9 | it('must reject single binary operators', () => { 10 | const queue = createQueue([]); 11 | const valid = Validator.validOperator(newOperation('+'), queue); 12 | expect(valid).toBeFalsy(); 13 | }); 14 | 15 | it('must reject single backward-unary operators', () => { 16 | const queue = createQueue([]); 17 | const valid = Validator.validOperator(newOperation('!'), queue); 18 | expect(valid).toBeFalsy(); 19 | }); 20 | 21 | it('must allow single unary operators', () => { 22 | const queue = createQueue([]); 23 | const valid = Validator.validOperator(newOperation('log'), queue); 24 | expect(valid).toBeTruthy(); 25 | }); 26 | 27 | it('must allow single constants', () => { 28 | const queue = createQueue([]); 29 | const valid = Validator.validDigit(newOperation('1'), queue); 30 | expect(valid).toBeTruthy(); 31 | }); 32 | 33 | it('must allow consecutive binary operators', () => { 34 | const queue = createQueue(['+']); 35 | const valid = Validator.validOperator(newOperation('×'), queue); 36 | expect(valid).toBeTruthy(); 37 | }); 38 | 39 | it('must allow consecutive unary operators', () => { 40 | const queue = createQueue(['sin']); 41 | const valid = Validator.validOperator(newOperation('cos'), queue); 42 | expect(valid).toBeTruthy(); 43 | }); 44 | 45 | it('must allow parenthesis after unary operators', () => { 46 | const queue = createQueue(['sin']); 47 | const valid = Validator.validParenthesis(newOperation('('), queue); 48 | expect(valid).toBeTruthy(); 49 | }); 50 | 51 | it('must now allow a digit after a parenthesis close', () => { 52 | const queue = createQueue([')']); 53 | const valid = Validator.validDigit(newOperation('1'), queue); 54 | expect(valid).toBeFalsy(); 55 | }); 56 | 57 | it('must allow a digit after a parenthesis open', () => { 58 | const queue = createQueue(['(']); 59 | const valid = Validator.validDigit(newOperation('1'), queue); 60 | expect(valid).toBeTruthy(); 61 | }); 62 | 63 | }); 64 | -------------------------------------------------------------------------------- /iOS App Icon Template.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/iOS App Icon Template.afdesign -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './app/App'; 3 | import { YellowBox } from 'react-native'; 4 | 5 | AppRegistry.registerComponent('OpenCalc', () => App); 6 | YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader','Class RCTCxxModule']); 7 | 8 | -------------------------------------------------------------------------------- /ios/OpenCalc-tvOS/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 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/OpenCalc-tvOSTests/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 | -------------------------------------------------------------------------------- /ios/OpenCalc.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* OpenCalcTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* OpenCalcTests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 26 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 27 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 28 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 29 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 30 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 31 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 32 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 33 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 34 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 35 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; }; 36 | 2DCD954D1E0B4F2C00145EB5 /* OpenCalcTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* OpenCalcTests.m */; }; 37 | 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 38 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 39 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 40 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; 41 | /* End PBXBuildFile section */ 42 | 43 | /* Begin PBXContainerItemProxy section */ 44 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 49 | remoteInfo = RCTActionSheet; 50 | }; 51 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 56 | remoteInfo = RCTGeolocation; 57 | }; 58 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 63 | remoteInfo = RCTImage; 64 | }; 65 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 68 | proxyType = 2; 69 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 70 | remoteInfo = RCTNetwork; 71 | }; 72 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 77 | remoteInfo = RCTVibration; 78 | }; 79 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 82 | proxyType = 1; 83 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 84 | remoteInfo = OpenCalc; 85 | }; 86 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 91 | remoteInfo = RCTSettings; 92 | }; 93 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 98 | remoteInfo = RCTWebSocket; 99 | }; 100 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 101 | isa = PBXContainerItemProxy; 102 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 103 | proxyType = 2; 104 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 105 | remoteInfo = React; 106 | }; 107 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 108 | isa = PBXContainerItemProxy; 109 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 110 | proxyType = 1; 111 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 112 | remoteInfo = "OpenCalc-tvOS"; 113 | }; 114 | 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 115 | isa = PBXContainerItemProxy; 116 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 117 | proxyType = 2; 118 | remoteGlobalIDString = ADD01A681E09402E00F6D226; 119 | remoteInfo = "RCTBlob-tvOS"; 120 | }; 121 | 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 122 | isa = PBXContainerItemProxy; 123 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 124 | proxyType = 2; 125 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 126 | remoteInfo = fishhook; 127 | }; 128 | 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 129 | isa = PBXContainerItemProxy; 130 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 131 | proxyType = 2; 132 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 133 | remoteInfo = "fishhook-tvOS"; 134 | }; 135 | 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = { 136 | isa = PBXContainerItemProxy; 137 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 138 | proxyType = 2; 139 | remoteGlobalIDString = EBF21BDC1FC498900052F4D5; 140 | remoteInfo = jsinspector; 141 | }; 142 | 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = { 143 | isa = PBXContainerItemProxy; 144 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 145 | proxyType = 2; 146 | remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; 147 | remoteInfo = "jsinspector-tvOS"; 148 | }; 149 | 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = { 150 | isa = PBXContainerItemProxy; 151 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 152 | proxyType = 2; 153 | remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; 154 | remoteInfo = "third-party"; 155 | }; 156 | 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = { 157 | isa = PBXContainerItemProxy; 158 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 159 | proxyType = 2; 160 | remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; 161 | remoteInfo = "third-party-tvOS"; 162 | }; 163 | 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = { 164 | isa = PBXContainerItemProxy; 165 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 166 | proxyType = 2; 167 | remoteGlobalIDString = 139D7E881E25C6D100323FB7; 168 | remoteInfo = "double-conversion"; 169 | }; 170 | 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = { 171 | isa = PBXContainerItemProxy; 172 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 173 | proxyType = 2; 174 | remoteGlobalIDString = 3D383D621EBD27B9005632C8; 175 | remoteInfo = "double-conversion-tvOS"; 176 | }; 177 | 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = { 178 | isa = PBXContainerItemProxy; 179 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 180 | proxyType = 2; 181 | remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; 182 | remoteInfo = privatedata; 183 | }; 184 | 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = { 185 | isa = PBXContainerItemProxy; 186 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 187 | proxyType = 2; 188 | remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; 189 | remoteInfo = "privatedata-tvOS"; 190 | }; 191 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 192 | isa = PBXContainerItemProxy; 193 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 194 | proxyType = 2; 195 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 196 | remoteInfo = "RCTImage-tvOS"; 197 | }; 198 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 199 | isa = PBXContainerItemProxy; 200 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 201 | proxyType = 2; 202 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 203 | remoteInfo = "RCTLinking-tvOS"; 204 | }; 205 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 206 | isa = PBXContainerItemProxy; 207 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 208 | proxyType = 2; 209 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 210 | remoteInfo = "RCTNetwork-tvOS"; 211 | }; 212 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 213 | isa = PBXContainerItemProxy; 214 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 215 | proxyType = 2; 216 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 217 | remoteInfo = "RCTSettings-tvOS"; 218 | }; 219 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 220 | isa = PBXContainerItemProxy; 221 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 222 | proxyType = 2; 223 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 224 | remoteInfo = "RCTText-tvOS"; 225 | }; 226 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 227 | isa = PBXContainerItemProxy; 228 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 229 | proxyType = 2; 230 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 231 | remoteInfo = "RCTWebSocket-tvOS"; 232 | }; 233 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 234 | isa = PBXContainerItemProxy; 235 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 236 | proxyType = 2; 237 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 238 | remoteInfo = "React-tvOS"; 239 | }; 240 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 241 | isa = PBXContainerItemProxy; 242 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 243 | proxyType = 2; 244 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 245 | remoteInfo = yoga; 246 | }; 247 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 248 | isa = PBXContainerItemProxy; 249 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 250 | proxyType = 2; 251 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 252 | remoteInfo = "yoga-tvOS"; 253 | }; 254 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 255 | isa = PBXContainerItemProxy; 256 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 257 | proxyType = 2; 258 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 259 | remoteInfo = cxxreact; 260 | }; 261 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 262 | isa = PBXContainerItemProxy; 263 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 264 | proxyType = 2; 265 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 266 | remoteInfo = "cxxreact-tvOS"; 267 | }; 268 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 269 | isa = PBXContainerItemProxy; 270 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 271 | proxyType = 2; 272 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 273 | remoteInfo = jschelpers; 274 | }; 275 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 276 | isa = PBXContainerItemProxy; 277 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 278 | proxyType = 2; 279 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 280 | remoteInfo = "jschelpers-tvOS"; 281 | }; 282 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 283 | isa = PBXContainerItemProxy; 284 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 285 | proxyType = 2; 286 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 287 | remoteInfo = RCTAnimation; 288 | }; 289 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 290 | isa = PBXContainerItemProxy; 291 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 292 | proxyType = 2; 293 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 294 | remoteInfo = "RCTAnimation-tvOS"; 295 | }; 296 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 297 | isa = PBXContainerItemProxy; 298 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 299 | proxyType = 2; 300 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 301 | remoteInfo = RCTLinking; 302 | }; 303 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 304 | isa = PBXContainerItemProxy; 305 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 306 | proxyType = 2; 307 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 308 | remoteInfo = RCTText; 309 | }; 310 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { 311 | isa = PBXContainerItemProxy; 312 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 313 | proxyType = 2; 314 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814; 315 | remoteInfo = RCTBlob; 316 | }; 317 | /* End PBXContainerItemProxy section */ 318 | 319 | /* Begin PBXFileReference section */ 320 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 321 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 322 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 323 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 324 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 325 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 326 | 00E356EE1AD99517003FC87E /* OpenCalcTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OpenCalcTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 327 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 328 | 00E356F21AD99517003FC87E /* OpenCalcTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OpenCalcTests.m; sourceTree = ""; }; 329 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 330 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 331 | 13B07F961A680F5B00A75B9A /* OpenCalc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenCalc.app; sourceTree = BUILT_PRODUCTS_DIR; }; 332 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = OpenCalc/AppDelegate.h; sourceTree = ""; }; 333 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = OpenCalc/AppDelegate.m; sourceTree = ""; }; 334 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 335 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = OpenCalc/Images.xcassets; sourceTree = ""; }; 336 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = OpenCalc/Info.plist; sourceTree = ""; }; 337 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = OpenCalc/main.m; sourceTree = ""; }; 338 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 339 | 2D02E47B1E0B4A5D006451C7 /* OpenCalc-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "OpenCalc-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 340 | 2D02E4901E0B4A5D006451C7 /* OpenCalc-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OpenCalc-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 341 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; 342 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 343 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 344 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 345 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; 346 | /* End PBXFileReference section */ 347 | 348 | /* Begin PBXFrameworksBuildPhase section */ 349 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 350 | isa = PBXFrameworksBuildPhase; 351 | buildActionMask = 2147483647; 352 | files = ( 353 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 354 | ); 355 | runOnlyForDeploymentPostprocessing = 0; 356 | }; 357 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 358 | isa = PBXFrameworksBuildPhase; 359 | buildActionMask = 2147483647; 360 | files = ( 361 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 362 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 363 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 364 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 365 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 366 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 367 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 368 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 369 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 370 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 371 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 372 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 373 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | }; 377 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 378 | isa = PBXFrameworksBuildPhase; 379 | buildActionMask = 2147483647; 380 | files = ( 381 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */, 382 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, 383 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 384 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 385 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 386 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 387 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 388 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, 389 | ); 390 | runOnlyForDeploymentPostprocessing = 0; 391 | }; 392 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 393 | isa = PBXFrameworksBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */, 397 | ); 398 | runOnlyForDeploymentPostprocessing = 0; 399 | }; 400 | /* End PBXFrameworksBuildPhase section */ 401 | 402 | /* Begin PBXGroup section */ 403 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 404 | isa = PBXGroup; 405 | children = ( 406 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 407 | ); 408 | name = Products; 409 | sourceTree = ""; 410 | }; 411 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 412 | isa = PBXGroup; 413 | children = ( 414 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 415 | ); 416 | name = Products; 417 | sourceTree = ""; 418 | }; 419 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 420 | isa = PBXGroup; 421 | children = ( 422 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 423 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 424 | ); 425 | name = Products; 426 | sourceTree = ""; 427 | }; 428 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 429 | isa = PBXGroup; 430 | children = ( 431 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 432 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 433 | ); 434 | name = Products; 435 | sourceTree = ""; 436 | }; 437 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 438 | isa = PBXGroup; 439 | children = ( 440 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 441 | ); 442 | name = Products; 443 | sourceTree = ""; 444 | }; 445 | 00E356EF1AD99517003FC87E /* OpenCalcTests */ = { 446 | isa = PBXGroup; 447 | children = ( 448 | 00E356F21AD99517003FC87E /* OpenCalcTests.m */, 449 | 00E356F01AD99517003FC87E /* Supporting Files */, 450 | ); 451 | path = OpenCalcTests; 452 | sourceTree = ""; 453 | }; 454 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 455 | isa = PBXGroup; 456 | children = ( 457 | 00E356F11AD99517003FC87E /* Info.plist */, 458 | ); 459 | name = "Supporting Files"; 460 | sourceTree = ""; 461 | }; 462 | 139105B71AF99BAD00B5F7CC /* Products */ = { 463 | isa = PBXGroup; 464 | children = ( 465 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 466 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 467 | ); 468 | name = Products; 469 | sourceTree = ""; 470 | }; 471 | 139FDEE71B06529A00C62182 /* Products */ = { 472 | isa = PBXGroup; 473 | children = ( 474 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 475 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 476 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */, 477 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */, 478 | ); 479 | name = Products; 480 | sourceTree = ""; 481 | }; 482 | 13B07FAE1A68108700A75B9A /* OpenCalc */ = { 483 | isa = PBXGroup; 484 | children = ( 485 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 486 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 487 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 488 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 489 | 13B07FB61A68108700A75B9A /* Info.plist */, 490 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 491 | 13B07FB71A68108700A75B9A /* main.m */, 492 | ); 493 | name = OpenCalc; 494 | sourceTree = ""; 495 | }; 496 | 146834001AC3E56700842450 /* Products */ = { 497 | isa = PBXGroup; 498 | children = ( 499 | 146834041AC3E56700842450 /* libReact.a */, 500 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */, 501 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 502 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 503 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 504 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 505 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 506 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 507 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */, 508 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */, 509 | 2DF0FFE32056DD460020B375 /* libthird-party.a */, 510 | 2DF0FFE52056DD460020B375 /* libthird-party.a */, 511 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */, 512 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */, 513 | 2DF0FFEB2056DD460020B375 /* libprivatedata.a */, 514 | 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */, 515 | ); 516 | name = Products; 517 | sourceTree = ""; 518 | }; 519 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 520 | isa = PBXGroup; 521 | children = ( 522 | 2D16E6891FA4F8E400B85C8A /* libReact.a */, 523 | ); 524 | name = Frameworks; 525 | sourceTree = ""; 526 | }; 527 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 528 | isa = PBXGroup; 529 | children = ( 530 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 531 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, 532 | ); 533 | name = Products; 534 | sourceTree = ""; 535 | }; 536 | 78C398B11ACF4ADC00677621 /* Products */ = { 537 | isa = PBXGroup; 538 | children = ( 539 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 540 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 541 | ); 542 | name = Products; 543 | sourceTree = ""; 544 | }; 545 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 546 | isa = PBXGroup; 547 | children = ( 548 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 549 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 550 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 551 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 552 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 553 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 554 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 555 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 556 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 557 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 558 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 559 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 560 | ); 561 | name = Libraries; 562 | sourceTree = ""; 563 | }; 564 | 832341B11AAA6A8300B99B32 /* Products */ = { 565 | isa = PBXGroup; 566 | children = ( 567 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 568 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 569 | ); 570 | name = Products; 571 | sourceTree = ""; 572 | }; 573 | 83CBB9F61A601CBA00E9B192 = { 574 | isa = PBXGroup; 575 | children = ( 576 | 13B07FAE1A68108700A75B9A /* OpenCalc */, 577 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 578 | 00E356EF1AD99517003FC87E /* OpenCalcTests */, 579 | 83CBBA001A601CBA00E9B192 /* Products */, 580 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 581 | ); 582 | indentWidth = 2; 583 | sourceTree = ""; 584 | tabWidth = 2; 585 | usesTabs = 0; 586 | }; 587 | 83CBBA001A601CBA00E9B192 /* Products */ = { 588 | isa = PBXGroup; 589 | children = ( 590 | 13B07F961A680F5B00A75B9A /* OpenCalc.app */, 591 | 00E356EE1AD99517003FC87E /* OpenCalcTests.xctest */, 592 | 2D02E47B1E0B4A5D006451C7 /* OpenCalc-tvOS.app */, 593 | 2D02E4901E0B4A5D006451C7 /* OpenCalc-tvOSTests.xctest */, 594 | ); 595 | name = Products; 596 | sourceTree = ""; 597 | }; 598 | ADBDB9201DFEBF0600ED6528 /* Products */ = { 599 | isa = PBXGroup; 600 | children = ( 601 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, 602 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */, 603 | ); 604 | name = Products; 605 | sourceTree = ""; 606 | }; 607 | /* End PBXGroup section */ 608 | 609 | /* Begin PBXNativeTarget section */ 610 | 00E356ED1AD99517003FC87E /* OpenCalcTests */ = { 611 | isa = PBXNativeTarget; 612 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "OpenCalcTests" */; 613 | buildPhases = ( 614 | 00E356EA1AD99517003FC87E /* Sources */, 615 | 00E356EB1AD99517003FC87E /* Frameworks */, 616 | 00E356EC1AD99517003FC87E /* Resources */, 617 | ); 618 | buildRules = ( 619 | ); 620 | dependencies = ( 621 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 622 | ); 623 | name = OpenCalcTests; 624 | productName = OpenCalcTests; 625 | productReference = 00E356EE1AD99517003FC87E /* OpenCalcTests.xctest */; 626 | productType = "com.apple.product-type.bundle.unit-test"; 627 | }; 628 | 13B07F861A680F5B00A75B9A /* OpenCalc */ = { 629 | isa = PBXNativeTarget; 630 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "OpenCalc" */; 631 | buildPhases = ( 632 | 13B07F871A680F5B00A75B9A /* Sources */, 633 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 634 | 13B07F8E1A680F5B00A75B9A /* Resources */, 635 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 636 | ); 637 | buildRules = ( 638 | ); 639 | dependencies = ( 640 | ); 641 | name = OpenCalc; 642 | productName = "Hello World"; 643 | productReference = 13B07F961A680F5B00A75B9A /* OpenCalc.app */; 644 | productType = "com.apple.product-type.application"; 645 | }; 646 | 2D02E47A1E0B4A5D006451C7 /* OpenCalc-tvOS */ = { 647 | isa = PBXNativeTarget; 648 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OpenCalc-tvOS" */; 649 | buildPhases = ( 650 | 2D02E4771E0B4A5D006451C7 /* Sources */, 651 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 652 | 2D02E4791E0B4A5D006451C7 /* Resources */, 653 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 654 | ); 655 | buildRules = ( 656 | ); 657 | dependencies = ( 658 | ); 659 | name = "OpenCalc-tvOS"; 660 | productName = "OpenCalc-tvOS"; 661 | productReference = 2D02E47B1E0B4A5D006451C7 /* OpenCalc-tvOS.app */; 662 | productType = "com.apple.product-type.application"; 663 | }; 664 | 2D02E48F1E0B4A5D006451C7 /* OpenCalc-tvOSTests */ = { 665 | isa = PBXNativeTarget; 666 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OpenCalc-tvOSTests" */; 667 | buildPhases = ( 668 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 669 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 670 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 671 | ); 672 | buildRules = ( 673 | ); 674 | dependencies = ( 675 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 676 | ); 677 | name = "OpenCalc-tvOSTests"; 678 | productName = "OpenCalc-tvOSTests"; 679 | productReference = 2D02E4901E0B4A5D006451C7 /* OpenCalc-tvOSTests.xctest */; 680 | productType = "com.apple.product-type.bundle.unit-test"; 681 | }; 682 | /* End PBXNativeTarget section */ 683 | 684 | /* Begin PBXProject section */ 685 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 686 | isa = PBXProject; 687 | attributes = { 688 | LastUpgradeCheck = 0610; 689 | ORGANIZATIONNAME = Facebook; 690 | TargetAttributes = { 691 | 00E356ED1AD99517003FC87E = { 692 | CreatedOnToolsVersion = 6.2; 693 | TestTargetID = 13B07F861A680F5B00A75B9A; 694 | }; 695 | 13B07F861A680F5B00A75B9A = { 696 | DevelopmentTeam = 49HFP6YR4U; 697 | ProvisioningStyle = Automatic; 698 | }; 699 | 2D02E47A1E0B4A5D006451C7 = { 700 | CreatedOnToolsVersion = 8.2.1; 701 | ProvisioningStyle = Automatic; 702 | }; 703 | 2D02E48F1E0B4A5D006451C7 = { 704 | CreatedOnToolsVersion = 8.2.1; 705 | ProvisioningStyle = Automatic; 706 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 707 | }; 708 | }; 709 | }; 710 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "OpenCalc" */; 711 | compatibilityVersion = "Xcode 3.2"; 712 | developmentRegion = English; 713 | hasScannedForEncodings = 0; 714 | knownRegions = ( 715 | en, 716 | Base, 717 | ); 718 | mainGroup = 83CBB9F61A601CBA00E9B192; 719 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 720 | projectDirPath = ""; 721 | projectReferences = ( 722 | { 723 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 724 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 725 | }, 726 | { 727 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 728 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 729 | }, 730 | { 731 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; 732 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 733 | }, 734 | { 735 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 736 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 737 | }, 738 | { 739 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 740 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 741 | }, 742 | { 743 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 744 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 745 | }, 746 | { 747 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 748 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 749 | }, 750 | { 751 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 752 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 753 | }, 754 | { 755 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 756 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 757 | }, 758 | { 759 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 760 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 761 | }, 762 | { 763 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 764 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 765 | }, 766 | { 767 | ProductGroup = 146834001AC3E56700842450 /* Products */; 768 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 769 | }, 770 | ); 771 | projectRoot = ""; 772 | targets = ( 773 | 13B07F861A680F5B00A75B9A /* OpenCalc */, 774 | 00E356ED1AD99517003FC87E /* OpenCalcTests */, 775 | 2D02E47A1E0B4A5D006451C7 /* OpenCalc-tvOS */, 776 | 2D02E48F1E0B4A5D006451C7 /* OpenCalc-tvOSTests */, 777 | ); 778 | }; 779 | /* End PBXProject section */ 780 | 781 | /* Begin PBXReferenceProxy section */ 782 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 783 | isa = PBXReferenceProxy; 784 | fileType = archive.ar; 785 | path = libRCTActionSheet.a; 786 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 787 | sourceTree = BUILT_PRODUCTS_DIR; 788 | }; 789 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 790 | isa = PBXReferenceProxy; 791 | fileType = archive.ar; 792 | path = libRCTGeolocation.a; 793 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 794 | sourceTree = BUILT_PRODUCTS_DIR; 795 | }; 796 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 797 | isa = PBXReferenceProxy; 798 | fileType = archive.ar; 799 | path = libRCTImage.a; 800 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 801 | sourceTree = BUILT_PRODUCTS_DIR; 802 | }; 803 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 804 | isa = PBXReferenceProxy; 805 | fileType = archive.ar; 806 | path = libRCTNetwork.a; 807 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 808 | sourceTree = BUILT_PRODUCTS_DIR; 809 | }; 810 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 811 | isa = PBXReferenceProxy; 812 | fileType = archive.ar; 813 | path = libRCTVibration.a; 814 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 815 | sourceTree = BUILT_PRODUCTS_DIR; 816 | }; 817 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 818 | isa = PBXReferenceProxy; 819 | fileType = archive.ar; 820 | path = libRCTSettings.a; 821 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 822 | sourceTree = BUILT_PRODUCTS_DIR; 823 | }; 824 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 825 | isa = PBXReferenceProxy; 826 | fileType = archive.ar; 827 | path = libRCTWebSocket.a; 828 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 829 | sourceTree = BUILT_PRODUCTS_DIR; 830 | }; 831 | 146834041AC3E56700842450 /* libReact.a */ = { 832 | isa = PBXReferenceProxy; 833 | fileType = archive.ar; 834 | path = libReact.a; 835 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 836 | sourceTree = BUILT_PRODUCTS_DIR; 837 | }; 838 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = { 839 | isa = PBXReferenceProxy; 840 | fileType = archive.ar; 841 | path = "libRCTBlob-tvOS.a"; 842 | remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */; 843 | sourceTree = BUILT_PRODUCTS_DIR; 844 | }; 845 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = { 846 | isa = PBXReferenceProxy; 847 | fileType = archive.ar; 848 | path = libfishhook.a; 849 | remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */; 850 | sourceTree = BUILT_PRODUCTS_DIR; 851 | }; 852 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = { 853 | isa = PBXReferenceProxy; 854 | fileType = archive.ar; 855 | path = "libfishhook-tvOS.a"; 856 | remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */; 857 | sourceTree = BUILT_PRODUCTS_DIR; 858 | }; 859 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = { 860 | isa = PBXReferenceProxy; 861 | fileType = archive.ar; 862 | path = libjsinspector.a; 863 | remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */; 864 | sourceTree = BUILT_PRODUCTS_DIR; 865 | }; 866 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = { 867 | isa = PBXReferenceProxy; 868 | fileType = archive.ar; 869 | path = "libjsinspector-tvOS.a"; 870 | remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */; 871 | sourceTree = BUILT_PRODUCTS_DIR; 872 | }; 873 | 2DF0FFE32056DD460020B375 /* libthird-party.a */ = { 874 | isa = PBXReferenceProxy; 875 | fileType = archive.ar; 876 | path = "libthird-party.a"; 877 | remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */; 878 | sourceTree = BUILT_PRODUCTS_DIR; 879 | }; 880 | 2DF0FFE52056DD460020B375 /* libthird-party.a */ = { 881 | isa = PBXReferenceProxy; 882 | fileType = archive.ar; 883 | path = "libthird-party.a"; 884 | remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */; 885 | sourceTree = BUILT_PRODUCTS_DIR; 886 | }; 887 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = { 888 | isa = PBXReferenceProxy; 889 | fileType = archive.ar; 890 | path = "libdouble-conversion.a"; 891 | remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */; 892 | sourceTree = BUILT_PRODUCTS_DIR; 893 | }; 894 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = { 895 | isa = PBXReferenceProxy; 896 | fileType = archive.ar; 897 | path = "libdouble-conversion.a"; 898 | remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */; 899 | sourceTree = BUILT_PRODUCTS_DIR; 900 | }; 901 | 2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = { 902 | isa = PBXReferenceProxy; 903 | fileType = archive.ar; 904 | path = libprivatedata.a; 905 | remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */; 906 | sourceTree = BUILT_PRODUCTS_DIR; 907 | }; 908 | 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = { 909 | isa = PBXReferenceProxy; 910 | fileType = archive.ar; 911 | path = "libprivatedata-tvOS.a"; 912 | remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */; 913 | sourceTree = BUILT_PRODUCTS_DIR; 914 | }; 915 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 916 | isa = PBXReferenceProxy; 917 | fileType = archive.ar; 918 | path = "libRCTImage-tvOS.a"; 919 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 920 | sourceTree = BUILT_PRODUCTS_DIR; 921 | }; 922 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 923 | isa = PBXReferenceProxy; 924 | fileType = archive.ar; 925 | path = "libRCTLinking-tvOS.a"; 926 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 927 | sourceTree = BUILT_PRODUCTS_DIR; 928 | }; 929 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 930 | isa = PBXReferenceProxy; 931 | fileType = archive.ar; 932 | path = "libRCTNetwork-tvOS.a"; 933 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 934 | sourceTree = BUILT_PRODUCTS_DIR; 935 | }; 936 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 937 | isa = PBXReferenceProxy; 938 | fileType = archive.ar; 939 | path = "libRCTSettings-tvOS.a"; 940 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 941 | sourceTree = BUILT_PRODUCTS_DIR; 942 | }; 943 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 944 | isa = PBXReferenceProxy; 945 | fileType = archive.ar; 946 | path = "libRCTText-tvOS.a"; 947 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 948 | sourceTree = BUILT_PRODUCTS_DIR; 949 | }; 950 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 951 | isa = PBXReferenceProxy; 952 | fileType = archive.ar; 953 | path = "libRCTWebSocket-tvOS.a"; 954 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 955 | sourceTree = BUILT_PRODUCTS_DIR; 956 | }; 957 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { 958 | isa = PBXReferenceProxy; 959 | fileType = archive.ar; 960 | path = libReact.a; 961 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 962 | sourceTree = BUILT_PRODUCTS_DIR; 963 | }; 964 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 965 | isa = PBXReferenceProxy; 966 | fileType = archive.ar; 967 | path = libyoga.a; 968 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 969 | sourceTree = BUILT_PRODUCTS_DIR; 970 | }; 971 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 972 | isa = PBXReferenceProxy; 973 | fileType = archive.ar; 974 | path = libyoga.a; 975 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 976 | sourceTree = BUILT_PRODUCTS_DIR; 977 | }; 978 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 979 | isa = PBXReferenceProxy; 980 | fileType = archive.ar; 981 | path = libcxxreact.a; 982 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 983 | sourceTree = BUILT_PRODUCTS_DIR; 984 | }; 985 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 986 | isa = PBXReferenceProxy; 987 | fileType = archive.ar; 988 | path = libcxxreact.a; 989 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 990 | sourceTree = BUILT_PRODUCTS_DIR; 991 | }; 992 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { 993 | isa = PBXReferenceProxy; 994 | fileType = archive.ar; 995 | path = libjschelpers.a; 996 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; 997 | sourceTree = BUILT_PRODUCTS_DIR; 998 | }; 999 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { 1000 | isa = PBXReferenceProxy; 1001 | fileType = archive.ar; 1002 | path = libjschelpers.a; 1003 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; 1004 | sourceTree = BUILT_PRODUCTS_DIR; 1005 | }; 1006 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 1007 | isa = PBXReferenceProxy; 1008 | fileType = archive.ar; 1009 | path = libRCTAnimation.a; 1010 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 1011 | sourceTree = BUILT_PRODUCTS_DIR; 1012 | }; 1013 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 1014 | isa = PBXReferenceProxy; 1015 | fileType = archive.ar; 1016 | path = libRCTAnimation.a; 1017 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 1018 | sourceTree = BUILT_PRODUCTS_DIR; 1019 | }; 1020 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 1021 | isa = PBXReferenceProxy; 1022 | fileType = archive.ar; 1023 | path = libRCTLinking.a; 1024 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 1025 | sourceTree = BUILT_PRODUCTS_DIR; 1026 | }; 1027 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 1028 | isa = PBXReferenceProxy; 1029 | fileType = archive.ar; 1030 | path = libRCTText.a; 1031 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 1032 | sourceTree = BUILT_PRODUCTS_DIR; 1033 | }; 1034 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { 1035 | isa = PBXReferenceProxy; 1036 | fileType = archive.ar; 1037 | path = libRCTBlob.a; 1038 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; 1039 | sourceTree = BUILT_PRODUCTS_DIR; 1040 | }; 1041 | /* End PBXReferenceProxy section */ 1042 | 1043 | /* Begin PBXResourcesBuildPhase section */ 1044 | 00E356EC1AD99517003FC87E /* Resources */ = { 1045 | isa = PBXResourcesBuildPhase; 1046 | buildActionMask = 2147483647; 1047 | files = ( 1048 | ); 1049 | runOnlyForDeploymentPostprocessing = 0; 1050 | }; 1051 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 1052 | isa = PBXResourcesBuildPhase; 1053 | buildActionMask = 2147483647; 1054 | files = ( 1055 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 1056 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 1057 | ); 1058 | runOnlyForDeploymentPostprocessing = 0; 1059 | }; 1060 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 1061 | isa = PBXResourcesBuildPhase; 1062 | buildActionMask = 2147483647; 1063 | files = ( 1064 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 1065 | ); 1066 | runOnlyForDeploymentPostprocessing = 0; 1067 | }; 1068 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 1069 | isa = PBXResourcesBuildPhase; 1070 | buildActionMask = 2147483647; 1071 | files = ( 1072 | ); 1073 | runOnlyForDeploymentPostprocessing = 0; 1074 | }; 1075 | /* End PBXResourcesBuildPhase section */ 1076 | 1077 | /* Begin PBXShellScriptBuildPhase section */ 1078 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 1079 | isa = PBXShellScriptBuildPhase; 1080 | buildActionMask = 2147483647; 1081 | files = ( 1082 | ); 1083 | inputPaths = ( 1084 | ); 1085 | name = "Bundle React Native code and images"; 1086 | outputPaths = ( 1087 | ); 1088 | runOnlyForDeploymentPostprocessing = 0; 1089 | shellPath = /bin/sh; 1090 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 1091 | }; 1092 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 1093 | isa = PBXShellScriptBuildPhase; 1094 | buildActionMask = 2147483647; 1095 | files = ( 1096 | ); 1097 | inputPaths = ( 1098 | ); 1099 | name = "Bundle React Native Code And Images"; 1100 | outputPaths = ( 1101 | ); 1102 | runOnlyForDeploymentPostprocessing = 0; 1103 | shellPath = /bin/sh; 1104 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 1105 | }; 1106 | /* End PBXShellScriptBuildPhase section */ 1107 | 1108 | /* Begin PBXSourcesBuildPhase section */ 1109 | 00E356EA1AD99517003FC87E /* Sources */ = { 1110 | isa = PBXSourcesBuildPhase; 1111 | buildActionMask = 2147483647; 1112 | files = ( 1113 | 00E356F31AD99517003FC87E /* OpenCalcTests.m in Sources */, 1114 | ); 1115 | runOnlyForDeploymentPostprocessing = 0; 1116 | }; 1117 | 13B07F871A680F5B00A75B9A /* Sources */ = { 1118 | isa = PBXSourcesBuildPhase; 1119 | buildActionMask = 2147483647; 1120 | files = ( 1121 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 1122 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 1123 | ); 1124 | runOnlyForDeploymentPostprocessing = 0; 1125 | }; 1126 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 1127 | isa = PBXSourcesBuildPhase; 1128 | buildActionMask = 2147483647; 1129 | files = ( 1130 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 1131 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 1132 | ); 1133 | runOnlyForDeploymentPostprocessing = 0; 1134 | }; 1135 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 1136 | isa = PBXSourcesBuildPhase; 1137 | buildActionMask = 2147483647; 1138 | files = ( 1139 | 2DCD954D1E0B4F2C00145EB5 /* OpenCalcTests.m in Sources */, 1140 | ); 1141 | runOnlyForDeploymentPostprocessing = 0; 1142 | }; 1143 | /* End PBXSourcesBuildPhase section */ 1144 | 1145 | /* Begin PBXTargetDependency section */ 1146 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 1147 | isa = PBXTargetDependency; 1148 | target = 13B07F861A680F5B00A75B9A /* OpenCalc */; 1149 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 1150 | }; 1151 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 1152 | isa = PBXTargetDependency; 1153 | target = 2D02E47A1E0B4A5D006451C7 /* OpenCalc-tvOS */; 1154 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 1155 | }; 1156 | /* End PBXTargetDependency section */ 1157 | 1158 | /* Begin PBXVariantGroup section */ 1159 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 1160 | isa = PBXVariantGroup; 1161 | children = ( 1162 | 13B07FB21A68108700A75B9A /* Base */, 1163 | ); 1164 | name = LaunchScreen.xib; 1165 | path = OpenCalc; 1166 | sourceTree = ""; 1167 | }; 1168 | /* End PBXVariantGroup section */ 1169 | 1170 | /* Begin XCBuildConfiguration section */ 1171 | 00E356F61AD99517003FC87E /* Debug */ = { 1172 | isa = XCBuildConfiguration; 1173 | buildSettings = { 1174 | BUNDLE_LOADER = "$(TEST_HOST)"; 1175 | GCC_PREPROCESSOR_DEFINITIONS = ( 1176 | "DEBUG=1", 1177 | "$(inherited)", 1178 | ); 1179 | INFOPLIST_FILE = OpenCalcTests/Info.plist; 1180 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1181 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1182 | OTHER_LDFLAGS = ( 1183 | "-ObjC", 1184 | "-lc++", 1185 | ); 1186 | PRODUCT_NAME = "$(TARGET_NAME)"; 1187 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OpenCalc.app/OpenCalc"; 1188 | }; 1189 | name = Debug; 1190 | }; 1191 | 00E356F71AD99517003FC87E /* Release */ = { 1192 | isa = XCBuildConfiguration; 1193 | buildSettings = { 1194 | BUNDLE_LOADER = "$(TEST_HOST)"; 1195 | COPY_PHASE_STRIP = NO; 1196 | INFOPLIST_FILE = OpenCalcTests/Info.plist; 1197 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1198 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1199 | OTHER_LDFLAGS = ( 1200 | "-ObjC", 1201 | "-lc++", 1202 | ); 1203 | PRODUCT_NAME = "$(TARGET_NAME)"; 1204 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OpenCalc.app/OpenCalc"; 1205 | }; 1206 | name = Release; 1207 | }; 1208 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1209 | isa = XCBuildConfiguration; 1210 | buildSettings = { 1211 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1212 | CODE_SIGN_IDENTITY = "iPhone Developer"; 1213 | CODE_SIGN_STYLE = Automatic; 1214 | CURRENT_PROJECT_VERSION = 1; 1215 | DEAD_CODE_STRIPPING = NO; 1216 | DEVELOPMENT_TEAM = 49HFP6YR4U; 1217 | INFOPLIST_FILE = OpenCalc/Info.plist; 1218 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1219 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1220 | OTHER_LDFLAGS = ( 1221 | "$(inherited)", 1222 | "-ObjC", 1223 | "-lc++", 1224 | ); 1225 | PRODUCT_BUNDLE_IDENTIFIER = com.twelve31labs.OpenCalc; 1226 | PRODUCT_NAME = OpenCalc; 1227 | PROVISIONING_PROFILE_SPECIFIER = ""; 1228 | TARGETED_DEVICE_FAMILY = "1,2"; 1229 | VERSIONING_SYSTEM = "apple-generic"; 1230 | }; 1231 | name = Debug; 1232 | }; 1233 | 13B07F951A680F5B00A75B9A /* Release */ = { 1234 | isa = XCBuildConfiguration; 1235 | buildSettings = { 1236 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1237 | CODE_SIGN_IDENTITY = "iPhone Developer"; 1238 | CODE_SIGN_STYLE = Automatic; 1239 | CURRENT_PROJECT_VERSION = 1; 1240 | DEVELOPMENT_TEAM = 49HFP6YR4U; 1241 | INFOPLIST_FILE = OpenCalc/Info.plist; 1242 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1243 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1244 | OTHER_LDFLAGS = ( 1245 | "$(inherited)", 1246 | "-ObjC", 1247 | "-lc++", 1248 | ); 1249 | PRODUCT_BUNDLE_IDENTIFIER = com.twelve31labs.OpenCalc; 1250 | PRODUCT_NAME = OpenCalc; 1251 | PROVISIONING_PROFILE_SPECIFIER = ""; 1252 | TARGETED_DEVICE_FAMILY = "1,2"; 1253 | VERSIONING_SYSTEM = "apple-generic"; 1254 | }; 1255 | name = Release; 1256 | }; 1257 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 1258 | isa = XCBuildConfiguration; 1259 | buildSettings = { 1260 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1261 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1262 | CLANG_ANALYZER_NONNULL = YES; 1263 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1264 | CLANG_WARN_INFINITE_RECURSION = YES; 1265 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1266 | DEBUG_INFORMATION_FORMAT = dwarf; 1267 | ENABLE_TESTABILITY = YES; 1268 | GCC_NO_COMMON_BLOCKS = YES; 1269 | INFOPLIST_FILE = "OpenCalc-tvOS/Info.plist"; 1270 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1271 | OTHER_LDFLAGS = ( 1272 | "-ObjC", 1273 | "-lc++", 1274 | ); 1275 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.OpenCalc-tvOS"; 1276 | PRODUCT_NAME = "$(TARGET_NAME)"; 1277 | SDKROOT = appletvos; 1278 | TARGETED_DEVICE_FAMILY = 3; 1279 | TVOS_DEPLOYMENT_TARGET = 9.2; 1280 | }; 1281 | name = Debug; 1282 | }; 1283 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 1284 | isa = XCBuildConfiguration; 1285 | buildSettings = { 1286 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1287 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1288 | CLANG_ANALYZER_NONNULL = YES; 1289 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1290 | CLANG_WARN_INFINITE_RECURSION = YES; 1291 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1292 | COPY_PHASE_STRIP = NO; 1293 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1294 | GCC_NO_COMMON_BLOCKS = YES; 1295 | INFOPLIST_FILE = "OpenCalc-tvOS/Info.plist"; 1296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1297 | OTHER_LDFLAGS = ( 1298 | "-ObjC", 1299 | "-lc++", 1300 | ); 1301 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.OpenCalc-tvOS"; 1302 | PRODUCT_NAME = "$(TARGET_NAME)"; 1303 | SDKROOT = appletvos; 1304 | TARGETED_DEVICE_FAMILY = 3; 1305 | TVOS_DEPLOYMENT_TARGET = 9.2; 1306 | }; 1307 | name = Release; 1308 | }; 1309 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 1310 | isa = XCBuildConfiguration; 1311 | buildSettings = { 1312 | BUNDLE_LOADER = "$(TEST_HOST)"; 1313 | CLANG_ANALYZER_NONNULL = YES; 1314 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1315 | CLANG_WARN_INFINITE_RECURSION = YES; 1316 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1317 | DEBUG_INFORMATION_FORMAT = dwarf; 1318 | ENABLE_TESTABILITY = YES; 1319 | GCC_NO_COMMON_BLOCKS = YES; 1320 | INFOPLIST_FILE = "OpenCalc-tvOSTests/Info.plist"; 1321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1322 | OTHER_LDFLAGS = ( 1323 | "-ObjC", 1324 | "-lc++", 1325 | ); 1326 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.OpenCalc-tvOSTests"; 1327 | PRODUCT_NAME = "$(TARGET_NAME)"; 1328 | SDKROOT = appletvos; 1329 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OpenCalc-tvOS.app/OpenCalc-tvOS"; 1330 | TVOS_DEPLOYMENT_TARGET = 10.1; 1331 | }; 1332 | name = Debug; 1333 | }; 1334 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 1335 | isa = XCBuildConfiguration; 1336 | buildSettings = { 1337 | BUNDLE_LOADER = "$(TEST_HOST)"; 1338 | CLANG_ANALYZER_NONNULL = YES; 1339 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1340 | CLANG_WARN_INFINITE_RECURSION = YES; 1341 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1342 | COPY_PHASE_STRIP = NO; 1343 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1344 | GCC_NO_COMMON_BLOCKS = YES; 1345 | INFOPLIST_FILE = "OpenCalc-tvOSTests/Info.plist"; 1346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1347 | OTHER_LDFLAGS = ( 1348 | "-ObjC", 1349 | "-lc++", 1350 | ); 1351 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.OpenCalc-tvOSTests"; 1352 | PRODUCT_NAME = "$(TARGET_NAME)"; 1353 | SDKROOT = appletvos; 1354 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OpenCalc-tvOS.app/OpenCalc-tvOS"; 1355 | TVOS_DEPLOYMENT_TARGET = 10.1; 1356 | }; 1357 | name = Release; 1358 | }; 1359 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1360 | isa = XCBuildConfiguration; 1361 | buildSettings = { 1362 | ALWAYS_SEARCH_USER_PATHS = NO; 1363 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1364 | CLANG_CXX_LIBRARY = "libc++"; 1365 | CLANG_ENABLE_MODULES = YES; 1366 | CLANG_ENABLE_OBJC_ARC = YES; 1367 | CLANG_WARN_BOOL_CONVERSION = YES; 1368 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1369 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1370 | CLANG_WARN_EMPTY_BODY = YES; 1371 | CLANG_WARN_ENUM_CONVERSION = YES; 1372 | CLANG_WARN_INT_CONVERSION = YES; 1373 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1374 | CLANG_WARN_UNREACHABLE_CODE = YES; 1375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1376 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1377 | COPY_PHASE_STRIP = NO; 1378 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1379 | GCC_C_LANGUAGE_STANDARD = gnu99; 1380 | GCC_DYNAMIC_NO_PIC = NO; 1381 | GCC_OPTIMIZATION_LEVEL = 0; 1382 | GCC_PREPROCESSOR_DEFINITIONS = ( 1383 | "DEBUG=1", 1384 | "$(inherited)", 1385 | ); 1386 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1387 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1388 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1389 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1390 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1391 | GCC_WARN_UNUSED_FUNCTION = YES; 1392 | GCC_WARN_UNUSED_VARIABLE = YES; 1393 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1394 | MTL_ENABLE_DEBUG_INFO = YES; 1395 | ONLY_ACTIVE_ARCH = YES; 1396 | SDKROOT = iphoneos; 1397 | }; 1398 | name = Debug; 1399 | }; 1400 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1401 | isa = XCBuildConfiguration; 1402 | buildSettings = { 1403 | ALWAYS_SEARCH_USER_PATHS = NO; 1404 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1405 | CLANG_CXX_LIBRARY = "libc++"; 1406 | CLANG_ENABLE_MODULES = YES; 1407 | CLANG_ENABLE_OBJC_ARC = YES; 1408 | CLANG_WARN_BOOL_CONVERSION = YES; 1409 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1410 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1411 | CLANG_WARN_EMPTY_BODY = YES; 1412 | CLANG_WARN_ENUM_CONVERSION = YES; 1413 | CLANG_WARN_INT_CONVERSION = YES; 1414 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1415 | CLANG_WARN_UNREACHABLE_CODE = YES; 1416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1417 | CODE_SIGN_IDENTITY = "iPhone Developer"; 1418 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1419 | COPY_PHASE_STRIP = YES; 1420 | ENABLE_NS_ASSERTIONS = NO; 1421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1422 | GCC_C_LANGUAGE_STANDARD = gnu99; 1423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1427 | GCC_WARN_UNUSED_FUNCTION = YES; 1428 | GCC_WARN_UNUSED_VARIABLE = YES; 1429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1430 | MTL_ENABLE_DEBUG_INFO = NO; 1431 | SDKROOT = iphoneos; 1432 | VALIDATE_PRODUCT = YES; 1433 | }; 1434 | name = Release; 1435 | }; 1436 | /* End XCBuildConfiguration section */ 1437 | 1438 | /* Begin XCConfigurationList section */ 1439 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "OpenCalcTests" */ = { 1440 | isa = XCConfigurationList; 1441 | buildConfigurations = ( 1442 | 00E356F61AD99517003FC87E /* Debug */, 1443 | 00E356F71AD99517003FC87E /* Release */, 1444 | ); 1445 | defaultConfigurationIsVisible = 0; 1446 | defaultConfigurationName = Release; 1447 | }; 1448 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "OpenCalc" */ = { 1449 | isa = XCConfigurationList; 1450 | buildConfigurations = ( 1451 | 13B07F941A680F5B00A75B9A /* Debug */, 1452 | 13B07F951A680F5B00A75B9A /* Release */, 1453 | ); 1454 | defaultConfigurationIsVisible = 0; 1455 | defaultConfigurationName = Release; 1456 | }; 1457 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OpenCalc-tvOS" */ = { 1458 | isa = XCConfigurationList; 1459 | buildConfigurations = ( 1460 | 2D02E4971E0B4A5E006451C7 /* Debug */, 1461 | 2D02E4981E0B4A5E006451C7 /* Release */, 1462 | ); 1463 | defaultConfigurationIsVisible = 0; 1464 | defaultConfigurationName = Release; 1465 | }; 1466 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "OpenCalc-tvOSTests" */ = { 1467 | isa = XCConfigurationList; 1468 | buildConfigurations = ( 1469 | 2D02E4991E0B4A5E006451C7 /* Debug */, 1470 | 2D02E49A1E0B4A5E006451C7 /* Release */, 1471 | ); 1472 | defaultConfigurationIsVisible = 0; 1473 | defaultConfigurationName = Release; 1474 | }; 1475 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "OpenCalc" */ = { 1476 | isa = XCConfigurationList; 1477 | buildConfigurations = ( 1478 | 83CBBA201A601CBA00E9B192 /* Debug */, 1479 | 83CBBA211A601CBA00E9B192 /* Release */, 1480 | ); 1481 | defaultConfigurationIsVisible = 0; 1482 | defaultConfigurationName = Release; 1483 | }; 1484 | /* End XCConfigurationList section */ 1485 | }; 1486 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1487 | } 1488 | -------------------------------------------------------------------------------- /ios/OpenCalc.xcodeproj/xcshareddata/xcschemes/OpenCalc-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/OpenCalc.xcodeproj/xcshareddata/xcschemes/OpenCalc.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/OpenCalc/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property (nonatomic, strong) UIWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/OpenCalc/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | NSURL *jsCodeLocation; 18 | 19 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 20 | 21 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 22 | moduleName:@"OpenCalc" 23 | initialProperties:nil 24 | launchOptions:launchOptions]; 25 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 26 | 27 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 28 | UIViewController *rootViewController = [UIViewController new]; 29 | rootViewController.view = rootView; 30 | self.window.rootViewController = rootViewController; 31 | [self.window makeKeyAndVisible]; 32 | return YES; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ios/OpenCalc/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Small-40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-20@3x-1.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-Small@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-Small-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "20x20", 54 | "scale" : "1x" 55 | }, 56 | { 57 | "idiom" : "ipad", 58 | "size" : "20x20", 59 | "scale" : "2x" 60 | }, 61 | { 62 | "idiom" : "ipad", 63 | "size" : "29x29", 64 | "scale" : "1x" 65 | }, 66 | { 67 | "idiom" : "ipad", 68 | "size" : "29x29", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "idiom" : "ipad", 73 | "size" : "40x40", 74 | "scale" : "1x" 75 | }, 76 | { 77 | "idiom" : "ipad", 78 | "size" : "40x40", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "76x76", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-76.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-76@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "83.5x83.5", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-83.5@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "1024x1024", 101 | "idiom" : "ios-marketing", 102 | "filename" : "iTunesArtwork@2x.png", 103 | "scale" : "1x" 104 | } 105 | ], 106 | "info" : { 107 | "version" : 1, 108 | "author" : "xcode" 109 | } 110 | } -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-20@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-20@3x-1.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "iTunesArtwork.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "iTunesArtwork@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "iTunesArtwork@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/OpenCalc/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork@3x.png -------------------------------------------------------------------------------- /ios/OpenCalc/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | OpenCalc 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 | 4 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | 32 | NSLocationWhenInUseUsageDescription 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIRequiredDeviceCapabilities 37 | 38 | armv7 39 | 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | UIInterfaceOrientationPortraitUpsideDown 46 | 47 | UIViewControllerBasedStatusBarAppearance 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /ios/OpenCalc/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ios/OpenCalcTests/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 | -------------------------------------------------------------------------------- /ios/OpenCalcTests/OpenCalcTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 16 | 17 | @interface OpenCalcTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation OpenCalcTests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /ios/main.jsbundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/ios/main.jsbundle.meta -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OpenCalc", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest" 8 | }, 9 | "dependencies": { 10 | "eslint": "^4.19.1", 11 | "react": "16.3.1", 12 | "react-native": "^0.55.4", 13 | "react-native-easy-toast": "^1.1.0", 14 | "react-native-swipe-gestures": "^1.0.2" 15 | }, 16 | "devDependencies": { 17 | "babel-cli": "^6.26.0", 18 | "babel-jest": "23.0.0", 19 | "babel-preset-flow": "^6.23.0", 20 | "babel-preset-react-native": "4.0.0", 21 | "flow-bin": "^0.75.0", 22 | "jest": "23.0.0", 23 | "jest-cli": "^23.1.0", 24 | "react-test-renderer": "16.3.1" 25 | }, 26 | "jest": { 27 | "preset": "react-native" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /release_notes.md: -------------------------------------------------------------------------------- 1 | [React Native Android Build Notes](https://facebook.github.io/react-native/docs/signed-apk-android.html) 2 | 3 | Create key 4 | ``` keytool -genkey -v -keystore my-app-key.keystore -alias my-app-alias -keyalg RSA -keysize 2048 -validity 10000 ``` 5 | 6 | Add to gradle.properties 7 | ``` MYAPP_RELEASE_STORE_FILE=my-app-key.keystore 8 | MYAPP_RELEASE_KEY_ALIAS=my-key-alias 9 | MYAPP_RELEASE_STORE_PASSWORD=***** 10 | MYAPP_RELEASE_KEY_PASSWORD=***** ``` 11 | 12 | Build in Android Studio 13 | ``` Build -> Generate Signed Apk ``` 14 | 15 | OR 16 | 17 | Generate installable build 18 | ``` react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ ``` 19 | 20 | Generate build using gradle 21 | ``` cd android && ./gradlew assembleRelease ``` 22 | 23 | Upload to device 24 | ``` adb install -r ./app/build/outputs/apk/app-release-unsigned.apk ``` 25 | -------------------------------------------------------------------------------- /screenshots/Art/Feature-Graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Art/Feature-Graphic.png -------------------------------------------------------------------------------- /screenshots/Art/Icon-Round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Art/Icon-Round.png -------------------------------------------------------------------------------- /screenshots/Nexus 9/Screenshot_1530095758.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Nexus 9/Screenshot_1530095758.png -------------------------------------------------------------------------------- /screenshots/Nexus 9/Screenshot_1530095766.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Nexus 9/Screenshot_1530095766.png -------------------------------------------------------------------------------- /screenshots/Nexus 9/Screenshot_1530095774.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Nexus 9/Screenshot_1530095774.png -------------------------------------------------------------------------------- /screenshots/Nexus 9/Screenshot_1530095788.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Nexus 9/Screenshot_1530095788.png -------------------------------------------------------------------------------- /screenshots/Nexus 9/Screenshot_1530095795.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Nexus 9/Screenshot_1530095795.png -------------------------------------------------------------------------------- /screenshots/Nexus 9/Screenshot_1530095807.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Nexus 9/Screenshot_1530095807.png -------------------------------------------------------------------------------- /screenshots/Pixel 2/Screenshot_1530095302.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Pixel 2/Screenshot_1530095302.png -------------------------------------------------------------------------------- /screenshots/Pixel 2/Screenshot_1530095314.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Pixel 2/Screenshot_1530095314.png -------------------------------------------------------------------------------- /screenshots/Pixel 2/Screenshot_1530095337.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Pixel 2/Screenshot_1530095337.png -------------------------------------------------------------------------------- /screenshots/Pixel 2/Screenshot_1530095349.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Pixel 2/Screenshot_1530095349.png -------------------------------------------------------------------------------- /screenshots/Pixel 2/Screenshot_1530095357.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/Pixel 2/Screenshot_1530095357.png -------------------------------------------------------------------------------- /screenshots/iPad Air 2/ipad-air-landscape.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Air 2/ipad-air-landscape.afdesign -------------------------------------------------------------------------------- /screenshots/iPad Air 2/ipad-air-landscape.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Air 2/ipad-air-landscape.psd -------------------------------------------------------------------------------- /screenshots/iPad Air 2/ipad-air-portrait.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Air 2/ipad-air-portrait.afdesign -------------------------------------------------------------------------------- /screenshots/iPad Air 2/ipad-air-portrait.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Air 2/ipad-air-portrait.psd -------------------------------------------------------------------------------- /screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-25 at 07.14.32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-25 at 07.14.32.png -------------------------------------------------------------------------------- /screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-25 at 07.14.39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-25 at 07.14.39.png -------------------------------------------------------------------------------- /screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.28.57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.28.57.png -------------------------------------------------------------------------------- /screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.44.49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.44.49.png -------------------------------------------------------------------------------- /screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.45.29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPad Pro 2/Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-06-26 at 06.45.29.png -------------------------------------------------------------------------------- /screenshots/iPhone 6/Simulator Screen Shot - iPhone 6 - 2018-06-26 at 05.54.04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 6/Simulator Screen Shot - iPhone 6 - 2018-06-26 at 05.54.04.png -------------------------------------------------------------------------------- /screenshots/iPhone 6/Simulator Screen Shot - iPhone 6 - 2018-06-26 at 06.07.25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 6/Simulator Screen Shot - iPhone 6 - 2018-06-26 at 06.07.25.png -------------------------------------------------------------------------------- /screenshots/iPhone 6/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 05.26.09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 6/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 05.26.09.png -------------------------------------------------------------------------------- /screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.02.png -------------------------------------------------------------------------------- /screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.22.png -------------------------------------------------------------------------------- /screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.46.png -------------------------------------------------------------------------------- /screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.21.57.png -------------------------------------------------------------------------------- /screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.22.27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8+/Simulator Screen Shot - iPhone 8 Plus - 2018-06-26 at 06.22.27.png -------------------------------------------------------------------------------- /screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.19.png -------------------------------------------------------------------------------- /screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.31.png -------------------------------------------------------------------------------- /screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.15.56.png -------------------------------------------------------------------------------- /screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.16.13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.16.13.png -------------------------------------------------------------------------------- /screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.16.48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/Simulator Screen Shot - iPhone 8 - 2018-06-26 at 06.16.48.png -------------------------------------------------------------------------------- /screenshots/iPhone 8/iphone-8-landscape.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/iphone-8-landscape.afdesign -------------------------------------------------------------------------------- /screenshots/iPhone 8/iphone-8-landscape.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/iphone-8-landscape.psd -------------------------------------------------------------------------------- /screenshots/iPhone 8/iphone-8-portrait.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/iphone-8-portrait.afdesign -------------------------------------------------------------------------------- /screenshots/iPhone 8/iphone-8-portrait.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone 8/iphone-8-portrait.psd -------------------------------------------------------------------------------- /screenshots/iPhone X/iphone-x-landscape.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone X/iphone-x-landscape.afdesign -------------------------------------------------------------------------------- /screenshots/iPhone X/iphone-x-landscape.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone X/iphone-x-landscape.psd -------------------------------------------------------------------------------- /screenshots/iPhone X/iphone-x-portrait.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone X/iphone-x-portrait.afdesign -------------------------------------------------------------------------------- /screenshots/iPhone X/iphone-x-portrait.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breeko/OpenCalc/ee2eb9bdfaf5ed9a6524d65113e5dbdffe886fe8/screenshots/iPhone X/iphone-x-portrait.psd --------------------------------------------------------------------------------