diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 6dc8a26..cb2f8da 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -19,78 +19,57 @@ on: - 'example/yarn.lock' jobs: + build_example: - name: Build Android Example App + name: Build Android Example App with new arch enabled runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 18 + - name: Setup JDK 17 uses: actions/setup-java@v2 with: java-version: 17 distribution: 'temurin' - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Restore node_modules from cache - uses: actions/cache@v2 - id: yarn-cache + - name: Setup Node.js + uses: actions/setup-node@v4 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install node_modules - run: yarn install --frozen-lockfile - - name: Install node_modules for example/ - run: yarn install --frozen-lockfile --cwd example - - - name: Restore Gradle cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Run Gradle Build for example/android/ - run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. - build_example_new_arch: - name: Build Android Example App with new arch enabled - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + node-version: 18 - - name: Setup JDK 17 - uses: actions/setup-java@v2 - with: - java-version: 17 - distribution: 'temurin' + - name: Enable Corepack + run: corepack enable - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: | + if command -v yarn &> /dev/null; then + CACHE_DIR=$(yarn config get cacheFolder 2>/dev/null || yarn cache dir 2>/dev/null || echo "") + if [ -z "$CACHE_DIR" ]; then + CACHE_DIR="$HOME/.yarn/cache" + fi + else + CACHE_DIR="$HOME/.yarn/cache" + fi + echo "dir=$CACHE_DIR" >> $GITHUB_OUTPUT - name: Restore node_modules from cache - uses: actions/cache@v2 + uses: actions/cache@v5 id: yarn-cache with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: | + ${{ steps.yarn-cache-dir-path.outputs.dir }} + node_modules + example/node_modules key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install node_modules run: yarn install --frozen-lockfile - name: Install node_modules for example/ - run: yarn install --frozen-lockfile --cwd example + run: yarn install --frozen-lockfile - name: Restore Gradle cache - uses: actions/cache@v2 + uses: actions/cache@v5 with: path: | ~/.gradle/caches @@ -99,4 +78,4 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - name: Run Gradle Build for example/android/ - run: cd example/android && ./gradlew assembleDebug -PnewArchEnabled=true --build-cache && cd ../.. + run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 7625fa4..5311d62 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -19,103 +19,58 @@ on: jobs: build: name: Build iOS Example App - runs-on: macOS-13 + runs-on: macOS-latest defaults: run: working-directory: example/ios steps: - uses: actions/checkout@v4 - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Restore node_modules from cache - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install node_modules for example/ - run: yarn install --frozen-lockfile --cwd .. - - - name: Restore buildcache - uses: mikehardy/buildcache-action@v1 - continue-on-error: true - - - name: Setup Ruby (bundle) - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - bundler-cache: true - working-directory: example - - name: Restore Pods cache - uses: actions/cache@v2 + - name: Enable Corepack + run: corepack enable + + - name: Setup xcode + uses: maxim-lobanov/setup-xcode@v1 with: - path: | - example/ios/Pods - ~/Library/Caches/CocoaPods - ~/.cocoapods - key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-pods- - - name: Install Pods - run: pod install - - name: Install xcpretty - run: gem install xcpretty - - name: Build App - run: "set -o pipefail && xcodebuild \ - CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ - -derivedDataPath build -UseModernBuildSystem=YES \ - -workspace example.xcworkspace \ - ONLY_ACTIVE_ARCH=NO \ - -scheme example \ - -sdk iphonesimulator \ - -configuration Debug \ - -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ - build \ - CODE_SIGNING_ALLOWED=NO | xcpretty" - build_new_arch: - name: Build iOS Example App with new arch enabled - runs-on: macOS-13 - defaults: - run: - working-directory: example/ios - steps: - - uses: actions/checkout@v4 + xcode-version: 16.4.0 - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: | + if command -v yarn &> /dev/null; then + CACHE_DIR=$(yarn config get cacheFolder 2>/dev/null || yarn cache dir 2>/dev/null || echo "") + if [ -z "$CACHE_DIR" ]; then + CACHE_DIR="$HOME/.yarn/cache" + fi + else + CACHE_DIR="$HOME/.yarn/cache" + fi + echo "dir=$CACHE_DIR" >> $GITHUB_OUTPUT - name: Restore node_modules from cache - uses: actions/cache@v2 + uses: actions/cache@v5 id: yarn-cache with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: | + ${{ steps.yarn-cache-dir-path.outputs.dir }} + node_modules + example/node_modules key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install node_modules for example/ - run: yarn install --frozen-lockfile --cwd .. - - - name: Restore buildcache - uses: mikehardy/buildcache-action@v1 - continue-on-error: true - + run: yarn install --frozen-lockfile - name: Setup Ruby (bundle) uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 - bundler-cache: true + ruby-version: 3.2 working-directory: example - name: Restore Pods cache - uses: actions/cache@v2 + uses: actions/cache@v5 with: path: | example/ios/Pods @@ -124,19 +79,13 @@ jobs: key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- - - name: Install Pods - run: RCT_NEW_ARCH_ENABLED=1 pod install - - name: Install xcpretty - run: gem install xcpretty - name: Build App - run: "set -o pipefail && xcodebuild \ - CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ - -derivedDataPath build -UseModernBuildSystem=YES \ - -workspace example.xcworkspace \ - ONLY_ACTIVE_ARCH=NO \ - -scheme example \ - -sdk iphonesimulator \ - -configuration Debug \ - -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \ - build \ - CODE_SIGNING_ALLOWED=NO | xcpretty" + run: | + bundle install + RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install + xcodebuild build \ + -workspace BlurhashExample.xcworkspace \ + -scheme BlurhashExample \ + -sdk iphonesimulator + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5465b99..1779a98 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ DerivedData *.ipa *.xcuserstate project.xcworkspace +.cxx/ # Android/IntelliJ # @@ -43,3 +44,9 @@ buck-out/ # generated by bob lib/ + +# cocoapods +Pods/ +Podfile.lock +Podfile.lock.lock +bundle/ \ No newline at end of file diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz new file mode 100644 index 0000000..d247a28 Binary files /dev/null and b/.yarn/install-state.gz differ diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/app.txt b/app.txt new file mode 100644 index 0000000..e69de29 diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index 0cab2ac..0000000 --- a/example/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -ios/.xcode.env.local - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml -*.hprof -.cxx/ -*.keystore -!debug.keystore - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -**/fastlane/report.xml -**/fastlane/Preview.html -**/fastlane/screenshots -**/fastlane/test_output - -# Bundle artifact -*.jsbundle - -# Ruby / CocoaPods -/ios/Pods/ -/vendor/bundle/ - -# Temporary files created by Metro to check the health of the file watcher -.metro-health-check* - -# testing -/coverage diff --git a/example/.prettierrc.js b/example/.prettierrc.js deleted file mode 100644 index 2b54074..0000000 --- a/example/.prettierrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - arrowParens: 'avoid', - bracketSameLine: true, - bracketSpacing: false, - singleQuote: true, - trailingComma: 'all', -}; diff --git a/example/Gemfile b/example/Gemfile index 6a7d5c7..6a4c5f1 100644 --- a/example/Gemfile +++ b/example/Gemfile @@ -3,5 +3,14 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.13' -gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' + +# Ruby 3.4.0 has removed some libraries from the standard library. +gem 'bigdecimal' +gem 'logger' +gem 'benchmark' +gem 'mutex_m' diff --git a/example/Gemfile.lock b/example/Gemfile.lock index ed6c32f..8a670d3 100644 --- a/example/Gemfile.lock +++ b/example/Gemfile.lock @@ -1,24 +1,33 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.6) - rexml - activesupport (7.0.8) - concurrent-ruby (~> 1.0, >= 1.0.2) + CFPropertyList (3.0.8) + activesupport (7.2.3) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (3.3.1) claide (1.1.0) - cocoapods (1.14.3) + cocoapods (1.15.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.3) + cocoapods-core (= 1.15.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -33,7 +42,7 @@ GEM nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.3) + cocoapods-core (1.15.2) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -53,47 +62,59 @@ GEM netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.3) + connection_pool (3.0.2) + drb (2.2.3) escape (0.0.4) - ethon (0.16.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.16.3) + ffi (1.17.2) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.14.1) + httpclient (2.9.0) + mutex_m + i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.7.1) - minitest (5.21.2) + json (2.18.0) + logger (1.7.0) + minitest (5.27.0) molinillo (0.8.0) + mutex_m (0.3.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) public_suffix (4.0.7) - rexml (3.2.6) + rexml (3.4.4) ruby-macho (2.5.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) + securerandom (0.4.1) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.23.0) + xcodeproj (1.25.1) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) - rexml (~> 3.2.4) + rexml (>= 3.3.6, < 4.0) PLATFORMS ruby DEPENDENCIES - activesupport (>= 6.1.7.3, < 7.1.0) - cocoapods (~> 1.13) + activesupport (>= 6.1.7.5, != 7.1.0) + benchmark + bigdecimal + cocoapods (>= 1.13, != 1.15.1, != 1.15.0) + concurrent-ruby (< 1.3.4) + logger + mutex_m + xcodeproj (< 1.26.0) RUBY VERSION - ruby 2.7.4p191 + ruby 3.2.0p0 BUNDLED WITH - 2.2.33 + 2.6.9 diff --git a/example/README.md b/example/README.md index da9666c..3e2c3f8 100644 --- a/example/README.md +++ b/example/README.md @@ -1,70 +1,77 @@ -# Blurhash Example +This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). -This is an example app, demonstrating the usage of the [react-native-blurhash](https://github.com/mrousavy/react-native-blurhash) library. +# Getting Started - - - - - - - - - -
iOS ScreenshotAndroid Screenshot
iOS Demo ScreenshotAndroid Demo Screenshot
+> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding. ->**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. +## Step 1: Start Metro -## Step 1: Start the Metro Server +First, you will need to run **Metro**, the JavaScript build tool for React Native. -First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. +To start the Metro dev server, run the following command from the root of your React Native project: -To start Metro, run the following command from the _root_ of your React Native project: - -```bash -# using npm +```sh +# Using npm npm start # OR using Yarn yarn start ``` -## Step 2: Start your Application +## Step 2: Build and run your app -Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: +With Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app: -### For Android +### Android -```bash -# using npm +```sh +# Using npm npm run android # OR using Yarn yarn android ``` -### For iOS +### iOS + +For iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps). + +The first time you create a new project, run the Ruby bundler to install CocoaPods itself: + +```sh +bundle install +``` + +Then, and every time you update your native dependencies, run: + +```sh +bundle exec pod install +``` -```bash -# using npm +For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html). + +```sh +# Using npm npm run ios # OR using Yarn yarn ios ``` -If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. +If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device. + +This is one way to run your app — you can also build it directly from Android Studio or Xcode. -This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. +## Step 3: Modify your app -## Step 3: Modifying your App +Now that you have successfully run the app, let's make changes! -Now that you have successfully run the app, let's modify it. +Open `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh). -1. Open `App.tsx` in your text editor of choice and edit some lines. -2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! +When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload: - For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! +- **Android**: Press the R key twice or select **"Reload"** from the **Dev Menu**, accessed via Ctrl + M (Windows/Linux) or Cmd ⌘ + M (macOS). +- **iOS**: Press R in iOS Simulator. ## Congratulations! :tada: @@ -73,11 +80,11 @@ You've successfully run and modified your React Native App. :partying_face: ### Now what? - If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). -- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). +- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started). # Troubleshooting -If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. +If you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. # Learn More diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index ba8d7ee..a473e80 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -8,14 +8,14 @@ apply plugin: "com.facebook.react" */ react { /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '..' - // root = file("../") - // The folder where the react-native NPM package is. Default is ../node_modules/react-native - // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen - // codegenDir = file("../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js - // cliFile = file("../node_modules/react-native/cli.js") + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native + reactNativeDir = file("../../../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen + codegenDir = file("../../../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js + cliFile = file("../../../node_modules/react-native/cli.js") /* Variants */ // The list of variants to that are debuggable. For those we're going to @@ -49,6 +49,9 @@ react { // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() } /** @@ -60,23 +63,23 @@ def enableProguardInReleaseBuilds = false * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ -def jscFlavor = 'org.webkit:android-jsc:+' +def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+' android { ndkVersion rootProject.ext.ndkVersion buildToolsVersion rootProject.ext.buildToolsVersion compileSdk rootProject.ext.compileSdkVersion - namespace "com.example" + namespace "blurhash.example" defaultConfig { - applicationId "com.example" + applicationId "blurhash.example" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 @@ -107,7 +110,6 @@ android { dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") - implementation("com.facebook.react:flipper-integration") if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") @@ -115,5 +117,3 @@ dependencies { implementation jscFlavor } } - -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index eb98c01..0000000 --- a/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 4122f36..fb78f39 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -8,7 +8,9 @@ android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:usesCleartextTraffic="${usesCleartextTraffic}" + android:supportsRtl="true"> = - PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: - // add(MyReactNativePackage()) - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(this.applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, false) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } - ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) - } -} diff --git a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/example/android/app/src/main/res/drawable/rn_edit_text_material.xml index 73b37e4..5c25e72 100644 --- a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/example/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -17,7 +17,8 @@ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material" android:insetRight="@dimen/abc_edit_text_inset_horizontal_material" android:insetTop="@dimen/abc_edit_text_inset_top_material" - android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> + android:insetBottom="@dimen/abc_edit_text_inset_bottom_material" + >