├── .buckconfig ├── .bundle └── config ├── .eslintrc.js ├── .flowconfig ├── .gitignore ├── .node-version ├── .prettierrc.js ├── .ruby-version ├── .watchmanconfig ├── App.js ├── Gemfile ├── __tests__ └── App-test.js ├── android ├── app │ ├── _BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── blinked │ │ │ └── ReactNativeFlipper.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── blinked │ │ │ ├── MainActivity.java │ │ │ ├── MainApplication.java │ │ │ └── newarchitecture │ │ │ ├── MainApplicationReactNativeHost.java │ │ │ ├── components │ │ │ └── MainComponentsRegistry.java │ │ │ └── modules │ │ │ └── MainApplicationTurboModuleManagerDelegate.java │ │ ├── jni │ │ ├── CMakeLists.txt │ │ ├── MainApplicationModuleProvider.cpp │ │ ├── MainApplicationModuleProvider.h │ │ ├── MainApplicationTurboModuleManagerDelegate.cpp │ │ ├── MainApplicationTurboModuleManagerDelegate.h │ │ ├── MainComponentsRegistry.cpp │ │ ├── MainComponentsRegistry.h │ │ └── OnLoad.cpp │ │ └── res │ │ ├── drawable │ │ └── rn_edit_text_material.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 │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hs_err_pid33348.log ├── hs_err_pid35080.log ├── hs_err_pid36024.log ├── replay_pid36024.log └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios ├── .xcode.env ├── Podfile ├── bLinked.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── bLinked.xcscheme ├── bLinked │ ├── AppDelegate.h │ ├── AppDelegate.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── main.m └── bLinkedTests │ ├── Info.plist │ └── bLinkedTests.m ├── metro.config.js ├── package-lock.json ├── package.json ├── src ├── assets │ └── images │ │ ├── Logo-1.png │ │ ├── Logo-2.png │ │ ├── Mark.png │ │ ├── avatar.png │ │ └── deliver.png ├── context │ ├── customPersistReducer.js │ ├── initalStates.js │ ├── persistConfig.js │ ├── store.js │ └── userSlice.js ├── navigation │ ├── AppNavigator.js │ ├── AuthNavigator.js │ ├── HomeNavigator.js │ └── routes.js ├── services │ └── firebase │ │ └── auth.js ├── themes │ ├── Colors.js │ └── Units.js └── ui │ ├── components │ ├── CustomButton.js │ ├── CustomInput.js │ ├── CustomNumberInput.js │ └── Loading.js │ └── screens │ ├── Home.js │ ├── Login.js │ ├── LoginMain.js │ ├── Main.js │ ├── Password.js │ ├── Register.js │ ├── Splash.js │ ├── User.js │ └── Verify.js └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; Flow doesn't support platforms 12 | .*/Libraries/Utilities/LoadingView.js 13 | 14 | .*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ 15 | 16 | [untyped] 17 | .*/node_modules/@react-native-community/cli/.*/.* 18 | 19 | [include] 20 | 21 | [libs] 22 | node_modules/react-native/interface.js 23 | node_modules/react-native/flow/ 24 | 25 | [options] 26 | emoji=true 27 | 28 | exact_by_default=true 29 | 30 | format.bracket_spacing=false 31 | 32 | module.file_ext=.js 33 | module.file_ext=.json 34 | module.file_ext=.ios.js 35 | 36 | munge_underscores=true 37 | 38 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 39 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 40 | 41 | suppress_type=$FlowIssue 42 | suppress_type=$FlowFixMe 43 | suppress_type=$FlowFixMeProps 44 | suppress_type=$FlowFixMeState 45 | 46 | [lints] 47 | sketchy-null-number=warn 48 | sketchy-null-mixed=warn 49 | sketchy-number=warn 50 | untyped-type-import=warn 51 | nonstrict-import=warn 52 | deprecated-type=warn 53 | unsafe-getters-setters=warn 54 | unnecessary-invariant=warn 55 | 56 | [strict] 57 | deprecated-type 58 | nonstrict-import 59 | sketchy-null 60 | unclear-type 61 | unsafe-getters-setters 62 | untyped-import 63 | untyped-type-import 64 | 65 | [version] 66 | ^0.182.0 67 | -------------------------------------------------------------------------------- /.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 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | 35 | # node.js 36 | # 37 | node_modules/ 38 | npm-debug.log 39 | yarn-error.log 40 | 41 | # BUCK 42 | buck-out/ 43 | \.buckd/ 44 | *.keystore 45 | !debug.keystore 46 | 47 | # fastlane 48 | # 49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 50 | # screenshots whenever they are needed. 51 | # For more information about the recommended setup visit: 52 | # https://docs.fastlane.tools/best-practices/source-control/ 53 | 54 | **/fastlane/report.xml 55 | **/fastlane/Preview.html 56 | **/fastlane/screenshots 57 | **/fastlane/test_output 58 | 59 | # Bundle artifact 60 | *.jsbundle 61 | 62 | # Ruby / CocoaPods 63 | /ios/Pods/ 64 | /vendor/bundle/ 65 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.5 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React, {useEffect} from 'react'; 2 | import AppNavigator from './src/navigation/AppNavigator'; 3 | import FlashMessage from 'react-native-flash-message'; 4 | import {Provider} from 'react-redux'; 5 | import {store} from './src/context/store'; 6 | import {PersistGate} from 'redux-persist/integration/react'; 7 | import {persistStore} from 'redux-persist'; 8 | 9 | const App = () => { 10 | const perStore = persistStore(store); 11 | 12 | return ( 13 | 14 | 15 | 16 | 17 | 18 | 19 | ); 20 | }; 21 | 22 | export default App; 23 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '2.7.5' 5 | 6 | gem 'cocoapods', '~> 1.11', '>= 1.11.2' 7 | -------------------------------------------------------------------------------- /__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 | -------------------------------------------------------------------------------- /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.blinked", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.blinked", 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 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" 3 | import com.android.build.OutputFile 4 | import org.apache.tools.ant.taskdefs.condition.Os 5 | 6 | /** 7 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 8 | * and bundleReleaseJsAndAssets). 9 | * These basically call `react-native bundle` with the correct arguments during the Android build 10 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 11 | * bundle directly from the development server. Below you can see all the possible configurations 12 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 13 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 14 | * 15 | * project.ext.react = [ 16 | * // the name of the generated asset file containing your JS bundle 17 | * bundleAssetName: "index.android.bundle", 18 | * 19 | * // the entry file for bundle generation. If none specified and 20 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is 21 | * // default. Can be overridden with ENTRY_FILE environment variable. 22 | * entryFile: "index.android.js", 23 | * 24 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 25 | * bundleCommand: "ram-bundle", 26 | * 27 | * // whether to bundle JS and assets in debug mode 28 | * bundleInDebug: false, 29 | * 30 | * // whether to bundle JS and assets in release mode 31 | * bundleInRelease: true, 32 | * 33 | * // whether to bundle JS and assets in another build variant (if configured). 34 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 35 | * // The configuration property can be in the following formats 36 | * // 'bundleIn${productFlavor}${buildType}' 37 | * // 'bundleIn${buildType}' 38 | * // bundleInFreeDebug: true, 39 | * // bundleInPaidRelease: true, 40 | * // bundleInBeta: true, 41 | * 42 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 43 | * // for example: to disable dev mode in the staging build type (if configured) 44 | * devDisabledInStaging: true, 45 | * // The configuration property can be in the following formats 46 | * // 'devDisabledIn${productFlavor}${buildType}' 47 | * // 'devDisabledIn${buildType}' 48 | * 49 | * // the root of your project, i.e. where "package.json" lives 50 | * root: "../../", 51 | * 52 | * // where to put the JS bundle asset in debug mode 53 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 54 | * 55 | * // where to put the JS bundle asset in release mode 56 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 57 | * 58 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 59 | * // require('./image.png')), in debug mode 60 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 61 | * 62 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 63 | * // require('./image.png')), in release mode 64 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 65 | * 66 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 67 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 68 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 69 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 70 | * // for example, you might want to remove it from here. 71 | * inputExcludes: ["android/**", "ios/**"], 72 | * 73 | * // override which node gets called and with what additional arguments 74 | * nodeExecutableAndArgs: ["node"], 75 | * 76 | * // supply additional arguments to the packager 77 | * extraPackagerArgs: [] 78 | * ] 79 | */ 80 | 81 | project.ext.react = [ 82 | enableHermes: true, // clean and rebuild if changing 83 | ] 84 | 85 | apply from: "../../node_modules/react-native/react.gradle" 86 | 87 | project.ext.vectoricons = [ 88 | iconFontNames: [ 'MaterialCommunityIcons.ttf', 'Ionicons.ttf', 'Feather.ttf', 'Octicons.ttf' ] // Name of the font files you want to copy 89 | ] 90 | 91 | 92 | /** 93 | * Set this to true to create two separate APKs instead of one: 94 | * - An APK that only works on ARM devices 95 | * - An APK that only works on x86 devices 96 | * The advantage is the size of the APK is reduced by about 4MB. 97 | * Upload all the APKs to the Play Store and people will download 98 | * the correct one based on the CPU architecture of their device. 99 | */ 100 | def enableSeparateBuildPerCPUArchitecture = false 101 | 102 | /** 103 | * Run Proguard to shrink the Java bytecode in release builds. 104 | */ 105 | def enableProguardInReleaseBuilds = false 106 | 107 | /** 108 | * The preferred build flavor of JavaScriptCore. 109 | * 110 | * For example, to use the international variant, you can use: 111 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 112 | * 113 | * The international variant includes ICU i18n library and necessary data 114 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 115 | * give correct results when using with locales other than en-US. Note that 116 | * this variant is about 6MiB larger per architecture than default. 117 | */ 118 | def jscFlavor = 'org.webkit:android-jsc:+' 119 | 120 | /** 121 | * Whether to enable the Hermes VM. 122 | * 123 | * This should be set on project.ext.react and that value will be read here. If it is not set 124 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 125 | * and the benefits of using Hermes will therefore be sharply reduced. 126 | */ 127 | def enableHermes = project.ext.react.get("enableHermes", false); 128 | 129 | /** 130 | * Architectures to build native code for. 131 | */ 132 | def reactNativeArchitectures() { 133 | def value = project.getProperties().get("reactNativeArchitectures") 134 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] 135 | } 136 | 137 | android { 138 | ndkVersion rootProject.ext.ndkVersion 139 | 140 | compileSdkVersion rootProject.ext.compileSdkVersion 141 | 142 | defaultConfig { 143 | applicationId "com.blinked" 144 | minSdkVersion rootProject.ext.minSdkVersion 145 | targetSdkVersion rootProject.ext.targetSdkVersion 146 | versionCode 1 147 | versionName "1.0" 148 | buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() 149 | 150 | if (isNewArchitectureEnabled()) { 151 | // We configure the CMake build only if you decide to opt-in for the New Architecture. 152 | externalNativeBuild { 153 | cmake { 154 | arguments "-DPROJECT_BUILD_DIR=$buildDir", 155 | "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", 156 | "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", 157 | "-DNODE_MODULES_DIR=$rootDir/../node_modules", 158 | "-DANDROID_STL=c++_shared" 159 | } 160 | } 161 | if (!enableSeparateBuildPerCPUArchitecture) { 162 | ndk { 163 | abiFilters (*reactNativeArchitectures()) 164 | } 165 | } 166 | } 167 | } 168 | 169 | if (isNewArchitectureEnabled()) { 170 | // We configure the NDK build only if you decide to opt-in for the New Architecture. 171 | externalNativeBuild { 172 | cmake { 173 | path "$projectDir/src/main/jni/CMakeLists.txt" 174 | } 175 | } 176 | def reactAndroidProjectDir = project(':ReactAndroid').projectDir 177 | def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { 178 | dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") 179 | from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") 180 | into("$buildDir/react-ndk/exported") 181 | } 182 | def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { 183 | dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") 184 | from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") 185 | into("$buildDir/react-ndk/exported") 186 | } 187 | afterEvaluate { 188 | // If you wish to add a custom TurboModule or component locally, 189 | // you should uncomment this line. 190 | // preBuild.dependsOn("generateCodegenArtifactsFromSchema") 191 | preDebugBuild.dependsOn(packageReactNdkDebugLibs) 192 | preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) 193 | 194 | // Due to a bug inside AGP, we have to explicitly set a dependency 195 | // between configureCMakeDebug* tasks and the preBuild tasks. 196 | // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 197 | configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) 198 | configureCMakeDebug.dependsOn(preDebugBuild) 199 | reactNativeArchitectures().each { architecture -> 200 | tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { 201 | dependsOn("preDebugBuild") 202 | } 203 | tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { 204 | dependsOn("preReleaseBuild") 205 | } 206 | } 207 | } 208 | } 209 | 210 | splits { 211 | abi { 212 | reset() 213 | enable enableSeparateBuildPerCPUArchitecture 214 | universalApk false // If true, also generate a universal APK 215 | include (*reactNativeArchitectures()) 216 | } 217 | } 218 | signingConfigs { 219 | debug { 220 | storeFile file('debug.keystore') 221 | storePassword 'android' 222 | keyAlias 'androiddebugkey' 223 | keyPassword 'android' 224 | } 225 | } 226 | buildTypes { 227 | debug { 228 | signingConfig signingConfigs.debug 229 | } 230 | release { 231 | // Caution! In production, you need to generate your own keystore file. 232 | // see https://reactnative.dev/docs/signed-apk-android. 233 | signingConfig signingConfigs.debug 234 | minifyEnabled enableProguardInReleaseBuilds 235 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 236 | } 237 | } 238 | 239 | // applicationVariants are e.g. debug, release 240 | applicationVariants.all { variant -> 241 | variant.outputs.each { output -> 242 | // For each separate APK per architecture, set a unique version code as described here: 243 | // https://developer.android.com/studio/build/configure-apk-splits.html 244 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. 245 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 246 | def abi = output.getFilter(OutputFile.ABI) 247 | if (abi != null) { // null for the universal-debug, universal-release variants 248 | output.versionCodeOverride = 249 | defaultConfig.versionCode * 1000 + versionCodes.get(abi) 250 | } 251 | 252 | } 253 | } 254 | } 255 | 256 | dependencies { 257 | implementation fileTree(dir: "libs", include: ["*.jar"]) 258 | 259 | //noinspection GradleDynamicVersion 260 | implementation "com.facebook.react:react-native:+" // From node_modules 261 | 262 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 263 | 264 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 265 | exclude group:'com.facebook.fbjni' 266 | } 267 | 268 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 269 | exclude group:'com.facebook.flipper' 270 | exclude group:'com.squareup.okhttp3', module:'okhttp' 271 | } 272 | 273 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 274 | exclude group:'com.facebook.flipper' 275 | } 276 | 277 | if (enableHermes) { 278 | //noinspection GradleDynamicVersion 279 | implementation("com.facebook.react:hermes-engine:+") { // From node_modules 280 | exclude group:'com.facebook.fbjni' 281 | } 282 | } else { 283 | implementation jscFlavor 284 | } 285 | } 286 | 287 | if (isNewArchitectureEnabled()) { 288 | // If new architecture is enabled, we let you build RN from source 289 | // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. 290 | // This will be applied to all the imported transtitive dependency. 291 | configurations.all { 292 | resolutionStrategy.dependencySubstitution { 293 | substitute(module("com.facebook.react:react-native")) 294 | .using(project(":ReactAndroid")) 295 | .because("On New Architecture we're building React Native from source") 296 | substitute(module("com.facebook.react:hermes-engine")) 297 | .using(project(":ReactAndroid:hermes-engine")) 298 | .because("On New Architecture we're building Hermes from source") 299 | } 300 | } 301 | } 302 | 303 | // Run this once to be able to run the application with BUCK 304 | // puts all compile dependencies into folder libs for BUCK to use 305 | task copyDownloadableDepsToLibs(type: Copy) { 306 | from configurations.implementation 307 | into 'libs' 308 | } 309 | 310 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 311 | 312 | def isNewArchitectureEnabled() { 313 | // To opt-in for the New Architecture, you can either: 314 | // - Set `newArchEnabled` to true inside the `gradle.properties` file 315 | // - Invoke gradle with `-newArchEnabled=true` 316 | // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` 317 | return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" 318 | } 319 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/debug.keystore -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/blinked/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.blinked; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceEventListener; 23 | import com.facebook.react.ReactInstanceManager; 24 | import com.facebook.react.bridge.ReactContext; 25 | import com.facebook.react.modules.network.NetworkingModule; 26 | import okhttp3.OkHttpClient; 27 | 28 | public class ReactNativeFlipper { 29 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 30 | if (FlipperUtils.shouldEnableFlipper(context)) { 31 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 32 | 33 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 34 | client.addPlugin(new ReactFlipperPlugin()); 35 | client.addPlugin(new DatabasesFlipperPlugin(context)); 36 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 37 | client.addPlugin(CrashReporterPlugin.getInstance()); 38 | 39 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 40 | NetworkingModule.setCustomClientBuilder( 41 | new NetworkingModule.CustomClientBuilder() { 42 | @Override 43 | public void apply(OkHttpClient.Builder builder) { 44 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 45 | } 46 | }); 47 | client.addPlugin(networkFlipperPlugin); 48 | client.start(); 49 | 50 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 51 | // Hence we run if after all native modules have been initialized 52 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 53 | if (reactContext == null) { 54 | reactInstanceManager.addReactInstanceEventListener( 55 | new ReactInstanceEventListener() { 56 | @Override 57 | public void onReactContextInitialized(ReactContext reactContext) { 58 | reactInstanceManager.removeReactInstanceEventListener(this); 59 | reactContext.runOnNativeModulesQueueThread( 60 | new Runnable() { 61 | @Override 62 | public void run() { 63 | client.addPlugin(new FrescoFlipperPlugin()); 64 | } 65 | }); 66 | } 67 | }); 68 | } else { 69 | client.addPlugin(new FrescoFlipperPlugin()); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/blinked/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.blinked; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactActivityDelegate; 5 | import com.facebook.react.ReactRootView; 6 | 7 | public class MainActivity extends ReactActivity { 8 | 9 | /** 10 | * Returns the name of the main component registered from JavaScript. This is used to schedule 11 | * rendering of the component. 12 | */ 13 | @Override 14 | protected String getMainComponentName() { 15 | return "bLinked"; 16 | } 17 | 18 | /** 19 | * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and 20 | * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer 21 | * (Paper). 22 | */ 23 | @Override 24 | protected ReactActivityDelegate createReactActivityDelegate() { 25 | return new MainActivityDelegate(this, getMainComponentName()); 26 | } 27 | 28 | public static class MainActivityDelegate extends ReactActivityDelegate { 29 | public MainActivityDelegate(ReactActivity activity, String mainComponentName) { 30 | super(activity, mainComponentName); 31 | } 32 | 33 | @Override 34 | protected ReactRootView createRootView() { 35 | ReactRootView reactRootView = new ReactRootView(getContext()); 36 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 37 | reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED); 38 | return reactRootView; 39 | } 40 | 41 | @Override 42 | protected boolean isConcurrentRootEnabled() { 43 | // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18). 44 | // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html 45 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/blinked/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.blinked; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.config.ReactFeatureFlags; 11 | import com.facebook.soloader.SoLoader; 12 | import com.blinked.newarchitecture.MainApplicationReactNativeHost; 13 | import java.lang.reflect.InvocationTargetException; 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = 19 | new ReactNativeHost(this) { 20 | @Override 21 | public boolean getUseDeveloperSupport() { 22 | return BuildConfig.DEBUG; 23 | } 24 | 25 | @Override 26 | protected List getPackages() { 27 | @SuppressWarnings("UnnecessaryLocalVariable") 28 | List packages = new PackageList(this).getPackages(); 29 | // Packages that cannot be autolinked yet can be added manually here, for example: 30 | // packages.add(new MyReactNativePackage()); 31 | return packages; 32 | } 33 | 34 | @Override 35 | protected String getJSMainModuleName() { 36 | return "index"; 37 | } 38 | }; 39 | 40 | private final ReactNativeHost mNewArchitectureNativeHost = 41 | new MainApplicationReactNativeHost(this); 42 | 43 | @Override 44 | public ReactNativeHost getReactNativeHost() { 45 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 46 | return mNewArchitectureNativeHost; 47 | } else { 48 | return mReactNativeHost; 49 | } 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | // If you opted-in for the New Architecture, we enable the TurboModule system 56 | ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 57 | SoLoader.init(this, /* native exopackage */ false); 58 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 59 | } 60 | 61 | /** 62 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 63 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 64 | * 65 | * @param context 66 | * @param reactInstanceManager 67 | */ 68 | private static void initializeFlipper( 69 | Context context, ReactInstanceManager reactInstanceManager) { 70 | if (BuildConfig.DEBUG) { 71 | try { 72 | /* 73 | We use reflection here to pick up the class that initializes Flipper, 74 | since Flipper library is not available in release mode 75 | */ 76 | Class aClass = Class.forName("com.blinked.ReactNativeFlipper"); 77 | aClass 78 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 79 | .invoke(null, context, reactInstanceManager); 80 | } catch (ClassNotFoundException e) { 81 | e.printStackTrace(); 82 | } catch (NoSuchMethodException e) { 83 | e.printStackTrace(); 84 | } catch (IllegalAccessException e) { 85 | e.printStackTrace(); 86 | } catch (InvocationTargetException e) { 87 | e.printStackTrace(); 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/blinked/newarchitecture/MainApplicationReactNativeHost.java: -------------------------------------------------------------------------------- 1 | package com.blinked.newarchitecture; 2 | 3 | import android.app.Application; 4 | import androidx.annotation.NonNull; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactInstanceManager; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate; 10 | import com.facebook.react.bridge.JSIModulePackage; 11 | import com.facebook.react.bridge.JSIModuleProvider; 12 | import com.facebook.react.bridge.JSIModuleSpec; 13 | import com.facebook.react.bridge.JSIModuleType; 14 | import com.facebook.react.bridge.JavaScriptContextHolder; 15 | import com.facebook.react.bridge.ReactApplicationContext; 16 | import com.facebook.react.bridge.UIManager; 17 | import com.facebook.react.fabric.ComponentFactory; 18 | import com.facebook.react.fabric.CoreComponentsRegistry; 19 | import com.facebook.react.fabric.FabricJSIModuleProvider; 20 | import com.facebook.react.fabric.ReactNativeConfig; 21 | import com.facebook.react.uimanager.ViewManagerRegistry; 22 | import com.blinked.BuildConfig; 23 | import com.blinked.newarchitecture.components.MainComponentsRegistry; 24 | import com.blinked.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | 28 | /** 29 | * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both 30 | * TurboModule delegates and the Fabric Renderer. 31 | * 32 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 33 | * `newArchEnabled` property). Is ignored otherwise. 34 | */ 35 | public class MainApplicationReactNativeHost extends ReactNativeHost { 36 | public MainApplicationReactNativeHost(Application application) { 37 | super(application); 38 | } 39 | 40 | @Override 41 | public boolean getUseDeveloperSupport() { 42 | return BuildConfig.DEBUG; 43 | } 44 | 45 | @Override 46 | protected List getPackages() { 47 | List packages = new PackageList(this).getPackages(); 48 | // Packages that cannot be autolinked yet can be added manually here, for example: 49 | // packages.add(new MyReactNativePackage()); 50 | // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: 51 | // packages.add(new TurboReactPackage() { ... }); 52 | // If you have custom Fabric Components, their ViewManagers should also be loaded here 53 | // inside a ReactPackage. 54 | return packages; 55 | } 56 | 57 | @Override 58 | protected String getJSMainModuleName() { 59 | return "index"; 60 | } 61 | 62 | @NonNull 63 | @Override 64 | protected ReactPackageTurboModuleManagerDelegate.Builder 65 | getReactPackageTurboModuleManagerDelegateBuilder() { 66 | // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary 67 | // for the new architecture and to use TurboModules correctly. 68 | return new MainApplicationTurboModuleManagerDelegate.Builder(); 69 | } 70 | 71 | @Override 72 | protected JSIModulePackage getJSIModulePackage() { 73 | return new JSIModulePackage() { 74 | @Override 75 | public List getJSIModules( 76 | final ReactApplicationContext reactApplicationContext, 77 | final JavaScriptContextHolder jsContext) { 78 | final List specs = new ArrayList<>(); 79 | 80 | // Here we provide a new JSIModuleSpec that will be responsible of providing the 81 | // custom Fabric Components. 82 | specs.add( 83 | new JSIModuleSpec() { 84 | @Override 85 | public JSIModuleType getJSIModuleType() { 86 | return JSIModuleType.UIManager; 87 | } 88 | 89 | @Override 90 | public JSIModuleProvider getJSIModuleProvider() { 91 | final ComponentFactory componentFactory = new ComponentFactory(); 92 | CoreComponentsRegistry.register(componentFactory); 93 | 94 | // Here we register a Components Registry. 95 | // The one that is generated with the template contains no components 96 | // and just provides you the one from React Native core. 97 | MainComponentsRegistry.register(componentFactory); 98 | 99 | final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); 100 | 101 | ViewManagerRegistry viewManagerRegistry = 102 | new ViewManagerRegistry( 103 | reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); 104 | 105 | return new FabricJSIModuleProvider( 106 | reactApplicationContext, 107 | componentFactory, 108 | ReactNativeConfig.DEFAULT_CONFIG, 109 | viewManagerRegistry); 110 | } 111 | }); 112 | return specs; 113 | } 114 | }; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/blinked/newarchitecture/components/MainComponentsRegistry.java: -------------------------------------------------------------------------------- 1 | package com.blinked.newarchitecture.components; 2 | 3 | import com.facebook.jni.HybridData; 4 | import com.facebook.proguard.annotations.DoNotStrip; 5 | import com.facebook.react.fabric.ComponentFactory; 6 | import com.facebook.soloader.SoLoader; 7 | 8 | /** 9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a 10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ 11 | * folder for you). 12 | * 13 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 14 | * `newArchEnabled` property). Is ignored otherwise. 15 | */ 16 | @DoNotStrip 17 | public class MainComponentsRegistry { 18 | static { 19 | SoLoader.loadLibrary("fabricjni"); 20 | } 21 | 22 | @DoNotStrip private final HybridData mHybridData; 23 | 24 | @DoNotStrip 25 | private native HybridData initHybrid(ComponentFactory componentFactory); 26 | 27 | @DoNotStrip 28 | private MainComponentsRegistry(ComponentFactory componentFactory) { 29 | mHybridData = initHybrid(componentFactory); 30 | } 31 | 32 | @DoNotStrip 33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) { 34 | return new MainComponentsRegistry(componentFactory); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/blinked/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java: -------------------------------------------------------------------------------- 1 | package com.blinked.newarchitecture.modules; 2 | 3 | import com.facebook.jni.HybridData; 4 | import com.facebook.react.ReactPackage; 5 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.soloader.SoLoader; 8 | import java.util.List; 9 | 10 | /** 11 | * Class responsible to load the TurboModules. This class has native methods and needs a 12 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ 13 | * folder for you). 14 | * 15 | *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the 16 | * `newArchEnabled` property). Is ignored otherwise. 17 | */ 18 | public class MainApplicationTurboModuleManagerDelegate 19 | extends ReactPackageTurboModuleManagerDelegate { 20 | 21 | private static volatile boolean sIsSoLibraryLoaded; 22 | 23 | protected MainApplicationTurboModuleManagerDelegate( 24 | ReactApplicationContext reactApplicationContext, List packages) { 25 | super(reactApplicationContext, packages); 26 | } 27 | 28 | protected native HybridData initHybrid(); 29 | 30 | native boolean canCreateTurboModule(String moduleName); 31 | 32 | public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { 33 | protected MainApplicationTurboModuleManagerDelegate build( 34 | ReactApplicationContext context, List packages) { 35 | return new MainApplicationTurboModuleManagerDelegate(context, packages); 36 | } 37 | } 38 | 39 | @Override 40 | protected synchronized void maybeLoadOtherSoLibraries() { 41 | if (!sIsSoLibraryLoaded) { 42 | // If you change the name of your application .so file in the Android.mk file, 43 | // make sure you update the name here as well. 44 | SoLoader.loadLibrary("blinked_appmodules"); 45 | sIsSoLibraryLoaded = true; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/app/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | # Define the library name here. 4 | project(blinked_appmodules) 5 | 6 | # This file includes all the necessary to let you build your application with the New Architecture. 7 | include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) 8 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationModuleProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "MainApplicationModuleProvider.h" 2 | 3 | #include 4 | #include 5 | 6 | namespace facebook { 7 | namespace react { 8 | 9 | std::shared_ptr MainApplicationModuleProvider( 10 | const std::string &moduleName, 11 | const JavaTurboModule::InitParams ¶ms) { 12 | // Here you can provide your own module provider for TurboModules coming from 13 | // either your application or from external libraries. The approach to follow 14 | // is similar to the following (for a library called `samplelibrary`: 15 | // 16 | // auto module = samplelibrary_ModuleProvider(moduleName, params); 17 | // if (module != nullptr) { 18 | // return module; 19 | // } 20 | // return rncore_ModuleProvider(moduleName, params); 21 | 22 | // Module providers autolinked by RN CLI 23 | auto rncli_module = rncli_ModuleProvider(moduleName, params); 24 | if (rncli_module != nullptr) { 25 | return rncli_module; 26 | } 27 | 28 | return rncore_ModuleProvider(moduleName, params); 29 | } 30 | 31 | } // namespace react 32 | } // namespace facebook 33 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationModuleProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace facebook { 9 | namespace react { 10 | 11 | std::shared_ptr MainApplicationModuleProvider( 12 | const std::string &moduleName, 13 | const JavaTurboModule::InitParams ¶ms); 14 | 15 | } // namespace react 16 | } // namespace facebook 17 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "MainApplicationTurboModuleManagerDelegate.h" 2 | #include "MainApplicationModuleProvider.h" 3 | 4 | namespace facebook { 5 | namespace react { 6 | 7 | jni::local_ref 8 | MainApplicationTurboModuleManagerDelegate::initHybrid( 9 | jni::alias_ref) { 10 | return makeCxxInstance(); 11 | } 12 | 13 | void MainApplicationTurboModuleManagerDelegate::registerNatives() { 14 | registerHybrid({ 15 | makeNativeMethod( 16 | "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid), 17 | makeNativeMethod( 18 | "canCreateTurboModule", 19 | MainApplicationTurboModuleManagerDelegate::canCreateTurboModule), 20 | }); 21 | } 22 | 23 | std::shared_ptr 24 | MainApplicationTurboModuleManagerDelegate::getTurboModule( 25 | const std::string &name, 26 | const std::shared_ptr &jsInvoker) { 27 | // Not implemented yet: provide pure-C++ NativeModules here. 28 | return nullptr; 29 | } 30 | 31 | std::shared_ptr 32 | MainApplicationTurboModuleManagerDelegate::getTurboModule( 33 | const std::string &name, 34 | const JavaTurboModule::InitParams ¶ms) { 35 | return MainApplicationModuleProvider(name, params); 36 | } 37 | 38 | bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule( 39 | const std::string &name) { 40 | return getTurboModule(name, nullptr) != nullptr || 41 | getTurboModule(name, {.moduleName = name}) != nullptr; 42 | } 43 | 44 | } // namespace react 45 | } // namespace facebook 46 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | namespace facebook { 8 | namespace react { 9 | 10 | class MainApplicationTurboModuleManagerDelegate 11 | : public jni::HybridClass< 12 | MainApplicationTurboModuleManagerDelegate, 13 | TurboModuleManagerDelegate> { 14 | public: 15 | // Adapt it to the package you used for your Java class. 16 | static constexpr auto kJavaDescriptor = 17 | "Lcom/blinked/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;"; 18 | 19 | static jni::local_ref initHybrid(jni::alias_ref); 20 | 21 | static void registerNatives(); 22 | 23 | std::shared_ptr getTurboModule( 24 | const std::string &name, 25 | const std::shared_ptr &jsInvoker) override; 26 | std::shared_ptr getTurboModule( 27 | const std::string &name, 28 | const JavaTurboModule::InitParams ¶ms) override; 29 | 30 | /** 31 | * Test-only method. Allows user to verify whether a TurboModule can be 32 | * created by instances of this class. 33 | */ 34 | bool canCreateTurboModule(const std::string &name); 35 | }; 36 | 37 | } // namespace react 38 | } // namespace facebook 39 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainComponentsRegistry.cpp: -------------------------------------------------------------------------------- 1 | #include "MainComponentsRegistry.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace facebook { 10 | namespace react { 11 | 12 | MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {} 13 | 14 | std::shared_ptr 15 | MainComponentsRegistry::sharedProviderRegistry() { 16 | auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry(); 17 | 18 | // Autolinked providers registered by RN CLI 19 | rncli_registerProviders(providerRegistry); 20 | 21 | // Custom Fabric Components go here. You can register custom 22 | // components coming from your App or from 3rd party libraries here. 23 | // 24 | // providerRegistry->add(concreteComponentDescriptorProvider< 25 | // AocViewerComponentDescriptor>()); 26 | return providerRegistry; 27 | } 28 | 29 | jni::local_ref 30 | MainComponentsRegistry::initHybrid( 31 | jni::alias_ref, 32 | ComponentFactory *delegate) { 33 | auto instance = makeCxxInstance(delegate); 34 | 35 | auto buildRegistryFunction = 36 | [](EventDispatcher::Weak const &eventDispatcher, 37 | ContextContainer::Shared const &contextContainer) 38 | -> ComponentDescriptorRegistry::Shared { 39 | auto registry = MainComponentsRegistry::sharedProviderRegistry() 40 | ->createComponentDescriptorRegistry( 41 | {eventDispatcher, contextContainer}); 42 | 43 | auto mutableRegistry = 44 | std::const_pointer_cast(registry); 45 | 46 | mutableRegistry->setFallbackComponentDescriptor( 47 | std::make_shared( 48 | ComponentDescriptorParameters{ 49 | eventDispatcher, contextContainer, nullptr})); 50 | 51 | return registry; 52 | }; 53 | 54 | delegate->buildRegistryFunction = buildRegistryFunction; 55 | return instance; 56 | } 57 | 58 | void MainComponentsRegistry::registerNatives() { 59 | registerHybrid({ 60 | makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid), 61 | }); 62 | } 63 | 64 | } // namespace react 65 | } // namespace facebook 66 | -------------------------------------------------------------------------------- /android/app/src/main/jni/MainComponentsRegistry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace facebook { 9 | namespace react { 10 | 11 | class MainComponentsRegistry 12 | : public facebook::jni::HybridClass { 13 | public: 14 | // Adapt it to the package you used for your Java class. 15 | constexpr static auto kJavaDescriptor = 16 | "Lcom/blinked/newarchitecture/components/MainComponentsRegistry;"; 17 | 18 | static void registerNatives(); 19 | 20 | MainComponentsRegistry(ComponentFactory *delegate); 21 | 22 | private: 23 | static std::shared_ptr 24 | sharedProviderRegistry(); 25 | 26 | static jni::local_ref initHybrid( 27 | jni::alias_ref, 28 | ComponentFactory *delegate); 29 | }; 30 | 31 | } // namespace react 32 | } // namespace facebook 33 | -------------------------------------------------------------------------------- /android/app/src/main/jni/OnLoad.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "MainApplicationTurboModuleManagerDelegate.h" 3 | #include "MainComponentsRegistry.h" 4 | 5 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { 6 | return facebook::jni::initialize(vm, [] { 7 | facebook::react::MainApplicationTurboModuleManagerDelegate:: 8 | registerNatives(); 9 | facebook::react::MainComponentsRegistry::registerNatives(); 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | bLinked 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /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 = "31.0.0" 6 | minSdkVersion = 21 7 | compileSdkVersion = 31 8 | targetSdkVersion = 31 9 | 10 | if (System.properties['os.arch'] == "aarch64") { 11 | // For M1 Users we need to use the NDK 24 which added support for aarch64 12 | ndkVersion = "24.0.8215888" 13 | } else { 14 | // Otherwise we default to the side-by-side NDK version from AGP. 15 | ndkVersion = "21.4.7075529" 16 | } 17 | } 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | dependencies { 23 | classpath("com.android.tools.build:gradle:7.2.1") 24 | classpath("com.facebook.react:react-native-gradle-plugin") 25 | classpath("de.undercouch:gradle-download-task:5.0.1") 26 | // NOTE: Do not place your application dependencies here; they belong 27 | // in the individual module build.gradle files 28 | } 29 | } 30 | 31 | allprojects { 32 | repositories { 33 | maven { 34 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 35 | url("$rootDir/../node_modules/react-native/android") 36 | } 37 | maven { 38 | // Android JSC is installed from npm 39 | url("$rootDir/../node_modules/jsc-android/dist") 40 | } 41 | mavenCentral { 42 | // We don't want to fetch react-native from Maven Central as there are 43 | // older versions over there. 44 | content { 45 | excludeGroup "com.facebook.react" 46 | } 47 | } 48 | google() 49 | maven { url 'https://www.jitpack.io' } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /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: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 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 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.125.0 29 | 30 | # Use this property to specify which architecture you want to build. 31 | # You can also override it from the CLI using 32 | # ./gradlew -PreactNativeArchitectures=x86_64 33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 34 | 35 | # Use this property to enable support to the new architecture. 36 | # This will allow you to use TurboModules and the Fabric render in 37 | # your application. You should enable this flag either if you want 38 | # to write custom TurboModules/Fabric components OR use libraries that 39 | # are providing them. 40 | newArchEnabled=false 41 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'bLinked' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | 6 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { 7 | include(":ReactAndroid") 8 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') 9 | include(":ReactAndroid:hermes-engine") 10 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') 11 | } 12 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bLinked", 3 | "displayName": "bLinked" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /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 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '12.4' 5 | install! 'cocoapods', :deterministic_uuids => false 6 | 7 | target 'bLinked' do 8 | config = use_native_modules! 9 | 10 | # Flags change depending on the env values. 11 | flags = get_default_flags() 12 | 13 | use_react_native!( 14 | :path => config[:reactNativePath], 15 | # Hermes is now enabled by default. Disable by setting this flag to false. 16 | # Upcoming versions of React Native may rely on get_default_flags(), but 17 | # we make it explicit here to aid in the React Native upgrade process. 18 | :hermes_enabled => true, 19 | :fabric_enabled => flags[:fabric_enabled], 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | :flipper_configuration => FlipperConfiguration.enabled, 25 | # An absolute path to your application root. 26 | :app_path => "#{Pod::Config.instance.installation_root}/.." 27 | ) 28 | 29 | target 'bLinkedTests' do 30 | inherit! :complete 31 | # Pods for testing 32 | end 33 | 34 | post_install do |installer| 35 | react_native_post_install( 36 | installer, 37 | # Set `mac_catalyst_enabled` to `true` in order to apply patches 38 | # necessary for Mac Catalyst builds 39 | :mac_catalyst_enabled => false 40 | ) 41 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /ios/bLinked.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* bLinkedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* bLinkedTests.m */; }; 11 | 0C80B921A6F3F58F76C31292 /* libPods-bLinked.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-bLinked.a */; }; 12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 7699B88040F8A987B510C191 /* libPods-bLinked-bLinkedTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-bLinked-bLinkedTests.a */; }; 16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 25 | remoteInfo = bLinked; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 00E356EE1AD99517003FC87E /* bLinkedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = bLinkedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 00E356F21AD99517003FC87E /* bLinkedTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = bLinkedTests.m; sourceTree = ""; }; 33 | 13B07F961A680F5B00A75B9A /* bLinked.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bLinked.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = bLinked/AppDelegate.h; sourceTree = ""; }; 35 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = bLinked/AppDelegate.mm; sourceTree = ""; }; 36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = bLinked/Images.xcassets; sourceTree = ""; }; 37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = bLinked/Info.plist; sourceTree = ""; }; 38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = bLinked/main.m; sourceTree = ""; }; 39 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-bLinked-bLinkedTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-bLinked-bLinkedTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 3B4392A12AC88292D35C810B /* Pods-bLinked.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bLinked.debug.xcconfig"; path = "Target Support Files/Pods-bLinked/Pods-bLinked.debug.xcconfig"; sourceTree = ""; }; 41 | 5709B34CF0A7D63546082F79 /* Pods-bLinked.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bLinked.release.xcconfig"; path = "Target Support Files/Pods-bLinked/Pods-bLinked.release.xcconfig"; sourceTree = ""; }; 42 | 5B7EB9410499542E8C5724F5 /* Pods-bLinked-bLinkedTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bLinked-bLinkedTests.debug.xcconfig"; path = "Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests.debug.xcconfig"; sourceTree = ""; }; 43 | 5DCACB8F33CDC322A6C60F78 /* libPods-bLinked.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-bLinked.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = bLinked/LaunchScreen.storyboard; sourceTree = ""; }; 45 | 89C6BE57DB24E9ADA2F236DE /* Pods-bLinked-bLinkedTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bLinked-bLinkedTests.release.xcconfig"; path = "Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests.release.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 7699B88040F8A987B510C191 /* libPods-bLinked-bLinkedTests.a in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 0C80B921A6F3F58F76C31292 /* libPods-bLinked.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 00E356EF1AD99517003FC87E /* bLinkedTests */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 00E356F21AD99517003FC87E /* bLinkedTests.m */, 73 | 00E356F01AD99517003FC87E /* Supporting Files */, 74 | ); 75 | path = bLinkedTests; 76 | sourceTree = ""; 77 | }; 78 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 00E356F11AD99517003FC87E /* Info.plist */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | 13B07FAE1A68108700A75B9A /* bLinked */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 90 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 91 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 92 | 13B07FB61A68108700A75B9A /* Info.plist */, 93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 94 | 13B07FB71A68108700A75B9A /* main.m */, 95 | ); 96 | name = bLinked; 97 | sourceTree = ""; 98 | }; 99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 103 | 5DCACB8F33CDC322A6C60F78 /* libPods-bLinked.a */, 104 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-bLinked-bLinkedTests.a */, 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | ); 113 | name = Libraries; 114 | sourceTree = ""; 115 | }; 116 | 83CBB9F61A601CBA00E9B192 = { 117 | isa = PBXGroup; 118 | children = ( 119 | 13B07FAE1A68108700A75B9A /* bLinked */, 120 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 121 | 00E356EF1AD99517003FC87E /* bLinkedTests */, 122 | 83CBBA001A601CBA00E9B192 /* Products */, 123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 124 | BBD78D7AC51CEA395F1C20DB /* Pods */, 125 | ); 126 | indentWidth = 2; 127 | sourceTree = ""; 128 | tabWidth = 2; 129 | usesTabs = 0; 130 | }; 131 | 83CBBA001A601CBA00E9B192 /* Products */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 13B07F961A680F5B00A75B9A /* bLinked.app */, 135 | 00E356EE1AD99517003FC87E /* bLinkedTests.xctest */, 136 | ); 137 | name = Products; 138 | sourceTree = ""; 139 | }; 140 | BBD78D7AC51CEA395F1C20DB /* Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 3B4392A12AC88292D35C810B /* Pods-bLinked.debug.xcconfig */, 144 | 5709B34CF0A7D63546082F79 /* Pods-bLinked.release.xcconfig */, 145 | 5B7EB9410499542E8C5724F5 /* Pods-bLinked-bLinkedTests.debug.xcconfig */, 146 | 89C6BE57DB24E9ADA2F236DE /* Pods-bLinked-bLinkedTests.release.xcconfig */, 147 | ); 148 | path = Pods; 149 | sourceTree = ""; 150 | }; 151 | /* End PBXGroup section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 00E356ED1AD99517003FC87E /* bLinkedTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "bLinkedTests" */; 157 | buildPhases = ( 158 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, 159 | 00E356EA1AD99517003FC87E /* Sources */, 160 | 00E356EB1AD99517003FC87E /* Frameworks */, 161 | 00E356EC1AD99517003FC87E /* Resources */, 162 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, 163 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 169 | ); 170 | name = bLinkedTests; 171 | productName = bLinkedTests; 172 | productReference = 00E356EE1AD99517003FC87E /* bLinkedTests.xctest */; 173 | productType = "com.apple.product-type.bundle.unit-test"; 174 | }; 175 | 13B07F861A680F5B00A75B9A /* bLinked */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "bLinked" */; 178 | buildPhases = ( 179 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, 180 | FD10A7F022414F080027D42C /* Start Packager */, 181 | 13B07F871A680F5B00A75B9A /* Sources */, 182 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 183 | 13B07F8E1A680F5B00A75B9A /* Resources */, 184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 185 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, 186 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = bLinked; 193 | productName = bLinked; 194 | productReference = 13B07F961A680F5B00A75B9A /* bLinked.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastUpgradeCheck = 1210; 204 | TargetAttributes = { 205 | 00E356ED1AD99517003FC87E = { 206 | CreatedOnToolsVersion = 6.2; 207 | TestTargetID = 13B07F861A680F5B00A75B9A; 208 | }; 209 | 13B07F861A680F5B00A75B9A = { 210 | LastSwiftMigration = 1120; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "bLinked" */; 215 | compatibilityVersion = "Xcode 12.0"; 216 | developmentRegion = en; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 83CBB9F61A601CBA00E9B192; 223 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 13B07F861A680F5B00A75B9A /* bLinked */, 228 | 00E356ED1AD99517003FC87E /* bLinkedTests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 00E356EC1AD99517003FC87E /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 246 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXResourcesBuildPhase section */ 251 | 252 | /* Begin PBXShellScriptBuildPhase section */ 253 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | "$(SRCROOT)/.xcode.env.local", 260 | "$(SRCROOT)/.xcode.env", 261 | ); 262 | name = "Bundle React Native code and images"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; 268 | }; 269 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputFileListPaths = ( 275 | "${PODS_ROOT}/Target Support Files/Pods-bLinked/Pods-bLinked-frameworks-${CONFIGURATION}-input-files.xcfilelist", 276 | ); 277 | name = "[CP] Embed Pods Frameworks"; 278 | outputFileListPaths = ( 279 | "${PODS_ROOT}/Target Support Files/Pods-bLinked/Pods-bLinked-frameworks-${CONFIGURATION}-output-files.xcfilelist", 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | shellPath = /bin/sh; 283 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bLinked/Pods-bLinked-frameworks.sh\"\n"; 284 | showEnvVarsInLog = 0; 285 | }; 286 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { 287 | isa = PBXShellScriptBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ); 291 | inputFileListPaths = ( 292 | ); 293 | inputPaths = ( 294 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 295 | "${PODS_ROOT}/Manifest.lock", 296 | ); 297 | name = "[CP] Check Pods Manifest.lock"; 298 | outputFileListPaths = ( 299 | ); 300 | outputPaths = ( 301 | "$(DERIVED_FILE_DIR)/Pods-bLinked-bLinkedTests-checkManifestLockResult.txt", 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | shellPath = /bin/sh; 305 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 306 | showEnvVarsInLog = 0; 307 | }; 308 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { 309 | isa = PBXShellScriptBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | inputFileListPaths = ( 314 | ); 315 | inputPaths = ( 316 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 317 | "${PODS_ROOT}/Manifest.lock", 318 | ); 319 | name = "[CP] Check Pods Manifest.lock"; 320 | outputFileListPaths = ( 321 | ); 322 | outputPaths = ( 323 | "$(DERIVED_FILE_DIR)/Pods-bLinked-checkManifestLockResult.txt", 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | shellPath = /bin/sh; 327 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 328 | showEnvVarsInLog = 0; 329 | }; 330 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { 331 | isa = PBXShellScriptBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | inputFileListPaths = ( 336 | "${PODS_ROOT}/Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 337 | ); 338 | name = "[CP] Embed Pods Frameworks"; 339 | outputFileListPaths = ( 340 | "${PODS_ROOT}/Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | shellPath = /bin/sh; 344 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests-frameworks.sh\"\n"; 345 | showEnvVarsInLog = 0; 346 | }; 347 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { 348 | isa = PBXShellScriptBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | inputFileListPaths = ( 353 | "${PODS_ROOT}/Target Support Files/Pods-bLinked/Pods-bLinked-resources-${CONFIGURATION}-input-files.xcfilelist", 354 | ); 355 | name = "[CP] Copy Pods Resources"; 356 | outputFileListPaths = ( 357 | "${PODS_ROOT}/Target Support Files/Pods-bLinked/Pods-bLinked-resources-${CONFIGURATION}-output-files.xcfilelist", 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | shellPath = /bin/sh; 361 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bLinked/Pods-bLinked-resources.sh\"\n"; 362 | showEnvVarsInLog = 0; 363 | }; 364 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { 365 | isa = PBXShellScriptBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | ); 369 | inputFileListPaths = ( 370 | "${PODS_ROOT}/Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests-resources-${CONFIGURATION}-input-files.xcfilelist", 371 | ); 372 | name = "[CP] Copy Pods Resources"; 373 | outputFileListPaths = ( 374 | "${PODS_ROOT}/Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests-resources-${CONFIGURATION}-output-files.xcfilelist", 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | shellPath = /bin/sh; 378 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bLinked-bLinkedTests/Pods-bLinked-bLinkedTests-resources.sh\"\n"; 379 | showEnvVarsInLog = 0; 380 | }; 381 | FD10A7F022414F080027D42C /* Start Packager */ = { 382 | isa = PBXShellScriptBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | ); 386 | inputFileListPaths = ( 387 | ); 388 | inputPaths = ( 389 | ); 390 | name = "Start Packager"; 391 | outputFileListPaths = ( 392 | ); 393 | outputPaths = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | shellPath = /bin/sh; 397 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 398 | showEnvVarsInLog = 0; 399 | }; 400 | /* End PBXShellScriptBuildPhase section */ 401 | 402 | /* Begin PBXSourcesBuildPhase section */ 403 | 00E356EA1AD99517003FC87E /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 00E356F31AD99517003FC87E /* bLinkedTests.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | 13B07F871A680F5B00A75B9A /* Sources */ = { 412 | isa = PBXSourcesBuildPhase; 413 | buildActionMask = 2147483647; 414 | files = ( 415 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 416 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXSourcesBuildPhase section */ 421 | 422 | /* Begin PBXTargetDependency section */ 423 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 424 | isa = PBXTargetDependency; 425 | target = 13B07F861A680F5B00A75B9A /* bLinked */; 426 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 427 | }; 428 | /* End PBXTargetDependency section */ 429 | 430 | /* Begin XCBuildConfiguration section */ 431 | 00E356F61AD99517003FC87E /* Debug */ = { 432 | isa = XCBuildConfiguration; 433 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-bLinked-bLinkedTests.debug.xcconfig */; 434 | buildSettings = { 435 | BUNDLE_LOADER = "$(TEST_HOST)"; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | INFOPLIST_FILE = bLinkedTests/Info.plist; 441 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 442 | LD_RUNPATH_SEARCH_PATHS = ( 443 | "$(inherited)", 444 | "@executable_path/Frameworks", 445 | "@loader_path/Frameworks", 446 | ); 447 | OTHER_LDFLAGS = ( 448 | "-ObjC", 449 | "-lc++", 450 | "$(inherited)", 451 | ); 452 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bLinked.app/bLinked"; 455 | }; 456 | name = Debug; 457 | }; 458 | 00E356F71AD99517003FC87E /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-bLinked-bLinkedTests.release.xcconfig */; 461 | buildSettings = { 462 | BUNDLE_LOADER = "$(TEST_HOST)"; 463 | COPY_PHASE_STRIP = NO; 464 | INFOPLIST_FILE = bLinkedTests/Info.plist; 465 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 466 | LD_RUNPATH_SEARCH_PATHS = ( 467 | "$(inherited)", 468 | "@executable_path/Frameworks", 469 | "@loader_path/Frameworks", 470 | ); 471 | OTHER_LDFLAGS = ( 472 | "-ObjC", 473 | "-lc++", 474 | "$(inherited)", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bLinked.app/bLinked"; 479 | }; 480 | name = Release; 481 | }; 482 | 13B07F941A680F5B00A75B9A /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-bLinked.debug.xcconfig */; 485 | buildSettings = { 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | CLANG_ENABLE_MODULES = YES; 488 | CURRENT_PROJECT_VERSION = 1; 489 | ENABLE_BITCODE = NO; 490 | INFOPLIST_FILE = bLinked/Info.plist; 491 | LD_RUNPATH_SEARCH_PATHS = ( 492 | "$(inherited)", 493 | "@executable_path/Frameworks", 494 | ); 495 | OTHER_LDFLAGS = ( 496 | "$(inherited)", 497 | "-ObjC", 498 | "-lc++", 499 | ); 500 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 501 | PRODUCT_NAME = bLinked; 502 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 503 | SWIFT_VERSION = 5.0; 504 | VERSIONING_SYSTEM = "apple-generic"; 505 | }; 506 | name = Debug; 507 | }; 508 | 13B07F951A680F5B00A75B9A /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-bLinked.release.xcconfig */; 511 | buildSettings = { 512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 513 | CLANG_ENABLE_MODULES = YES; 514 | CURRENT_PROJECT_VERSION = 1; 515 | INFOPLIST_FILE = bLinked/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "@executable_path/Frameworks", 519 | ); 520 | OTHER_LDFLAGS = ( 521 | "$(inherited)", 522 | "-ObjC", 523 | "-lc++", 524 | ); 525 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 526 | PRODUCT_NAME = bLinked; 527 | SWIFT_VERSION = 5.0; 528 | VERSIONING_SYSTEM = "apple-generic"; 529 | }; 530 | name = Release; 531 | }; 532 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 533 | isa = XCBuildConfiguration; 534 | buildSettings = { 535 | ALWAYS_SEARCH_USER_PATHS = NO; 536 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 537 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 538 | CLANG_CXX_LIBRARY = "libc++"; 539 | CLANG_ENABLE_MODULES = YES; 540 | CLANG_ENABLE_OBJC_ARC = YES; 541 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 542 | CLANG_WARN_BOOL_CONVERSION = YES; 543 | CLANG_WARN_COMMA = YES; 544 | CLANG_WARN_CONSTANT_CONVERSION = YES; 545 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 546 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 547 | CLANG_WARN_EMPTY_BODY = YES; 548 | CLANG_WARN_ENUM_CONVERSION = YES; 549 | CLANG_WARN_INFINITE_RECURSION = YES; 550 | CLANG_WARN_INT_CONVERSION = YES; 551 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 552 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 553 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 554 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 555 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 556 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 557 | CLANG_WARN_STRICT_PROTOTYPES = YES; 558 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 559 | CLANG_WARN_UNREACHABLE_CODE = YES; 560 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 561 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 562 | COPY_PHASE_STRIP = NO; 563 | ENABLE_STRICT_OBJC_MSGSEND = YES; 564 | ENABLE_TESTABILITY = YES; 565 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; 566 | GCC_C_LANGUAGE_STANDARD = gnu99; 567 | GCC_DYNAMIC_NO_PIC = NO; 568 | GCC_NO_COMMON_BLOCKS = YES; 569 | GCC_OPTIMIZATION_LEVEL = 0; 570 | GCC_PREPROCESSOR_DEFINITIONS = ( 571 | "DEBUG=1", 572 | "$(inherited)", 573 | ); 574 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 575 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 576 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 577 | GCC_WARN_UNDECLARED_SELECTOR = YES; 578 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 579 | GCC_WARN_UNUSED_FUNCTION = YES; 580 | GCC_WARN_UNUSED_VARIABLE = YES; 581 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 582 | LD_RUNPATH_SEARCH_PATHS = ( 583 | /usr/lib/swift, 584 | "$(inherited)", 585 | ); 586 | LIBRARY_SEARCH_PATHS = ( 587 | "\"$(SDKROOT)/usr/lib/swift\"", 588 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 589 | "\"$(inherited)\"", 590 | ); 591 | MTL_ENABLE_DEBUG_INFO = YES; 592 | ONLY_ACTIVE_ARCH = YES; 593 | OTHER_CPLUSPLUSFLAGS = ( 594 | "$(OTHER_CFLAGS)", 595 | "-DFOLLY_NO_CONFIG", 596 | "-DFOLLY_MOBILE=1", 597 | "-DFOLLY_USE_LIBCPP=1", 598 | ); 599 | SDKROOT = iphoneos; 600 | }; 601 | name = Debug; 602 | }; 603 | 83CBBA211A601CBA00E9B192 /* Release */ = { 604 | isa = XCBuildConfiguration; 605 | buildSettings = { 606 | ALWAYS_SEARCH_USER_PATHS = NO; 607 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 608 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 609 | CLANG_CXX_LIBRARY = "libc++"; 610 | CLANG_ENABLE_MODULES = YES; 611 | CLANG_ENABLE_OBJC_ARC = YES; 612 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 613 | CLANG_WARN_BOOL_CONVERSION = YES; 614 | CLANG_WARN_COMMA = YES; 615 | CLANG_WARN_CONSTANT_CONVERSION = YES; 616 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 617 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 618 | CLANG_WARN_EMPTY_BODY = YES; 619 | CLANG_WARN_ENUM_CONVERSION = YES; 620 | CLANG_WARN_INFINITE_RECURSION = YES; 621 | CLANG_WARN_INT_CONVERSION = YES; 622 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 623 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 624 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 625 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 626 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 627 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 628 | CLANG_WARN_STRICT_PROTOTYPES = YES; 629 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 630 | CLANG_WARN_UNREACHABLE_CODE = YES; 631 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 632 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 633 | COPY_PHASE_STRIP = YES; 634 | ENABLE_NS_ASSERTIONS = NO; 635 | ENABLE_STRICT_OBJC_MSGSEND = YES; 636 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; 637 | GCC_C_LANGUAGE_STANDARD = gnu99; 638 | GCC_NO_COMMON_BLOCKS = YES; 639 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 640 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 641 | GCC_WARN_UNDECLARED_SELECTOR = YES; 642 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 643 | GCC_WARN_UNUSED_FUNCTION = YES; 644 | GCC_WARN_UNUSED_VARIABLE = YES; 645 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 646 | LD_RUNPATH_SEARCH_PATHS = ( 647 | /usr/lib/swift, 648 | "$(inherited)", 649 | ); 650 | LIBRARY_SEARCH_PATHS = ( 651 | "\"$(SDKROOT)/usr/lib/swift\"", 652 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 653 | "\"$(inherited)\"", 654 | ); 655 | MTL_ENABLE_DEBUG_INFO = NO; 656 | OTHER_CPLUSPLUSFLAGS = ( 657 | "$(OTHER_CFLAGS)", 658 | "-DFOLLY_NO_CONFIG", 659 | "-DFOLLY_MOBILE=1", 660 | "-DFOLLY_USE_LIBCPP=1", 661 | ); 662 | SDKROOT = iphoneos; 663 | VALIDATE_PRODUCT = YES; 664 | }; 665 | name = Release; 666 | }; 667 | /* End XCBuildConfiguration section */ 668 | 669 | /* Begin XCConfigurationList section */ 670 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "bLinkedTests" */ = { 671 | isa = XCConfigurationList; 672 | buildConfigurations = ( 673 | 00E356F61AD99517003FC87E /* Debug */, 674 | 00E356F71AD99517003FC87E /* Release */, 675 | ); 676 | defaultConfigurationIsVisible = 0; 677 | defaultConfigurationName = Release; 678 | }; 679 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "bLinked" */ = { 680 | isa = XCConfigurationList; 681 | buildConfigurations = ( 682 | 13B07F941A680F5B00A75B9A /* Debug */, 683 | 13B07F951A680F5B00A75B9A /* Release */, 684 | ); 685 | defaultConfigurationIsVisible = 0; 686 | defaultConfigurationName = Release; 687 | }; 688 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "bLinked" */ = { 689 | isa = XCConfigurationList; 690 | buildConfigurations = ( 691 | 83CBBA201A601CBA00E9B192 /* Debug */, 692 | 83CBBA211A601CBA00E9B192 /* Release */, 693 | ); 694 | defaultConfigurationIsVisible = 0; 695 | defaultConfigurationName = Release; 696 | }; 697 | /* End XCConfigurationList section */ 698 | }; 699 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 700 | } 701 | -------------------------------------------------------------------------------- /ios/bLinked.xcodeproj/xcshareddata/xcschemes/bLinked.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/bLinked/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/bLinked/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import 3 | #import 4 | #import 5 | 6 | #import 7 | 8 | #if RCT_NEW_ARCH_ENABLED 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | 16 | #import 17 | 18 | static NSString *const kRNConcurrentRoot = @"concurrentRoot"; 19 | 20 | @interface AppDelegate () { 21 | RCTTurboModuleManager *_turboModuleManager; 22 | RCTSurfacePresenterBridgeAdapter *_bridgeAdapter; 23 | std::shared_ptr _reactNativeConfig; 24 | facebook::react::ContextContainer::Shared _contextContainer; 25 | } 26 | @end 27 | #endif 28 | 29 | @implementation AppDelegate 30 | 31 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 32 | { 33 | RCTAppSetupPrepareApp(application); 34 | 35 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 36 | 37 | #if RCT_NEW_ARCH_ENABLED 38 | _contextContainer = std::make_shared(); 39 | _reactNativeConfig = std::make_shared(); 40 | _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); 41 | _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer]; 42 | bridge.surfacePresenter = _bridgeAdapter.surfacePresenter; 43 | #endif 44 | 45 | NSDictionary *initProps = [self prepareInitialProps]; 46 | UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"bLinked", initProps); 47 | 48 | if (@available(iOS 13.0, *)) { 49 | rootView.backgroundColor = [UIColor systemBackgroundColor]; 50 | } else { 51 | rootView.backgroundColor = [UIColor whiteColor]; 52 | } 53 | 54 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 55 | UIViewController *rootViewController = [UIViewController new]; 56 | rootViewController.view = rootView; 57 | self.window.rootViewController = rootViewController; 58 | [self.window makeKeyAndVisible]; 59 | return YES; 60 | } 61 | 62 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 63 | /// 64 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 65 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 66 | /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`. 67 | - (BOOL)concurrentRootEnabled 68 | { 69 | // Switch this bool to turn on and off the concurrent root 70 | return true; 71 | } 72 | 73 | - (NSDictionary *)prepareInitialProps 74 | { 75 | NSMutableDictionary *initProps = [NSMutableDictionary new]; 76 | 77 | #ifdef RCT_NEW_ARCH_ENABLED 78 | initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]); 79 | #endif 80 | 81 | return initProps; 82 | } 83 | 84 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 85 | { 86 | #if DEBUG 87 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 88 | #else 89 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 90 | #endif 91 | } 92 | 93 | #if RCT_NEW_ARCH_ENABLED 94 | 95 | #pragma mark - RCTCxxBridgeDelegate 96 | 97 | - (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge 98 | { 99 | _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge 100 | delegate:self 101 | jsInvoker:bridge.jsCallInvoker]; 102 | return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager); 103 | } 104 | 105 | #pragma mark RCTTurboModuleManagerDelegate 106 | 107 | - (Class)getModuleClassFromName:(const char *)name 108 | { 109 | return RCTCoreModulesClassProvider(name); 110 | } 111 | 112 | - (std::shared_ptr)getTurboModule:(const std::string &)name 113 | jsInvoker:(std::shared_ptr)jsInvoker 114 | { 115 | return nullptr; 116 | } 117 | 118 | - (std::shared_ptr)getTurboModule:(const std::string &)name 119 | initParams: 120 | (const facebook::react::ObjCTurboModule::InitParams &)params 121 | { 122 | return nullptr; 123 | } 124 | 125 | - (id)getModuleInstanceFromClass:(Class)moduleClass 126 | { 127 | return RCTAppSetupDefaultModuleFromClass(moduleClass); 128 | } 129 | 130 | #endif 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /ios/bLinked/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ios/bLinked/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/bLinked/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | bLinked 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UIAppFonts 41 | 42 | MaterialCommunityIcons.ttf 43 | Ionicons.ttf 44 | Feather.ttf 45 | Octicons.ttf 46 | 47 | UILaunchStoryboardName 48 | LaunchScreen 49 | UIRequiredDeviceCapabilities 50 | 51 | armv7 52 | 53 | UISupportedInterfaceOrientations 54 | 55 | UIInterfaceOrientationPortrait 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | UIViewControllerBasedStatusBarAppearance 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /ios/bLinked/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/bLinked/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ios/bLinkedTests/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 | -------------------------------------------------------------------------------- /ios/bLinkedTests/bLinkedTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface bLinkedTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation bLinkedTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /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: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bLinked", 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 | "@react-native-async-storage/async-storage": "^1.17.10", 14 | "@react-navigation/bottom-tabs": "^6.4.0", 15 | "@react-navigation/native": "^6.0.13", 16 | "@react-navigation/native-stack": "^6.9.1", 17 | "@reduxjs/toolkit": "^1.8.6", 18 | "apisauce": "^2.1.6", 19 | "formik": "^2.2.9", 20 | "qs": "^6.11.0", 21 | "react": "18.1.0", 22 | "react-native": "0.70.6", 23 | "react-native-config": "^1.4.11", 24 | "react-native-flash-message": "^0.3.1", 25 | "react-native-image-picker": "^4.10.0", 26 | "react-native-keyboard-aware-scroll-view": "^0.9.5", 27 | "react-native-maps": "^1.3.2", 28 | "react-native-radio-buttons-group": "^2.2.11", 29 | "react-native-safe-area-context": "^4.4.1", 30 | "react-native-screens": "^3.18.2", 31 | "react-native-svg": "^13.4.0", 32 | "react-native-vector-icons": "^9.2.0", 33 | "react-redux": "^8.0.4", 34 | "redux-persist": "^6.0.0", 35 | "yup": "^0.32.11" 36 | }, 37 | "devDependencies": { 38 | "@babel/core": "^7.12.9", 39 | "@babel/runtime": "^7.12.5", 40 | "@react-native-community/eslint-config": "^2.0.0", 41 | "babel-jest": "^26.6.3", 42 | "eslint": "^7.32.0", 43 | "jest": "^26.6.3", 44 | "metro-react-native-babel-preset": "0.72.3", 45 | "react-test-renderer": "18.1.0" 46 | }, 47 | "jest": { 48 | "preset": "react-native" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/assets/images/Logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/src/assets/images/Logo-1.png -------------------------------------------------------------------------------- /src/assets/images/Logo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/src/assets/images/Logo-2.png -------------------------------------------------------------------------------- /src/assets/images/Mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/src/assets/images/Mark.png -------------------------------------------------------------------------------- /src/assets/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/src/assets/images/avatar.png -------------------------------------------------------------------------------- /src/assets/images/deliver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mooner115/blinked-mobile-react-native-js/a72e48d6adcf20632144d6a46bfbda6fe286dd3b/src/assets/images/deliver.png -------------------------------------------------------------------------------- /src/context/customPersistReducer.js: -------------------------------------------------------------------------------- 1 | import {persistReducer} from 'redux-persist'; 2 | import {persistConfig} from './persistConfig'; 3 | import {combineReducers} from '@reduxjs/toolkit'; 4 | import userSlice from './userSlice'; 5 | 6 | const reducer = combineReducers({ 7 | user: userSlice, 8 | }); 9 | 10 | export const customPersistReducer = persistReducer(persistConfig, reducer); 11 | -------------------------------------------------------------------------------- /src/context/initalStates.js: -------------------------------------------------------------------------------- 1 | export const initialStates = { 2 | isLogin: false, 3 | }; 4 | -------------------------------------------------------------------------------- /src/context/persistConfig.js: -------------------------------------------------------------------------------- 1 | import AsyncStorage from '@react-native-async-storage/async-storage'; 2 | 3 | export const persistConfig = { 4 | key: 'root', 5 | storage: AsyncStorage, 6 | }; 7 | -------------------------------------------------------------------------------- /src/context/store.js: -------------------------------------------------------------------------------- 1 | import {configureStore} from '@reduxjs/toolkit'; 2 | import {customPersistReducer} from './customPersistReducer'; 3 | 4 | export const store = configureStore({ 5 | reducer: customPersistReducer, 6 | middleware: getDefaultMiddleware => 7 | getDefaultMiddleware({ 8 | serializableCheck: false, 9 | }), 10 | }); 11 | -------------------------------------------------------------------------------- /src/context/userSlice.js: -------------------------------------------------------------------------------- 1 | import {createSlice} from '@reduxjs/toolkit'; 2 | import {initialStates} from './initalStates'; 3 | import {showMessage} from 'react-native-flash-message'; 4 | 5 | export const userSlicer = createSlice({ 6 | name: 'userSlice', 7 | initialState: initialStates, 8 | reducers: { 9 | loginAccount: state => { 10 | state.isLogin = true; 11 | }, 12 | logOutAccount: state => { 13 | state.isLogin = false; 14 | }, 15 | }, 16 | }); 17 | 18 | export const {loginAccount, logOutAccount} = 19 | userSlicer.actions; 20 | 21 | export default userSlicer.reducer; 22 | -------------------------------------------------------------------------------- /src/navigation/AppNavigator.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {NavigationContainer} from '@react-navigation/native'; 3 | import {createNativeStackNavigator} from '@react-navigation/native-stack'; 4 | import {useSelector} from 'react-redux'; 5 | import AuthNavigator from './AuthNavigator'; 6 | import HomeNavigator from './HomeNavigator'; 7 | 8 | const Stack = createNativeStackNavigator(); 9 | 10 | const AppNavigator = () => { 11 | const isLogin = useSelector(selector => selector.user.isLogin); 12 | 13 | return ( 14 | 15 | {isLogin ? : } 16 | 17 | ); 18 | }; 19 | 20 | export default AppNavigator; 21 | -------------------------------------------------------------------------------- /src/navigation/AuthNavigator.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {createNativeStackNavigator} from '@react-navigation/native-stack'; 3 | import {routes} from './routes'; 4 | import Main from '../ui/screens/Main'; 5 | import Login from '../ui/screens/Login'; 6 | import LoginMain from '../ui/screens/LoginMain'; 7 | import Register from '../ui/screens/Register'; 8 | import Verify from '../ui/screens/Verify'; 9 | import Password from '../ui/screens/Password'; 10 | import Home from '../ui/screens/Home'; 11 | import HomeNavigator from './HomeNavigator'; 12 | 13 | const Stack = createNativeStackNavigator(); 14 | 15 | const AuthNavigator = () => { 16 | return ( 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {/* */} 29 | 30 | ); 31 | }; 32 | 33 | export default AuthNavigator; 34 | -------------------------------------------------------------------------------- /src/navigation/HomeNavigator.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; 3 | import {routes} from './routes'; 4 | import {colors} from '../themes/Colors'; 5 | import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; 6 | import Ionicons from 'react-native-vector-icons/Ionicons'; 7 | import FeatherIcons from 'react-native-vector-icons/Feather'; 8 | 9 | import Home from '../ui/screens/Home'; 10 | import User from '../ui/screens/User'; 11 | 12 | const Tab = createBottomTabNavigator(); 13 | 14 | const HomeNavigator = () => { 15 | return ( 16 | 23 | ( 28 | 29 | ), 30 | }} 31 | /> 32 | ( 37 | 38 | ), 39 | }} 40 | /> 41 | ( 46 | 47 | ), 48 | }} 49 | /> 50 | ( 55 | 56 | ), 57 | }} 58 | /> 59 | {/* ( 64 | 65 | ), 66 | }} 67 | /> */} 68 | 69 | ); 70 | }; 71 | 72 | export default HomeNavigator; 73 | -------------------------------------------------------------------------------- /src/navigation/routes.js: -------------------------------------------------------------------------------- 1 | export const routes = { 2 | MAIN: 'MainScreen', 3 | LOGINMAIN: 'LoginMainScreen', 4 | LOGIN: 'LoginScreen', 5 | SPLASH: 'SplashScreen', 6 | REGISTER: 'RegisterScreen', 7 | VERIFY: 'VerifyScreen', 8 | PASSWORD: 'PasswordScreen', 9 | HOMETAB: 'HomeTabScreen', 10 | USER: 'UserTabScreen', 11 | HOME: 'HomeScreen', 12 | OPTION: 'OptionScreen', 13 | HISTORY: 'HistoryScreen' 14 | }; 15 | -------------------------------------------------------------------------------- /src/services/firebase/auth.js: -------------------------------------------------------------------------------- 1 | import {useState} from 'react'; 2 | import {useDispatch} from 'react-redux'; 3 | import {loginAccount} from '../../context/userSlice'; 4 | import {showMessage} from 'react-native-flash-message'; 5 | 6 | const authFirebase = () => { 7 | const [loading, setLoading] = useState(false); 8 | 9 | const dispatch = useDispatch(); 10 | 11 | const loginUser = (email, password) => { 12 | setLoading(true); 13 | dispatch(loginAccount()); 14 | showMessage({ 15 | message: 'You have successfully logged into your account', 16 | type: 'success', 17 | }); 18 | setLoading(false); 19 | }; 20 | 21 | const createUser = (email, password, backLogin) => { 22 | }; 23 | 24 | return {loading, createUser, loginUser}; 25 | }; 26 | 27 | export default authFirebase; 28 | -------------------------------------------------------------------------------- /src/themes/Colors.js: -------------------------------------------------------------------------------- 1 | export const colors = { 2 | ORANGE: '#FE724C', 3 | YELLOW: '#FFC529', 4 | WHITE: '#FFFFFF', 5 | DARK: '#1A1D26', 6 | GRAY: '#9A9FAE', 7 | DARRWHITE: '#CCCCCC', 8 | LIGHTGREY: '#E9E9E9', 9 | DARKGRAY: '#9796A1', 10 | BLACK: '#000000', 11 | BLUE: '#1434CB', 12 | GREEN: '#36C07E', 13 | LIGHTORANGE: '#ffa479', 14 | DARKORANGE: '#c54121', 15 | PURPLE: '#3842B0' 16 | }; 17 | -------------------------------------------------------------------------------- /src/themes/Units.js: -------------------------------------------------------------------------------- 1 | import {Dimensions} from 'react-native'; 2 | 3 | export const units = { 4 | width: Dimensions.get('window').width, 5 | height: Dimensions.get('window').height, 6 | }; 7 | -------------------------------------------------------------------------------- /src/ui/components/CustomButton.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet, Text, TouchableOpacity} from 'react-native'; 2 | import React from 'react'; 3 | import {colors} from '../../themes/Colors'; 4 | import {units} from '../../themes/Units'; 5 | 6 | const CustomButton = ({title, onPress, backColor, fontColor}) => { 7 | return ( 8 | 9 | {title} 10 | 11 | ); 12 | }; 13 | 14 | export default CustomButton; 15 | 16 | const styles = StyleSheet.create({ 17 | container: { 18 | backgroundColor: colors.ORANGE, 19 | borderRadius: 32, 20 | justifyContent: 'center', 21 | alignItems: 'center', 22 | paddingVertical: units.height / 51.31, 23 | }, 24 | title: { 25 | fontFamily: 'Noto Sans JP', 26 | color: colors.WHITE, 27 | fontWeight: '500', 28 | fontSize: 16, 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /src/ui/components/CustomInput.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet, TextInput, TouchableOpacity, View} from 'react-native'; 2 | import React, {useState} from 'react'; 3 | import {colors} from '../../themes/Colors'; 4 | import {units} from '../../themes/Units'; 5 | import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; 6 | 7 | const CustomInput = ({value, placeHolder, onChangeText, secure, type}) => { 8 | const [showPassword, setShowPassword] = useState(secure); 9 | 10 | const handleIcon = () => { 11 | setShowPassword(!showPassword); 12 | }; 13 | 14 | return ( 15 | 16 | 25 | {secure && ( 26 | 27 | 33 | 34 | )} 35 | 36 | ); 37 | }; 38 | 39 | export default CustomInput; 40 | 41 | const styles = StyleSheet.create({ 42 | container: { 43 | borderBottomWidth: 2, 44 | borderBottomColor: colors.DARRWHITE, 45 | borderBottomRadius: 10, 46 | shadowColor: colors.LIGHTGREY, 47 | shadowOffset: { 48 | width: 0, 49 | height: 2, 50 | }, 51 | shadowOpacity: 0.25, 52 | shadowRadius: 3.84, 53 | flexDirection: 'row', 54 | alignItems: 'center', 55 | }, 56 | input: { 57 | fontSize: 18, 58 | flex: 1, 59 | fontFamily: 'Museo Sans' 60 | }, 61 | icon: { 62 | marginRight: units.width / 16, 63 | }, 64 | }); 65 | -------------------------------------------------------------------------------- /src/ui/components/CustomNumberInput.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet, TextInput, TouchableOpacity, View} from 'react-native'; 2 | import React, {useState} from 'react'; 3 | import {colors} from '../../themes/Colors'; 4 | import {units} from '../../themes/Units'; 5 | import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; 6 | 7 | const CustomeNumberInput = ({value, placeHolder, onChangeText, secure, type}) => { 8 | const [showPassword, setShowPassword] = useState(secure); 9 | 10 | const handleIcon = () => { 11 | setShowPassword(!showPassword); 12 | }; 13 | 14 | return ( 15 | 16 | 26 | 27 | ); 28 | }; 29 | 30 | export default CustomeNumberInput; 31 | 32 | const styles = StyleSheet.create({ 33 | container: { 34 | width: units.width / 8.33, 35 | marginHorizontal: units.width / 50, 36 | borderBottomWidth: 2, 37 | borderBottomColor: colors.DARRWHITE, 38 | borderBottomRadius: 10, 39 | shadowColor: colors.LIGHTGREY, 40 | shadowOffset: { 41 | width: 0, 42 | height: 2, 43 | }, 44 | shadowOpacity: 0.25, 45 | shadowRadius: 3.84, 46 | flexDirection: 'row', 47 | alignItems: 'center', 48 | }, 49 | input: { 50 | textAlign: 'center', 51 | paddingLeft: units.width / 100, 52 | fontSize: 27, 53 | flex: 1, 54 | fontFamily: 'Museo Sans', 55 | color: '#0F112B', 56 | }, 57 | icon: { 58 | marginRight: units.width / 16, 59 | }, 60 | }); 61 | -------------------------------------------------------------------------------- /src/ui/components/Loading.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {View, StyleSheet, Image} from 'react-native'; 3 | 4 | const Loading = () => { 5 | return ( 6 | 7 | 10 | 11 | ); 12 | }; 13 | 14 | export default Loading; 15 | 16 | const styles = StyleSheet.create({ 17 | overlay: { 18 | position: 'absolute', 19 | height: '100%', 20 | opacity: 0.7, 21 | width: '100%', 22 | zIndex: 1, 23 | justifyContent: 'center', 24 | alignItems: 'center', 25 | backgroundColor: 'white', 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /src/ui/screens/Home.js: -------------------------------------------------------------------------------- 1 | import { 2 | Image, 3 | StyleSheet, 4 | Text, 5 | View, 6 | SafeAreaView, 7 | TouchableOpacity, 8 | FlatList, 9 | ScrollView, 10 | Switch 11 | } from 'react-native'; 12 | import React, {useState} from 'react'; 13 | import {colors} from '../../themes/Colors'; 14 | import {units} from '../../themes/Units'; 15 | import {routes} from '../../navigation/routes'; 16 | import {useDispatch} from 'react-redux'; 17 | import {logOutAccount} from '../../context/userSlice'; 18 | import Loading from '../components/Loading'; 19 | import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; 20 | import Octicons from 'react-native-vector-icons/Octicons'; 21 | import authFirebase from '../../services/firebase/auth'; 22 | 23 | const Home = ({navigation}) => { 24 | const {loading, createUser} = authFirebase(); 25 | const [isEnabled, setIsEnabled] = useState(false); 26 | const dispatch = useDispatch(); 27 | 28 | const toggleSwitch = () => setIsEnabled(previousState => !previousState); 29 | 30 | const onClickLogout = () => { 31 | dispatch(logOutAccount()); 32 | }; 33 | 34 | return ( 35 | 36 | {loading && } 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Hello Jason, 49 | Stay safe on the road! 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | {isEnabled ? "I'm accepting orders" : "I’m currently offline"} 58 | 59 | 66 | 67 | 68 | 69 | 70 | Assigned Orders 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 4 Isolo Ire-Akari Estate, Lagos Nigeria 82 | 83 | 84 | 85 | 4 Isolo Ire-Akari Estate, Lagos Nigeria 86 | 87 | 88 | 89 | 90 | View details 91 | {">"} 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | My Earnings 100 | See all 101 | 102 | 103 | 104 | 105 | Ikeja GRA 106 | $78,000 107 | 108 | To Noona’s Kitchen, Lekki 109 | 110 | 111 | 112 | 113 | Ikeja GRA 114 | $78,000 115 | 116 | To Noona’s Kitchen, Lekki 117 | 118 | 119 | 120 | 121 | Ikeja GRA 122 | $78,000 123 | 124 | To Noona’s Kitchen, Lekki 125 | 126 | 127 | 128 | 129 | Ikeja GRA 130 | $78,000 131 | 132 | To Noona’s Kitchen, Lekki 133 | 134 | 135 | 136 | 137 | Ikeja GRA 138 | $78,000 139 | 140 | To Noona’s Kitchen, Lekki 141 | 142 | 143 | 144 | 145 | 146 | 147 | ); 148 | }; 149 | 150 | export default Home; 151 | 152 | const styles = StyleSheet.create({ 153 | container: { 154 | flex: 1, 155 | backgroundColor: '#F6F7F8', 156 | }, 157 | statusContainer: { 158 | width: units.width, 159 | height: units.height / 18.65 160 | }, 161 | bodyContainer: { 162 | paddingHorizontal: units.width / 51.31, 163 | marginTop: units.height / 63.15, 164 | marginBottom: units.height / 101, 165 | }, 166 | topbar: { 167 | flexDirection: 'row', 168 | justifyContent: 'space-between', 169 | alignItems: 'center', 170 | }, 171 | greetText: { 172 | fontFamily: 'Noto Sans JP', 173 | fontWeight: '700', 174 | fontSize: 16, 175 | color: '#0F112B' 176 | }, 177 | statusText: { 178 | fontFamily: 'Noto Sans JP', 179 | fontSize: 12, 180 | color: '#626A7A' 181 | }, 182 | acceptContainer: { 183 | marginTop: units.height / 30.4, 184 | height: units.height / 20.52, 185 | backgroundColor: '#3842B018', 186 | borderRadius: 32, 187 | paddingHorizontal: units.width / 17.85, 188 | display: 'flex', 189 | flexDirection: 'row', 190 | justifyContent: 'space-between', 191 | alignItems: 'center' 192 | }, 193 | acceptText: { 194 | fontFamily: 'Noto Sans JP', 195 | fontWeight: '500', 196 | fontSize: 12, 197 | }, 198 | assignContainer: { 199 | marginTop: units.height / 30.4, 200 | }, 201 | assignHeader: { 202 | display: 'flex', 203 | flexDirection: 'row', 204 | justifyContent: 'space-between', 205 | alignItems: 'center' 206 | }, 207 | assignTitle: { 208 | fontFamily: 'Noto Sans JP', 209 | fontWeight: '700', 210 | fontSize: 14, 211 | color: '#343841' 212 | }, 213 | assignBody: { 214 | marginTop: units.height / 45.61, 215 | borderRadius: 8, 216 | backgroundColor: colors.WHITE, 217 | borderBottomLeftRadius: 8, 218 | borderBottomRightRadius: 8 219 | }, 220 | assignBodyHeader: { 221 | height: units.height / 25.65, 222 | backgroundColor: '#2F80ED', 223 | borderTopLeftRadius: 8, 224 | borderTopRightRadius: 8 225 | }, 226 | assignBodyMain: { 227 | paddingHorizontal: units.width / 23.43, 228 | paddingTop: units.height / 68.41, 229 | }, 230 | assginDetails: { 231 | height: units.height / 7.89, 232 | borderBottomWidth: 1, 233 | borderBottomColor: '#7A797818' 234 | }, 235 | assignToDetail: { 236 | paddingVertical: units.height / 68.41 237 | }, 238 | detailText: { 239 | fontFamily: 'Noto Sans JP', 240 | fontWeight: '700', 241 | fontSize: 14, 242 | color: colors.PURPLE 243 | }, 244 | earningContainer: { 245 | marginTop: units.height / 27.36 246 | }, 247 | earningHeader: { 248 | display: 'flex', 249 | flexDirection: 'row', 250 | justifyContent: 'space-between', 251 | alignItems: 'center' 252 | }, 253 | earningTitle: { 254 | fontFamily: 'Noto Sans JP', 255 | fontWeight: '700', 256 | fontSize: 14, 257 | color: '#343841' 258 | }, 259 | seeAll: { 260 | fontFamily: 'Noto Sans JP', 261 | fontWeight: '500', 262 | fontSize: 14, 263 | color: colors.PURPLE 264 | }, 265 | earningItem: { 266 | marginTop: units.height / 68.41, 267 | height: units.height / 11.09, 268 | paddingHorizontal: units.width / 23.43, 269 | paddingVertical: units.height / 58.64, 270 | backgroundColor: colors.WHITE, 271 | borderRadius: 8, 272 | }, 273 | earningInfo: { 274 | display: 'flex', 275 | flexDirection: 'row', 276 | justifyContent: 'space-between', 277 | alignItems: 'center' 278 | }, 279 | earningDetailTitle: { 280 | fontFamily: 'Noto Sans JP', 281 | fontWeight: '500', 282 | fontSize: 14, 283 | color: '#0E0842' 284 | }, 285 | earningDetailMoney: { 286 | fontFamily: 'Noto Sans JP', 287 | fontWeight: '700', 288 | fontSize: 14, 289 | color: '#08AD04' 290 | }, 291 | earningDetailText: { 292 | fontFamily: 'Noto Sans JP', 293 | fontSize: 12, 294 | color: '#626A7A', 295 | marginTop: 4 296 | }, 297 | flexRow: { 298 | display: 'flex', 299 | flexDirection: 'row', 300 | justifyContent: 'flex-start', 301 | alignItems: 'center' 302 | } 303 | }); 304 | -------------------------------------------------------------------------------- /src/ui/screens/Login.js: -------------------------------------------------------------------------------- 1 | import { 2 | StyleSheet, 3 | Text, 4 | View, 5 | SafeAreaView, 6 | TouchableOpacity, 7 | Image 8 | } from 'react-native'; 9 | import React from 'react'; 10 | import CustomInput from '../components/CustomInput'; 11 | import {colors} from '../../themes/Colors'; 12 | import {units} from '../../themes/Units'; 13 | import CustomButton from '../components/CustomButton'; 14 | import {Formik} from 'formik'; 15 | import * as Yup from 'yup'; 16 | import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; 17 | import {routes} from '../../navigation/routes'; 18 | import Loading from '../components/Loading'; 19 | import authFirebase from '../../services/firebase/auth'; 20 | 21 | const Login = ({navigation}) => { 22 | const {loading, loginUser} = authFirebase(); 23 | 24 | const initailLoginValue = { 25 | email: '', 26 | password: '', 27 | }; 28 | 29 | const loginValidationSchema = Yup.object().shape({ 30 | password: Yup.string().required('This field is required'), 31 | }); 32 | 33 | const handeleLogin = values => { 34 | loginUser(values.email, values.password); 35 | }; 36 | 37 | const onClickSignUp = () => { 38 | navigation.navigate(routes.REGISTER); 39 | }; 40 | 41 | return ( 42 | 43 | {loading && } 44 | 45 | 46 | 47 | 48 | Help 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Hello Buddy, 57 | Welcome, log in to your account 58 | 59 | 63 | {({values, errors, touched, handleChange, handleSubmit}) => ( 64 | <> 65 | 66 | 72 | {errors.password && touched.password && ( 73 | {errors.password} 74 | )} 75 | 76 | 77 | 78 | Forgot Password ? 79 | 80 | 81 | 82 | 83 | 84 | 85 | Don't have an account yet? Create account 86 | 87 | 88 | 89 | 90 | 91 | 92 | )} 93 | 94 | 95 | 96 | 97 | ); 98 | }; 99 | 100 | export default Login; 101 | 102 | const styles = StyleSheet.create({ 103 | statusContainer: { 104 | width: units.width, 105 | height: units.height / 18.65 106 | }, 107 | helpContainer: { 108 | marginTop: units.height / 58.64, 109 | paddingRight: units.width / 51.31, 110 | width: '100%', 111 | display: 'flex', 112 | justifyContent: 'flex-end', 113 | alignItems: 'flex-end', 114 | }, 115 | container: { 116 | flex: 1, 117 | backgroundColor: colors.WHITE, 118 | }, 119 | bodyContainer: { 120 | paddingHorizontal: units.width / 41.05, 121 | // marginTop: units.height / 40, 122 | }, 123 | logoContainer: { 124 | width: '100%', 125 | display: 'flex', 126 | justifyContent: 'center', 127 | alignItems: 'center', 128 | }, 129 | textContainer: { 130 | marginTop: units.height / 23.45 131 | }, 132 | text1: { 133 | fontFamily: 'Noto Sans JP', 134 | fontSize: 16, 135 | textAlign: 'center', 136 | color: '#626a7a', 137 | lineHeight: 20 138 | }, 139 | text2: { 140 | marginTop: units.height / 58.64, 141 | fontFamily: 'Inter', 142 | fontWeight: '600', 143 | fontSize: 16, 144 | lineHeight: 19, 145 | color: '#1d242e', 146 | textAlign: 'center' 147 | }, 148 | emailText: { 149 | color: colors.DARKGRAY, 150 | fontSize: 16, 151 | marginBottom: units.height / 67, 152 | }, 153 | title: { 154 | color: colors.BLACK, 155 | fontSize: 36, 156 | fontWeight: '600', 157 | }, 158 | forgotText: { 159 | color: colors.PURPLE, 160 | fontFamily: 'Museo Sans', 161 | fontSize: 16 162 | }, 163 | loginContainer: { 164 | marginVertical: units.height / 25, 165 | }, 166 | signUpContainer: { 167 | flexDirection: 'row', 168 | justifyContent: 'center', 169 | alignItems: 'center', 170 | marginTop: units.height / 34.2, 171 | }, 172 | line: { 173 | height: 1, 174 | width: units.width / 3.5, 175 | backgroundColor: colors.GRAY, 176 | }, 177 | imageContainer: { 178 | flexDirection: 'row', 179 | justifyContent: 'space-between', 180 | }, 181 | errorText: { 182 | color: colors.ORANGE, 183 | marginTop: units.height / 101, 184 | }, 185 | signUpText: { 186 | color: colors.PURPLE, 187 | textDecorationLine: 'underline', 188 | textDecorationColor: colors.PURPLE, 189 | textDecorationStyle: 'solid', 190 | fontFamily: 'Noto Sans JP', 191 | fontWeight: '500', 192 | fontSize: 14 193 | } 194 | }); 195 | -------------------------------------------------------------------------------- /src/ui/screens/LoginMain.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Image, 4 | SafeAreaView, 5 | View, 6 | Text, 7 | StyleSheet 8 | } from 'react-native'; 9 | import CustomButton from "../components/CustomButton"; 10 | import {colors} from '../../themes/Colors'; 11 | import {units} from '../../themes/Units'; 12 | import { routes } from "../../navigation/routes"; 13 | 14 | const LoginMain = ({navigation}) => { 15 | 16 | const GotoLogin = () => { 17 | navigation.navigate(routes.LOGIN); 18 | } 19 | 20 | return ( 21 | 22 | 23 | 24 | 27 | 28 | 29 | 32 | 33 | 34 | Welcome to bLinked 35 | Trusted by millions of companies,{"\n"}For fast delivery nationwide 36 | 37 | 38 | 39 | 40 | 41 | By continuing with the service above, you agree to{"\n"} bLinked's Terms of services and privacy policy 42 | 43 | 44 | 45 | ); 46 | } 47 | 48 | export default LoginMain; 49 | 50 | const styles = StyleSheet.create({ 51 | container: { 52 | // flex: 1, 53 | // backgroundColor: colors.WHITE, 54 | height: '100%', 55 | width: '100%' 56 | }, 57 | bodyContainer: { 58 | width: '100%', 59 | paddingHorizontal: units.width / 10.7, 60 | marginTop: units.height / 9.23, 61 | // marginBottom: units.height / 15.32, 62 | }, 63 | logoContainer: { 64 | width: '100%', 65 | display: 'flex', 66 | justifyContent: 'center', 67 | alignItems: 'center', 68 | }, 69 | deliverContainer: { 70 | marginTop: units.height / 12.25, 71 | width: '100%', 72 | display: 'flex', 73 | justifyContent: 'center', 74 | alignItems: 'center', 75 | }, 76 | textContainer: { 77 | marginTop: units.height / 18.24, 78 | width: '100%', 79 | display: 'flex', 80 | justifyContent: 'center', 81 | alignItems: 'center', 82 | }, 83 | noteContainer: { 84 | marginTop: units.height / 39.09, 85 | width: '100%', 86 | display: 'flex', 87 | justifyContent: 'center', 88 | alignItems: 'center', 89 | }, 90 | buttonContainer: { 91 | marginTop: units.height / 17.84 92 | }, 93 | titleText: { 94 | fontSize: 24, 95 | fontWeight: "bold", 96 | color: '#24272D' 97 | }, 98 | baseText: { 99 | marginTop: 10, 100 | fontSize: 16, 101 | color: '#626A7A', 102 | textAlign: "center" 103 | }, 104 | noteText: { 105 | color: '#A2A9B4', 106 | lineHeight: 19, 107 | fontSize: 12, 108 | textAlign: "center" 109 | }, 110 | blueText: { 111 | color: colors.PURPLE, 112 | lineHeight: 19 113 | } 114 | }); -------------------------------------------------------------------------------- /src/ui/screens/Main.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Image, 4 | SafeAreaView, 5 | View, 6 | Text, 7 | StyleSheet 8 | } from 'react-native'; 9 | import CustomButton from "../components/CustomButton"; 10 | import {colors} from '../../themes/Colors'; 11 | import {units} from '../../themes/Units'; 12 | import { routes } from "../../navigation/routes"; 13 | 14 | const Main = ({navigation}) => { 15 | 16 | const GotoRegister = () => { 17 | navigation.navigate(routes.REGISTER); 18 | } 19 | 20 | const GotoLogin = () => { 21 | navigation.navigate(routes.LOGINMAIN); 22 | } 23 | 24 | return ( 25 | 26 | 27 | 28 | 31 | 32 | 33 | 36 | 37 | 38 | Welcome to bLinked 39 | Trusted by millions of companies,{"\n"}For fast delivery nationwide 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | By continuing with the service above, you agree to{"\n"} bLinked's Terms of services and privacy policy 49 | 50 | 51 | 52 | ); 53 | } 54 | 55 | export default Main; 56 | 57 | const styles = StyleSheet.create({ 58 | container: { 59 | // flex: 1, 60 | // backgroundColor: colors.WHITE, 61 | height: '100%', 62 | width: '100%' 63 | }, 64 | bodyContainer: { 65 | width: '100%', 66 | paddingHorizontal: units.width / 10.7, 67 | marginTop: units.height / 9.23, 68 | // marginBottom: units.height / 15.32, 69 | }, 70 | logoContainer: { 71 | width: '100%', 72 | display: 'flex', 73 | justifyContent: 'center', 74 | alignItems: 'center', 75 | }, 76 | deliverContainer: { 77 | marginTop: units.height / 17.27, 78 | width: '100%', 79 | display: 'flex', 80 | justifyContent: 'center', 81 | alignItems: 'center', 82 | }, 83 | textContainer: { 84 | marginTop: units.height / 36.23, 85 | width: '100%', 86 | display: 'flex', 87 | justifyContent: 'center', 88 | alignItems: 'center', 89 | }, 90 | noteContainer: { 91 | marginTop: units.height / 20.52, 92 | width: '100%', 93 | display: 'flex', 94 | justifyContent: 'center', 95 | alignItems: 'center', 96 | }, 97 | buttonContainer1: { 98 | marginTop: units.height / 17.84 99 | }, 100 | buttonContainer2: { 101 | marginTop: units.height / 51.21 102 | }, 103 | titleText: { 104 | fontSize: 24, 105 | fontWeight: '700', 106 | color: '#24272D', 107 | }, 108 | baseText: { 109 | marginTop: 10, 110 | fontSize: 16, 111 | color: '#626A7A', 112 | lineHeight: 24, 113 | fontWeight: '400', 114 | textAlign: "center" 115 | }, 116 | noteText: { 117 | color: '#A2A9B4', 118 | lineHeight: 16, 119 | fontSize: 10, 120 | textAlign: "center" 121 | }, 122 | blueText: { 123 | color: colors.PURPLE, 124 | lineHeight: 16 125 | } 126 | }); -------------------------------------------------------------------------------- /src/ui/screens/Password.js: -------------------------------------------------------------------------------- 1 | import { 2 | StyleSheet, 3 | Text, 4 | View, 5 | SafeAreaView, 6 | TouchableOpacity, 7 | Image 8 | } from 'react-native'; 9 | import React from 'react'; 10 | import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; 11 | import {colors} from '../../themes/Colors'; 12 | import {units} from '../../themes/Units'; 13 | import CustomInput from '../components/CustomInput'; 14 | import CustomButton from '../components/CustomButton'; 15 | import {Formik} from 'formik'; 16 | import * as Yup from 'yup'; 17 | import authFirebase from '../../services/firebase/auth'; 18 | import Loading from '../components/Loading'; 19 | import { routes } from '../../navigation/routes'; 20 | 21 | const Password = ({navigation}) => { 22 | const {loading, createUser} = authFirebase(); 23 | 24 | const registerIntialValue = { 25 | password: '', 26 | rePassword: '', 27 | }; 28 | 29 | const registerValidationSchema = Yup.object().shape({ 30 | password: Yup.string() 31 | .min(6, 'Password must be a minimum of 6 characters') 32 | .required('This field is required'), 33 | rePassword: Yup.string() 34 | .oneOf([Yup.ref('password')], 'Passwords are not the same') 35 | .required('This field is required'), 36 | }); 37 | 38 | const handleContinue = values => { 39 | navigation.navigate(routes.LOGIN); 40 | }; 41 | 42 | const onClickBack = () => { 43 | navigation.goBack(); 44 | } 45 | 46 | return ( 47 | 48 | {loading && } 49 | 50 | 51 | 52 | 53 | 54 | 55 | {"<"} Back 56 | 57 | 58 | Create Password 59 | 60 | 61 | 62 | 63 | Create a password for your{"\n"}bLinked account. 64 | 65 | 66 | 70 | {({values, errors, touched, handleChange, handleSubmit}) => ( 71 | <> 72 | 73 | 79 | {errors.password && touched.password && ( 80 | {errors.password} 81 | )} 82 | Password strength 83 | 84 | 85 | 91 | {errors.rePassword && touched.rePassword && ( 92 | {errors.rePassword} 93 | )} 94 | 95 | 96 | 97 | 98 | 99 | )} 100 | 101 | 102 | 103 | 104 | 105 | ); 106 | }; 107 | 108 | export default Password; 109 | 110 | const styles = StyleSheet.create({ 111 | greyContainer: { 112 | backgroundColor: '#3842B008', 113 | height: units.height / 7.46 114 | }, 115 | statusContainer: { 116 | width: units.width, 117 | height: units.height / 18.65, 118 | }, 119 | backContainer: { 120 | marginTop: units.height / 35.69, 121 | marginLeft: units.width / 37.5, 122 | // width: 120, 123 | height: 20, 124 | }, 125 | container: { 126 | flex: 1, 127 | backgroundColor: colors.WHITE, 128 | }, 129 | title: { 130 | color: colors.BLACK, 131 | fontSize: 16, 132 | fontWeight: '700', 133 | textAlign: 'center', 134 | marginTop: -1 * units.height / 37.31 135 | }, 136 | bodyContainer: { 137 | paddingHorizontal: units.width / 41.05, 138 | marginTop: units.height / 25.62, 139 | }, 140 | textContainer: { 141 | marginTop: units.height / 17.46 142 | }, 143 | text1: { 144 | fontFamily: 'Noto Sans JP', 145 | fontSize: 16, 146 | textAlign: 'center', 147 | color: '#626a7a', 148 | lineHeight: 26 149 | }, 150 | emailText: { 151 | color: colors.DARKGRAY, 152 | fontSize: 16, 153 | marginBottom: units.height / 67, 154 | }, 155 | buttonContainer: { 156 | marginTop: units.height / 10.94, 157 | }, 158 | loginContainer: { 159 | flexDirection: 'row', 160 | justifyContent: 'center', 161 | alignItems: 'center', 162 | marginTop: units.height / 25, 163 | }, 164 | line: { 165 | height: 1, 166 | width: units.width / 3.5, 167 | backgroundColor: colors.GRAY, 168 | }, 169 | errorText: { 170 | color: colors.ORANGE, 171 | marginTop: units.height / 101, 172 | }, 173 | signInText: { 174 | color: colors.PURPLE, 175 | textDecorationLine: 'underline', 176 | textDecorationColor: colors.PURPLE, 177 | textDecorationStyle: 'solid', 178 | fontFamily: 'Noto Sans JP', 179 | fontWeight: '500', 180 | fontSize: 14 181 | } 182 | }); 183 | -------------------------------------------------------------------------------- /src/ui/screens/Register.js: -------------------------------------------------------------------------------- 1 | import { 2 | StyleSheet, 3 | Text, 4 | View, 5 | SafeAreaView, 6 | TouchableOpacity, 7 | Image 8 | } from 'react-native'; 9 | import React from 'react'; 10 | import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; 11 | import {colors} from '../../themes/Colors'; 12 | import {units} from '../../themes/Units'; 13 | import CustomInput from '../components/CustomInput'; 14 | import CustomButton from '../components/CustomButton'; 15 | import {Formik} from 'formik'; 16 | import * as Yup from 'yup'; 17 | import authFirebase from '../../services/firebase/auth'; 18 | import Loading from '../components/Loading'; 19 | import { routes } from '../../navigation/routes'; 20 | 21 | const Register = ({navigation}) => { 22 | const {loading, createUser} = authFirebase(); 23 | 24 | const registerIntialValue = { 25 | email: '', 26 | fullName: '', 27 | phoneNumber: '', 28 | }; 29 | 30 | const registerValidationSchema = Yup.object().shape({ 31 | email: Yup.string() 32 | .email('Email is not in correct format') 33 | .required('This field is required'), 34 | fullName: Yup.string() 35 | .required('This field is required'), 36 | phoneNumber: Yup.string() 37 | .required('This field is required'), 38 | }); 39 | 40 | const handleContinue = values => { 41 | navigation.navigate(routes.VERIFY); 42 | }; 43 | 44 | const onClickLogin = () => { 45 | navigation.navigate(routes.LOGIN); 46 | }; 47 | 48 | const onClickBack = () => { 49 | navigation.goBack(); 50 | } 51 | 52 | return ( 53 | 54 | {loading && } 55 | 56 | 57 | 58 | 59 | 60 | {"<"} Back 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | Let's get you started 70 | First of, let's get to know you 71 | 72 | 73 | 77 | {({values, errors, touched, handleChange, handleSubmit}) => ( 78 | <> 79 | 80 | 85 | {errors.fullName && touched.fullName && ( 86 | {errors.fullName} 87 | )} 88 | 89 | 90 | 96 | {errors.phoneNumber && touched.phoneNumber && ( 97 | {errors.phoneNumber} 98 | )} 99 | 100 | 101 | 107 | {errors.email && touched.email && ( 108 | {errors.email} 109 | )} 110 | 111 | 112 | 113 | 114 | 115 | 116 | Have an account already? Login 117 | 118 | 119 | 120 | 121 | 122 | )} 123 | 124 | 125 | 126 | 127 | 128 | ); 129 | }; 130 | 131 | export default Register; 132 | 133 | const styles = StyleSheet.create({ 134 | statusContainer: { 135 | width: units.width, 136 | height: units.height / 18.65 137 | }, 138 | backContainer: { 139 | marginTop: units.height / 74.63, 140 | marginLeft: units.width / 37.5, 141 | width: 120, 142 | height: 20 143 | }, 144 | container: { 145 | flex: 1, 146 | backgroundColor: colors.WHITE, 147 | }, 148 | title: { 149 | color: colors.BLACK, 150 | fontSize: 36, 151 | fontWeight: '600', 152 | }, 153 | bodyContainer: { 154 | paddingHorizontal: units.width / 41.05, 155 | marginTop: units.height / 25.62, 156 | }, 157 | logoContainer: { 158 | width: '100%', 159 | display: 'flex', 160 | justifyContent: 'center', 161 | alignItems: 'center', 162 | }, 163 | textContainer: { 164 | marginTop: units.height / 17.46 165 | }, 166 | text1: { 167 | fontFamily: 'Noto Sans JP', 168 | fontSize: 16, 169 | textAlign: 'center', 170 | color: '#626a7a', 171 | lineHeight: 20 172 | }, 173 | text2: { 174 | marginTop: units.height / 58.64, 175 | fontFamily: 'Inter', 176 | fontWeight: '600', 177 | fontSize: 16, 178 | lineHeight: 19, 179 | color: '#1d242e', 180 | textAlign: 'center' 181 | }, 182 | emailText: { 183 | color: colors.DARKGRAY, 184 | fontSize: 16, 185 | marginBottom: units.height / 67, 186 | }, 187 | buttonContainer: { 188 | marginTop: units.height / 14.92, 189 | }, 190 | loginContainer: { 191 | flexDirection: 'row', 192 | justifyContent: 'center', 193 | alignItems: 'center', 194 | marginTop: units.height / 25, 195 | }, 196 | line: { 197 | height: 1, 198 | width: units.width / 3.5, 199 | backgroundColor: colors.GRAY, 200 | }, 201 | errorText: { 202 | color: colors.ORANGE, 203 | marginTop: units.height / 101, 204 | }, 205 | signInText: { 206 | color: colors.PURPLE, 207 | textDecorationLine: 'underline', 208 | textDecorationColor: colors.PURPLE, 209 | textDecorationStyle: 'solid', 210 | fontFamily: 'Noto Sans JP', 211 | fontWeight: '500', 212 | fontSize: 14 213 | } 214 | }); 215 | -------------------------------------------------------------------------------- /src/ui/screens/Splash.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet, Image, SafeAreaView} from 'react-native'; 2 | import React from 'react'; 3 | import {colors} from '../../themes/Colors'; 4 | import {units} from '../../themes/Units'; 5 | 6 | const Splash = () => { 7 | return ( 8 | 9 | 13 | 14 | ); 15 | }; 16 | 17 | export default Splash; 18 | 19 | const styles = StyleSheet.create({ 20 | container: { 21 | flex: 1, 22 | backgroundColor: colors.ORANGE, 23 | alignItems: 'center', 24 | justifyContent: 'center', 25 | }, 26 | image: { 27 | height: units.height / 5, 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /src/ui/screens/User.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet, Text, View, SafeAreaView, FlatList} from 'react-native'; 2 | import React from 'react'; 3 | import {colors} from '../../themes/Colors'; 4 | import {units} from '../../themes/Units'; 5 | import {useSelector} from 'react-redux'; 6 | 7 | const Favorites = () => { 8 | 9 | return ( 10 | 11 | 12 | Favorites 13 | 14 | 15 | ); 16 | }; 17 | 18 | export default Favorites; 19 | 20 | const styles = StyleSheet.create({ 21 | container: { 22 | flex: 1, 23 | backgroundColor: colors.WHITE, 24 | }, 25 | list: { 26 | paddingHorizontal: units.width / 14, 27 | }, 28 | topContainer: { 29 | alignItems: 'center', 30 | justifyContent: 'center', 31 | marginTop: units.height / 34, 32 | }, 33 | topText: { 34 | fontSize: 18, 35 | fontWeight: '500', 36 | color: colors.DARK, 37 | }, 38 | emptyText: { 39 | fontSize: 32, 40 | fontWeight: '600', 41 | textAlign: 'center', 42 | }, 43 | }); 44 | -------------------------------------------------------------------------------- /src/ui/screens/Verify.js: -------------------------------------------------------------------------------- 1 | import { 2 | StyleSheet, 3 | Text, 4 | View, 5 | SafeAreaView, 6 | TouchableOpacity, 7 | Image 8 | } from 'react-native'; 9 | import React from 'react'; 10 | import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; 11 | import {colors} from '../../themes/Colors'; 12 | import {units} from '../../themes/Units'; 13 | import CustomNumberInput from '../components/CustomNumberInput'; 14 | import CustomButton from '../components/CustomButton'; 15 | import {Formik} from 'formik'; 16 | import * as Yup from 'yup'; 17 | import authFirebase from '../../services/firebase/auth'; 18 | import Loading from '../components/Loading'; 19 | import { routes } from '../../navigation/routes'; 20 | 21 | const Verify = ({navigation}) => { 22 | const {loading, createUser} = authFirebase(); 23 | 24 | const verifyIntialValue = { 25 | numberOne: '', 26 | numberTwo: '', 27 | numberThree: '', 28 | numberFour: '', 29 | numberFive: '', 30 | numberSix: '', 31 | }; 32 | 33 | const verifyValidationSchema = Yup.object().shape({ 34 | numberOne: Yup.string() 35 | .required('This field is required'), 36 | numberTwo: Yup.string() 37 | .required('This field is required'), 38 | numberThree: Yup.string() 39 | .required('This field is required'), 40 | numberFour: Yup.string() 41 | .required('This field is required'), 42 | numberFive: Yup.string() 43 | .required('This field is required'), 44 | numberSix: Yup.string() 45 | .required('This field is required'), 46 | }); 47 | 48 | const handleContinue = values => { 49 | navigation.navigate(routes.PASSWORD); 50 | }; 51 | 52 | const onClickBack = () => { 53 | navigation.goBack(); 54 | } 55 | 56 | return ( 57 | 58 | {loading && } 59 | 60 | 61 | 62 | 63 | 64 | {"<"} Back 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | Enter the 6-digit confirmation code sent{"\n"}to 0810-089-5940 via SMS. started 74 | OTP Verification 75 | 76 | 77 | 81 | {({values, errors, touched, handleChange, handleSubmit}) => ( 82 | <> 83 | 84 | 89 | 94 | 99 | 104 | 109 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | Resend code in {"(1:17)"} 121 | 122 | 123 | 124 | )} 125 | 126 | 127 | 128 | 129 | 130 | ); 131 | }; 132 | 133 | export default Verify; 134 | 135 | const styles = StyleSheet.create({ 136 | statusContainer: { 137 | width: units.width, 138 | height: units.height / 18.65 139 | }, 140 | backContainer: { 141 | marginTop: units.height / 74.63, 142 | marginLeft: units.width / 37.5, 143 | width: 120, 144 | height: 20 145 | }, 146 | container: { 147 | flex: 1, 148 | backgroundColor: colors.WHITE, 149 | }, 150 | title: { 151 | color: colors.BLACK, 152 | fontSize: 36, 153 | fontWeight: '600', 154 | }, 155 | bodyContainer: { 156 | paddingHorizontal: units.width / 41.05, 157 | marginTop: units.height / 25.62, 158 | }, 159 | logoContainer: { 160 | width: '100%', 161 | display: 'flex', 162 | justifyContent: 'center', 163 | alignItems: 'center', 164 | }, 165 | textContainer: { 166 | marginTop: units.height / 30.4 167 | }, 168 | text1: { 169 | fontFamily: 'Noto Sans JP', 170 | fontSize: 16, 171 | textAlign: 'center', 172 | color: '#626a7a', 173 | lineHeight: 26 174 | }, 175 | text2: { 176 | marginTop: units.height / 58.64, 177 | fontFamily: 'Inter', 178 | fontWeight: '600', 179 | fontSize: 16, 180 | lineHeight: 19, 181 | color: '#1d242e', 182 | textAlign: 'center' 183 | }, 184 | verifyContainer: { 185 | display: 'flex', 186 | flexDirection: 'row', 187 | marginTop: units.height / 25.65 188 | }, 189 | buttonContainer: { 190 | marginTop: units.height / 9.12, 191 | }, 192 | loginContainer: { 193 | flexDirection: 'row', 194 | justifyContent: 'center', 195 | alignItems: 'center', 196 | marginTop: units.height / 41.05, 197 | }, 198 | line: { 199 | height: 1, 200 | width: units.width / 3.5, 201 | backgroundColor: colors.GRAY, 202 | }, 203 | errorText: { 204 | color: colors.ORANGE, 205 | marginTop: units.height / 101, 206 | }, 207 | signInText: { 208 | color: '#737A91', 209 | fontFamily: 'Noto Sans JP', 210 | fontWeight: '500', 211 | fontSize: 16 212 | } 213 | }); 214 | --------------------------------------------------------------------------------