react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

New Architecture Support Done and Android & IOS

Open SolankiYogesh opened this issue 1 year ago • 22 comments

SolankiYogesh avatar Nov 18 '24 11:11 SolankiYogesh

When will it be updated?

Ryan82012993 avatar Nov 26 '24 06:11 Ryan82012993

for now if you want to use with new arch you can use below command

npm i https://github.com/SolankiYogesh/react-native-splash-screen#master

SolankiYogesh avatar Nov 26 '24 06:11 SolankiYogesh

for now if you want to use with new arch you can use below command

npm i https://github.com/SolankiYogesh/react-native-splash-screen#master

new error when use this 😵‍💫 image

Ryan82012993 avatar Nov 26 '24 08:11 Ryan82012993

bruh you forgot to install pods with

cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install

everything is completely working i am using in production app with new arch support

SolankiYogesh avatar Nov 26 '24 08:11 SolankiYogesh

bruh you forgot to install pods with

cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install

everything is completely working i am using in production app with new arch support

still not work, can you share me your package.json ?

Ryan82012993 avatar Nov 27 '24 02:11 Ryan82012993

Sure

{
  "name": "",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "watchman watch-del-all && react-native start --reset-cache",
    "test": "jest",
    "postinstall": "patch-package"
  },
  "expo": {
    "autolinking": {
      "exclude": [
        "expo-font",
        "expo-asset",
        "expo-file-system",
        "expo-constants"
      ]
    }
  },
  "dependencies": {
    "@gorhom/bottom-sheet": "^5.0.6",
    "@notifee/react-native": "^9.1.3",
    "@react-native-community/netinfo": "^11.4.1",
    "@react-native-firebase/app": "^21.6.1",
    "@react-native-firebase/crashlytics": "^21.6.1",
    "@react-native-google-signin/google-signin": "^13.1.0",
    "@react-native-voice/voice": "https://github.com/SolankiYogesh/voice#new-arch",
    "@react-navigation/drawer": "^7.0.11",
    "@react-navigation/native": "^7.0.6",
    "@react-navigation/native-stack": "^7.1.7",
    "@reduxjs/toolkit": "^2.3.0",
    "@sayem314/react-native-keep-awake": "^1.3.0",
    "axios": "^1.7.8",
    "bad-words": "^4.0.0",
    "expo": "^52.0.0",
    "expo-iap": "^2.1.0",
    "fbemitter": "^3.0.0",
    "lodash": "^4.17.21",
    "lottie-react-native": "^7.1.0",
    "moment": "^2.30.1",
    "patch-package": "^8.0.0",
    "react": "18.3.1",
    "react-fast-compare": "^3.2.2",
    "react-native": "0.76.3",
    "react-native-animated-pagination-dots": "^0.1.73",
    "react-native-auto-size-text": "^1.1.1",
    "react-native-autocomplete-dropdown": "^4.3.0",
    "react-native-contacts": "^8.0.4",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-device-info": "^14.0.1",
    "react-native-document-picker": "^9.3.1",
    "react-native-dropdown-picker": "^5.4.6",
    "react-native-gesture-handler": "^2.21.2",
    "react-native-image-picker": "^7.1.2",
    "react-native-in-app-review": "^4.3.3",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-mmkv": "^3.1.0",
    "react-native-modal": "^13.0.1",
    "react-native-pager-view": "^6.5.1",
    "react-native-permissions": "^5.2.0",
    "react-native-react-bridge": "0.12.3",
    "react-native-reanimated": "^3.16.2",
    "react-native-safe-area-context": "^4.14.0",
    "react-native-screens": "^4.3.0",
    "react-native-share": "^12.0.0",
    "react-native-sound": "https://github.com/SolankiYogesh/react-native-sound#master",
    "react-native-splash-screen": "https://github.com/SolankiYogesh/react-native-splash-screen#master",
    "react-native-svg": "^15.9.0",
    "react-native-tab-view": "^4.0.4",
    "react-native-turbo-image": "^1.21.0",
    "react-native-view-shot": "^4.0.2",
    "react-native-volume-manager": "^1.10.0",
    "react-native-webview": "^13.12.4",
    "react-redux": "^9.1.2",
    "react-usestateref": "^1.0.9",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^3.1.0",
    "rn-date-format": "^0.1.1",
    "rn-ripple-button": "1.1.7",
    "styled-components": "^6.1.13",
    "uuid": "^11.0.3"
  },
  "devDependencies": {
    "@babel/core": "^7.26.0",
    "@babel/preset-env": "^7.26.0",
    "@babel/runtime": "^7.26.0",
    "@react-native-community/cli": "15.1.2",
    "@react-native-community/cli-platform-android": "15.1.2",
    "@react-native-community/cli-platform-ios": "15.1.2",
    "@react-native/babel-preset": "0.76.3",
    "@react-native/eslint-config": "0.76.3",
    "@react-native/metro-config": "0.76.3",
    "@react-native/typescript-config": "0.76.3",
    "@types/fbemitter": "^2.0.35",
    "@types/lodash": "^4.17.13",
    "@types/react": "^18.3.12",
    "@types/react-test-renderer": "^18.3.0",
    "babel-jest": "^29.7.0",
    "babel-plugin-module-resolver": "^5.0.2",
    "eslint": "^9.15.0",
    "jest": "^29.7.0",
    "prettier": "3.4.0",
    "react-test-renderer": "18.3.1",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

SolankiYogesh avatar Nov 27 '24 04:11 SolankiYogesh

@Ryan82012993 let me know if you still facing same issue also share repro so i can test from my end

SolankiYogesh avatar Nov 27 '24 05:11 SolankiYogesh

@Ryan82012993 let me know if you still facing same issue also share repro so i can test from my end

i still facing same issue, this is my package.json { "name": "TheClubApp", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint src --ext .js,.jsx,.ts,.tsx", "check-format": "prettier --list-different './src//*.{js,jsx,ts,tsx}'", "format": "prettier --write --list-different './src//.{js,jsx,ts,tsx}'", "typecheck": "tsc --noEmit", "download-graphql-schema": "get-graphql-schema https://t0.shop.theclub.com.hk/graphql > graphql/schema.graphql", "codegen-graphql": "graphql-codegen", "codegen": "yarn codegen-graphql", "check-translations": "node ./scripts/checkTranslationsSorting.js", "sort-translations": "node ./scripts/sortTranslations.js", "sort-import": "yarn lint --rule 'import/order : 1' --fix", "deps-dedup": "yarn add -D yarn-deduplicate && yarn yarn-deduplicate && yarn remove yarn-deduplicate", "deps-audit-fix": "yarn add -D yarn-audit-fix && yarn yarn-audit-fix && yarn remove yarn-audit-fix", "postinstall": "patch-package" }, "dependencies": { "@adobe/react-native-aepassurance": "6.0.0", "@adobe/react-native-aepcore": "6.0.0", "@adobe/react-native-aeptarget": "6.0.0", "@adobe/react-native-aepuserprofile": "6.0.0", "@apollo/client": "3.4.15", "@cychiuae/react-native-multi-slider": "2.2.4", "@expo/react-native-action-sheet": "4.0.1", "@gorhom/bottom-sheet": "^4", "@native-html/iframe-plugin": "2.5.0", "@oursky/react-messageformat": "0.10.0", "@react-native-async-storage/async-storage": "2.0.0", "@react-native-camera-roll/camera-roll": "5.7.2", "@react-native-clipboard/clipboard": "1.15.0", "@react-native-community/blur": "4.4.1", "@react-native-community/netinfo": "11.3.3", "@react-native-community/push-notification-ios": "1.10.1", "@react-native-firebase/analytics": "21.6.0", "@react-native-firebase/app": "21.6.0", "@react-native-firebase/crashlytics": "21.6.0", "@react-native-firebase/dynamic-links": "21.6.0", "@react-native-firebase/perf": "21.6.0", "@react-native-firebase/remote-config": "21.6.0", "@react-navigation/bottom-tabs": "6.5.8", "@react-navigation/material-top-tabs": "6.6.3", "@react-navigation/native": "6.1.7", "@react-navigation/stack": "6.3.17", "@sentry/react-native": "5.35.0", "@tanstack/query-async-storage-persister": "^4.29.1", "@tanstack/react-query": "^4.29.3", "@tanstack/react-query-persist-client": "^4.29.3", "@types/base-64": "^1.0.0", "@types/events": "^3.0.0", "@types/qs": "^6.9.7", "@types/react-native-shared-group-preferences": "1.1.1", "@types/react-native-version-check": "^3.4.5", "@types/uuid": "^8.3.1", "aem-validator": "link:./aem-validator", "apollo-link": "^1.2.14", "apollo-link-rest": "^0.8.0-beta.0", "apollo3-cache-persist": "0.14.0", "base-64": "^1.0.0", "base64-arraybuffer": "1.0.1", "compare-versions": "6.1.0", "decimal.js": "10.3.1", "deepmerge": "4.2.2", "events": "^3.3.0", "get-graphql-schema": "2.1.2", "graphql": "^15.5.3", "graphql-anywhere": "^4.2.7", "html-entities": "^2.3.2", "immer": "10.0.2", "lottie-ios": "4.5.0", "lottie-react-native": "7.1.0", "moment": "^2.29.1", "moment-timezone": "0.5.43", "new-react-native-countdown-component": "^2.9.0", "numeral": "2.0.6", "patch-package": "8.0.0", "path-to-regexp": "6.3.0", "qrcode": "1.4.4", "qs": "^6.10.1", "react": "18.3.1", "react-native": "0.76.3", "react-native-advertising-info": "^1.0.0", "react-native-blob-util": "0.19.1", "react-native-camera": "4.2.1", "react-native-code-push": "8.2.2", "react-native-config": "^1.4.3", "react-native-device-info": "13.2.0", "react-native-email-link": "1.12.2", "react-native-fast-image": "8.6.3", "react-native-fbsdk-next": "13.1.4", "react-native-gesture-handler": "2.20.2", "react-native-google-recaptcha": "^1.0.8", "react-native-hole-view": "3.0.0-alpha4", "react-native-image-picker": "5.6.0", "react-native-in-app-review": "^4.3.3", "react-native-linear-gradient": "2.8.3", "react-native-localize": "3.0.2", "react-native-mmkv": "3.1.0", "react-native-modal": "13.0.0", "react-native-pager-view": "6.4.0", "react-native-pdf": "6.7.5", "react-native-permissions": "3.1.0", "react-native-popover-view": "5.1.5", "react-native-push-notification": "8.1.1", "react-native-qrcode-svg": "^6.1.1", "react-native-reanimated": "3.17.0-rc.0", "react-native-reanimated-carousel": "^3.0.4", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "4.12.0", "react-native-screens": "^3.34.0", "react-native-shadow-2": "7.0.5", "react-native-share": "^10.2.1", "react-native-shared-group-preferences": "1.1.23", "react-native-splash-screen": "https://github.com/SolankiYogesh/react-native-splash-screen#master", "react-native-svg": "15.8.0", "react-native-tab-view": "3.1.1", "react-native-toast-message": "2.0.1", "react-native-tracking-transparency": "0.1.1", "react-native-url-polyfill": "2.0.0", "react-native-uuid": "^2.0.1", "react-native-version-check": "^3.4.7", "react-native-vpn-detect": "^1.0.0", "react-native-webview": "13.10.3", "react-native-youtube-iframe": "2.1.2", "rn-qr-generator": "1.2.0", "yup": "0.32.11" }, "devDependencies": { "@babel/core": "^7.26.0", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", "@graphql-codegen/cli": "^5.0.3", "@graphql-codegen/fragment-matcher": "3.1.0", "@graphql-codegen/typescript": "2.0.0", "@graphql-codegen/typescript-apollo-client-helpers": "2.1.2", "@graphql-codegen/typescript-document-nodes": "2.0.0", "@graphql-codegen/typescript-operations": "2.0.1", "@oursky/eslint-plugin": "^8.0.0", "@react-native-community/cli": "15.1.2", "@react-native-community/cli-platform-android": "15.1.2", "@react-native-community/cli-platform-ios": "15.1.2", "@react-native/babel-preset": "0.76.3", "@react-native/codegen": "0.76.3", "@react-native/eslint-config": "0.76.3", "@react-native/metro-config": "0.76.3", "@react-native/typescript-config": "0.76.3", "@types/jest": "^26.0.23", "@types/numeral": "2.0.2", "@types/qrcode": "1.4.1", "@types/react": "^18.2.6", "@types/react-native": "0.70.8", "@types/react-native-push-notification": "8.1.1", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/parser": "5.62.0", "babel-jest": "^29.6.3", "babel-plugin-import-rename": "1.0.1", "csv-parser": "3.0.0", "eslint": "8.38.0", "eslint-plugin-import": "2.29.1", "jest": "^29.6.3", "jetifier": "^2.0.0", "json-stable-stringify": "^1.0.1", "prettier": "2.8.8", "react-native-config-node": "0.0.3", "react-native-svg-transformer": "1.4.0", "react-test-renderer": "18.3.1", "typescript": "5.0.4" }, "resolutions": { "@types/react": "^17", "crypto-js": "^4.2.0", "@babel/traverse": "^7.25.1", "braces": "3.0.3", "fast-xml-parser": "4.4.1", "micromatch": "4.0.8", "send": "0.19.0", "serve-static": "1.16.0", "ws": "6.2.3" }, "jest": { "preset": "react-native", "moduleFileExtensions": [ "ts", "tsx", "js", "jsx", "json", "node" ], "transformIgnorePatterns": [ "jest-runner" ], "setupFiles": [ "./src/setupTests.ts" ], "collectCoverage": true, "collectCoverageFrom": [ "./src/**/.{ts,tsx}" ], "coveragePathIgnorePatterns": [ ".\.d\.ts", "__.__" ] }, "engines": { "node": ">=18" }, "packageManager": "[email protected]" }

Ryan82012993 avatar Nov 27 '24 07:11 Ryan82012993

Got it! This issue seems related to package caching on your system. Please ensure that the required files are present in your node_modules folder. If they are missing, try the following steps:

  1. Delete yarn.lock or package-lock.json (depending on your package manager).
  2. Delete the node_modules folder.
  3. Run yarn install or npm install to reinstall the dependencies.

image

SolankiYogesh avatar Nov 27 '24 07:11 SolankiYogesh

Got it! This issue seems related to package caching on your system. Please ensure that the required files are present in your node_modules folder. If they are missing, try the following steps:

  1. Delete yarn.lock or package-lock.json (depending on your package manager).
  2. Delete the node_modules folder.
  3. Run yarn install or npm install to reinstall the dependencies.

image

not luckly,I have this file 💔,and I've already tried that image

Ryan82012993 avatar Nov 27 '24 07:11 Ryan82012993

Can you share screenshot which errors you are facing

SolankiYogesh avatar Nov 27 '24 07:11 SolankiYogesh

Can you share screenshot which errors you are facing

i facing this error when build app image

Ryan82012993 avatar Nov 27 '24 07:11 Ryan82012993

Bro i also added example with package can you try once because everything is working fine from my end i tested again with new project

SolankiYogesh avatar Nov 27 '24 08:11 SolankiYogesh

https://github.com/SolankiYogesh/New-Arch-Package-Testing-Repo

also you can check this example or share your repro if its not private

SolankiYogesh avatar Nov 27 '24 08:11 SolankiYogesh

@SolankiYogesh hi bro I found the problem, you can try to install react-native-reanimated, this will make splash screen error But I don't know how to fix it, okay

Ryan82012993 avatar Dec 02 '24 09:12 Ryan82012993

    "react-native-reanimated": "^3.16.3",
    "react-native-splash-screen": "https://github.com/SolankiYogesh/react-native-splash-screen#master",

see i am using this version and its working completely fine can you explain more about error which you are facing.

SolankiYogesh avatar Dec 02 '24 09:12 SolankiYogesh

Hi bro @SolankiYogesh I have check in v0.77+ on ios not working this is the error return when i run in ios I have clean & rebuild try to delete the node_modules also install the pods after deleting but could not help

AppDelegate.swift file import UIKit import React import React_RCTAppDelegate import ReactAppDependencyProvider import react_native_splash_screen @main class AppDelegate: RCTAppDelegate { override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { self.moduleName = "klipzy" self.dependencyProvider = RCTAppDependencyProvider()

// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = [:]
react_native_splash_screen.RNSplashScreen.show() 
return super.application(application, didFinishLaunchingWithOptions: launchOptions)

}

override func sourceURL(for bridge: RCTBridge) -> URL? { self.bundleURL() }

override func bundleURL() -> URL? { #if DEBUG RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") #else Bundle.main.url(forResource: "main", withExtension: "jsbundle") #endif } }

error no such module 'react_native_splash_screen' error Failed to build ios project. "xcodebuild" exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening 'MyAppTemplate.xcworkspace'.

mshery avatar Jan 31 '25 22:01 mshery

Ok i will check today

SolankiYogesh avatar Feb 01 '25 04:02 SolankiYogesh

This repo doesn't seems to be maintained yet (last commit in 2021...). Maybe consider to move to another similar active library, ex: https://github.com/zoontek/react-native-bootsplash

a389216 avatar Feb 04 '25 14:02 a389216

Hi @SolankiYogesh are you able to reproduce & find a fix for it @a389216 Yes we know but the bootsplash does not support the full screen background image they only support the logo & background color If we have a splash screen where some extra information as well then we not use bootsplash in that case that's why we use react-native-splash-screen So now the architecture update for the react native & we also need to updated as well

Peoples already request for the background image support in bootsplash but they still in under discussion https://github.com/zoontek/react-native-bootsplash/issues/652

mshery avatar Feb 06 '25 07:02 mshery

Hi @mshery Try this once like above

// ${your_project_name}-Bridging-Header.h
#import "RNSplashScreen.h"
// AppDelegate.swift
RNSplashScreen.show()

tinker-dev-monk avatar Feb 20 '25 15:02 tinker-dev-monk

🚀 Consider Using react-native-splash-view Instead!

Hey there! 👋 If you're facing issues with AppDelegate changes in React Native 0.76+, you might want to try [react-native-splash-view] instead!

Why switch to react-native-splash-view?

  • Fully compatible with React Native 0.76+, including Swift-based AppDelegate.
  • No extra hassle—works smoothly with both Objective-C & Swift projects.
  • Simple integration with iOS storyboard splash screens & Android launch screens.
  • Lightweight & actively maintained for the latest React Native versions.

Check it out & give it a try! 🚀✨

jagnesh avatar Feb 24 '25 13:02 jagnesh