├── .watchmanconfig ├── .gitattributes ├── app.json ├── .eslintrc.js ├── extract.rb ├── babel.config.js ├── mappings.wasm ├── android ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── mytestapp │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ └── AndroidManifest.xml │ ├── debug.keystore │ ├── proguard-rules.pro │ ├── build_defs.bzl │ ├── BUCK │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── sentry.properties ├── gradle.properties ├── build.gradle ├── gradlew.bat └── gradlew ├── ios ├── MyTestApp │ ├── Images.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── Info.plist │ ├── AppDelegate.m │ └── Base.lproj │ │ └── LaunchScreen.xib ├── sentry.properties ├── MyTestApp.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── TestClass.h ├── TestClass.m ├── MyTestAppTests │ ├── Info.plist │ └── MyTestAppTests.m ├── MyTestApp-tvOSTests │ └── Info.plist ├── MyTestApp-tvOS │ └── Info.plist ├── Podfile ├── MyTestApp.xcodeproj │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── MyTestApp.xcscheme │ │ │ └── MyTestApp-tvOS.xcscheme │ └── project.pbxproj └── Podfile.lock ├── .buckconfig ├── sentry.properties ├── .prettierrc.js ├── __tests__ └── App-test.js ├── metro.config.js ├── tools ├── exported-language-codes.csv ├── release-notes-language-codes.csv ├── gradle-functions.sh ├── install-app-bundle.sh ├── team-props │ └── git-hooks │ │ └── pre-commit ├── release-checks.sh ├── update-translations.sh └── get-translated-release-notes.sh ├── MyObject.js ├── package.json ├── .gitignore ├── index.js ├── .flowconfig └── test.b64 /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MyTestApp", 3 | "displayName": "MyTestApp" 4 | } -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /extract.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | f = File.binread 'mappings.wasm' 4 | puts f.unpack('C*').to_json 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /mappings.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/mappings.wasm -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MyTestApp 3 | 4 | -------------------------------------------------------------------------------- /ios/MyTestApp/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/debug.keystore -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /sentry.properties: -------------------------------------------------------------------------------- 1 | defaults.project=sentry-testing 2 | defaults.org=a8c 3 | auth.token=b836a32d734f487f81226a3c54fc712416495990472f4b7885a8fa0645e69ace -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/sentry-rn-test-app/on-device-symbolication/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'MyTestApp' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /ios/sentry.properties: -------------------------------------------------------------------------------- 1 | defaults.url=https://sentry.io/ 2 | defaults.org=a8c 3 | defaults.project=sentry-testing 4 | auth.token=b836a32d734f487f81226a3c54fc712416495990472f4b7885a8fa0645e69ace 5 | cli.executable=node_modules/@sentry/cli/bin/sentry-cli 6 | -------------------------------------------------------------------------------- /android/sentry.properties: -------------------------------------------------------------------------------- 1 | defaults.url=https://sentry.io/ 2 | defaults.org=a8c 3 | defaults.project=sentry-testing 4 | auth.token=b836a32d734f487f81226a3c54fc712416495990472f4b7885a8fa0645e69ace 5 | cli.executable=node_modules/@sentry/cli/bin/sentry-cli 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ios/MyTestApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/MyTestApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /tools/exported-language-codes.csv: -------------------------------------------------------------------------------- 1 | en-us,en-rUS,English(US) 2 | ar,ar,Arabic 3 | zh-cn,zh-rCN,Chinese(Simplified) 4 | zh-tw,zh-rTW,Chinese(Traditional) 5 | nl,nl,Dutch 6 | fr,fr,French 7 | de,de,German 8 | he,he,Hebrew 9 | id,id,Indonesian 10 | it,it,Italian 11 | ko,ko,Korean 12 | pt-br,pt-rBR,Portuguese(Brazil) 13 | es,es,Spanish 14 | tr,tr,Turkish 15 | ru,ru,Russian 16 | sv,sv,Swedish 17 | ja,ja,Japanese 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/mytestapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.mytestapp; 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. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "MyTestApp"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ios/TestClass.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestClass.h 3 | // MyTestApp 4 | // 5 | // Created by Jeremy Massel on 2019-10-17. 6 | // Copyright © 2019 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface RCT_EXTERN_MODULE(TestClass, NSObject) 14 | 15 | RCT_EXTERN_METHOD(doNativeException:(NSString *)name) 16 | RCT_EXTERN_METHOD(doNativeCrash) 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /ios/MyTestApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 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 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/MyTestApp/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 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 | -------------------------------------------------------------------------------- /tools/release-notes-language-codes.csv: -------------------------------------------------------------------------------- 1 | ar,ar,ar,Arabic 2 | es,es,es-ES,Spanish 3 | fr,fr,fr-FR,French 4 | de,de,de-DE,German 5 | he,he,iw-IL,Hebrew 6 | id,id,id,Indonesian 7 | it,it,it-IT,Italian 8 | ja,ja,ja-JP,Japanese 9 | ko,ko,ko-KR,Korean(South) 10 | nl,nl,nl-NL,Dutch 11 | pt-br,pt-rBR,pt-BR,Portuguese(Brazil) 12 | ru,ru,ru-RU,Russian 13 | sv,sv,sv-SE,Swedish 14 | tr,tr,tr-TR,Turkish 15 | zh-cn,zh-rCN,zh-CN,Chinese(Simplified) 16 | zh-tw,zh-rTW,zh-TW,Chinese(Traditional) 17 | 18 | -------------------------------------------------------------------------------- /ios/TestClass.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestClass.m 3 | // MyTestApp 4 | // 5 | // Created by Jeremy Massel on 2019-10-17. 6 | // Copyright © 2019 Facebook. All rights reserved. 7 | // 8 | 9 | #import "TestClass.h" 10 | 11 | @implementation TestClass 12 | 13 | -(void) doNativeException:(NSString *)name { 14 | [NSException raise:@"This is a native exception" format: name]; 15 | } 16 | 17 | -(void) doNativeCrash { 18 | [self performSelector:@selector(crash_here_please)]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /MyObject.js: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | class MyObject { 4 | 5 | constructor() { 6 | } 7 | 8 | static doNativeCrash() { 9 | const nm = NativeModules.TestClass; 10 | nm.doNativeCrash() 11 | } 12 | 13 | static doNativeException() { 14 | const nm = NativeModules.TestClass; 15 | nm.doNativeException("Hello World!") 16 | } 17 | 18 | static doJSCrash() { 19 | alerft("Hello World!") 20 | } 21 | } 22 | 23 | export default MyObject; 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /tools/gradle-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script defines some shared functions that are used by the app bundles scipts. 4 | 5 | function get_gradle_property { 6 | GRADLE_PROPERTIES=$1 7 | PROP_KEY=$2 8 | PROP_VALUE=`cat "$GRADLE_PROPERTIES" | grep "$PROP_KEY" | cut -d'=' -f2` 9 | echo $PROP_VALUE 10 | } 11 | 12 | function gradle_version_name { 13 | BUILDFILE=$1 14 | grep -E 'versionName' $BUILDFILE | sed s/versionName// | grep -Eo "[a-zA-Z0-9.-]+" 15 | } 16 | 17 | function gradle_version_code { 18 | BUILDFILE=$1 19 | grep -E 'versionCode' $BUILDFILE | sed s/versionCode// | grep -Eo "[a-zA-Z0-9.-]+" 20 | } 21 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 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 | -------------------------------------------------------------------------------- /ios/MyTestAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MyTestApp", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "buffer": "^5.4.3", 14 | "react": "16.9.0", 15 | "react-native": "0.61.2", 16 | "source-map": "^0.8" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.6.4", 20 | "@babel/runtime": "^7.6.3", 21 | "@react-native-community/eslint-config": "^0.0.5", 22 | "babel-jest": "^24.9.0", 23 | "eslint": "^6.5.1", 24 | "jest": "^24.9.0", 25 | "metro-react-native-babel-preset": "^0.56.0", 26 | "react-test-renderer": "16.9.0" 27 | }, 28 | "jest": { 29 | "preset": "react-native" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ios/MyTestApp-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 | -------------------------------------------------------------------------------- /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.useAndroidX=true 21 | android.enableJetifier=true 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/MyTestApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /tools/install-app-bundle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script installs an Android App Bundle (.aab) file on a device or emulator, using the code signing from gradle.properties 4 | 5 | # Check for bundletool 6 | command -v bundletool > /dev/null || { echo "bundletool is required to build the APKs. Install it with 'brew install bundletool'" >&2; exit 1; } 7 | 8 | # Exit if any command fails 9 | set -eu 10 | 11 | # Load the Gradle helper functions 12 | source "./tools/gradle-functions.sh" 13 | 14 | APP_BUNDLE="$1" 15 | TMP_DIR=$(mktemp -d) 16 | 17 | echo "Generating APKs..." 18 | bundletool build-apks --bundle="$APP_BUNDLE" \ 19 | --output="$TMP_DIR/output.apks" \ 20 | --ks="$(get_gradle_property gradle.properties storeFile)" \ 21 | --ks-pass="pass:$(get_gradle_property gradle.properties storePassword)" \ 22 | --ks-key-alias="$(get_gradle_property gradle.properties keyAlias)" \ 23 | --key-pass="pass:$(get_gradle_property gradle.properties keyPassword)" 24 | echo "Installing..." 25 | bundletool install-apks --apks="$TMP_DIR/output.apks" 26 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.4.2") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tools/team-props/git-hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Stops accidental commits to master and develop. Pulled from: https://gist.github.com/stefansundin/9059706 3 | # Install: 4 | # cd path/to/git/repo 5 | # curl -fL -o .git/hooks/pre-commit https://gist.githubusercontent.com/stefansundin/9059706/raw/pre-commit 6 | # chmod +x .git/hooks/pre-commit 7 | 8 | BRANCH=`git rev-parse --abbrev-ref HEAD` 9 | 10 | if [[ "$BRANCH" == "master" || "$BRANCH" == "develop" ]]; then 11 | echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?" 12 | echo "If so, commit with -n to bypass this pre-commit hook." 13 | exit 1 14 | fi 15 | 16 | # This block allows for chaining pre-commit hooks if this hook is a global hook (via core.hooksPath) and there also exists a repo-specific pre-commit hook 17 | if [[ -f ".git/hooks/pre-commit" ]]; then 18 | type realpath >/dev/null 2>&1 || { echo >&2 "NOTE: the realpath binary is required to chain to the repo-specific pre-commit hook. Ignoring."; exit 0; } 19 | if [[ "$(realpath "${BASH_SOURCE[0]}")" != "$(realpath ".git/hooks/pre-commit")" ]]; then 20 | .git/hooks/pre-commit 21 | exit $? 22 | fi 23 | fi 24 | 25 | exit 0 26 | -------------------------------------------------------------------------------- /tools/release-checks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | RESDIR=WooCommerce/src/main/res/ 4 | BUILDFILE=WooCommerce/build.gradle 5 | 6 | function pOk() { 7 | echo "[$(tput setaf 2)OK$(tput sgr0)]" 8 | } 9 | 10 | function pFail() { 11 | echo "[$(tput setaf 1)KO$(tput sgr0)]" 12 | } 13 | 14 | function checkENStrings() { 15 | if [[ -n $(git status --porcelain|grep "M res") ]]; then 16 | /bin/echo -n "Unstagged changes detected in $RESDIR - can't continue..." 17 | pFail 18 | exit 3 19 | fi 20 | # save local changes 21 | git stash | grep "No local changes to save" > /dev/null 22 | needpop=$? 23 | 24 | rm -f $RESDIR/values-??/strings.xml $RESDIR/values-??-r??/strings.xml 25 | /bin/echo -n "Check for missing strings (slow)..." 26 | ./gradlew buildVanillaRelease > /dev/null 2>&1 && pOk || (pFail; ./gradlew buildVanillaRelease) 27 | ./gradlew clean > /dev/null 2>&1 28 | git checkout -- $RESDIR/ 29 | 30 | # restore local changes 31 | if [ $needpop -eq 1 ]; then 32 | git stash pop > /dev/null 33 | fi 34 | } 35 | 36 | function printVersion() { 37 | gradle_version=$(grep -E 'versionName' $BUILDFILE | sed s/versionName// | grep -Eo "[a-zA-Z0-9.-]+" ) 38 | echo "$BUILDFILE version $gradle_version" 39 | } 40 | 41 | checkENStrings 42 | printVersion -------------------------------------------------------------------------------- /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 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.mytestapp", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.mytestapp", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | global.Buffer = global.Buffer || require('buffer').Buffer 10 | 11 | FileReader.prototype.readAsArrayBuffer = function (blob) { 12 | if (this.readyState === this.LOADING) throw new Error("InvalidStateError"); 13 | this._setReadyState(this.LOADING); 14 | this._result = null; 15 | this._error = null; 16 | const fr = new FileReader(); 17 | fr.onloadend = () => { 18 | const content = atob(fr.result.substr("data:application/octet-stream;base64,".length)); 19 | const buffer = new ArrayBuffer(content.length); 20 | const view = new Uint8Array(buffer); 21 | view.set(Array.from(content).map(c => c.charCodeAt(0))); 22 | this._result = buffer; 23 | this._setReadyState(this.DONE); 24 | }; 25 | fr.readAsDataURL(blob); 26 | } 27 | 28 | // from: https://stackoverflow.com/questions/42829838/react-native-atob-btoa-not-working-without-remote-js-debugging 29 | const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 30 | const atob = (input = '') => { 31 | let str = input.replace(/=+$/, ''); 32 | let output = ''; 33 | 34 | if (str.length % 4 == 1) { 35 | throw new Error("'atob' failed: The string to be decoded is not correctly encoded."); 36 | } 37 | for (let bc = 0, bs = 0, buffer, i = 0; 38 | buffer = str.charAt(i++); 39 | 40 | ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, 41 | bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 42 | ) { 43 | buffer = chars.indexOf(buffer); 44 | } 45 | 46 | return output; 47 | } 48 | 49 | AppRegistry.registerComponent(appName, () => App); 50 | -------------------------------------------------------------------------------- /ios/MyTestApp-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /tools/update-translations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LANG_FILE=./tools/exported-language-codes.csv 4 | RESDIR=./WooCommerce/src/main/res/ 5 | 6 | # Language definitions resource file 7 | HEADER=\\\n\