React Native / App Store Connect: ITMS-90809: Deprecated API Usage - ios

When I upload my app to the app store, I get a mail from the apple:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview)
I am unable to understand which is the problem causing library in my code. If anyone would help me in figuring out the problem causing library, I'll be really thankful. When I run: grep -r UIWebView ./* Here is what happens My package.json:
{
"name": "MyApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"#expo/ex-navigation": "^3.1.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"firebase": "^4.6.2",
"lodash": "^4.17.10",
"moment": "^2.22.1",
"prop-types": "^15.6.0",
"react": "16.0.0",
"react-native": "^0.55.0",
"react-native-datepicker": "^1.7.2",
"react-native-email": "^1.0.2",
"react-native-firebase": "^5.2.3",
"react-native-loading-spinner-overlay": "^0.5.2",
"react-native-step-indicator": "0.0.7",
"react-native-swipe-list-view": "^3.2.5",
"react-native-vector-icons": "^4.4.2",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-eslint": "^8.0.3",
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"eslint": "^4.12.1",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-react-native": "^3.2.0",
"jest": "21.2.1",
"react-native-dotenv": "^0.1.0",
"react-test-renderer": "16.0.0"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"js/assets/fonts"
]
}
}

Related

React Native: Starting IOS app size is 558.7MB, is this normal?

The default files generated from npx react-native init {file_name} resulted in a 558.7MB app. This app is running on a physical device. Its also using typescript, but I don't think that should have that much of an effect. I have created react native apps in the past before but they were never this big, has something changed? Is this size normal now?
package.json
{
"name": "-------",
"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 . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"react": "18.1.0",
"react-native": "0.70.6"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"#tsconfig/react-native": "^2.0.2",
"#types/jest": "^26.0.23",
"#types/react": "^18.0.21",
"#types/react-native": "^0.70.6",
"#types/react-test-renderer": "^18.0.0",
"#typescript-eslint/eslint-plugin": "^5.37.0",
"#typescript-eslint/parser": "^5.37.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "0.72.3",
"react-test-renderer": "18.1.0",
"typescript": "^4.8.3"
},
"jest": {
"preset": "react-native",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
}

TypeError: property is not configurable, js engine: hermes

spent ages on this error today and cannot figure it out at all.
It was working fine and then I installed nativewind
Now, I keep getting the following errors after running npm run ios:
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication().
Module has not been registered as callable.
Registered callable JavaScript modules (n = 11):
Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter,
RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an
early initialization error when loading React Native., js engine: hermes
My babel.config.js:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['nativewind/babel', 'react-native-reanimated/plugin'],
};
My package.json:
{
"name": "myapp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios --simulator='iPhone 13'",
"start": "react-native start",
"test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"link": "react-native link"
},
"dependencies": {
"#eva-design/eva": "^2.1.1",
"#react-native-async-storage/async-storage": "^1.17.10",
"#react-native-community/blur": "^4.2.0",
"#react-native-community/masked-view": "^0.1.11",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/drawer": "^6.5.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"#stripe/stripe-react-native": "^0.19.0",
"#supabase/supabase-js": "^2.0.0",
"#ui-kitten/components": "^5.1.2",
"#ui-kitten/metro-config": "^5.1.2",
"base-64": "^1.0.0",
"base64-arraybuffer": "^1.0.2",
"moment": "^2.29.4",
"nativewind": "^2.0.11",
"postcode": "^5.1.0",
"react": "18.1.0",
"react-hook-form": "^7.36.1",
"react-native": "0.70.0",
"react-native-actions-sheet": "^0.8.8",
"react-native-compressor": "^1.6.1",
"react-native-draggable-grid": "^2.1.6",
"react-native-gesture-handler": "^2.1.1",
"react-native-image-picker": "^4.10.0",
"react-native-linear-gradient": "^2.6.2",
"react-native-reanimated": "^2.13.0",
"react-native-reanimated-carousel": "^3.0.6",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.17.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "^13.4.0",
"react-native-toast-message": "^2.1.5",
"react-native-url-polyfill": "^1.3.0",
"use-debounce": "^8.0.4",
"zustand": "^4.1.1"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"#tsconfig/react-native": "^2.0.2",
"#types/jest": "^26.0.23",
"#types/react-native": "^0.70.0",
"#types/react-test-renderer": "^18.0.0",
"#types/react-timeago": "^4.1.3",
"#typescript-eslint/eslint-plugin": "^5.37.0",
"#typescript-eslint/parser": "^5.37.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.72.1",
"react-test-renderer": "18.1.0",
"tailwindcss": "^3.2.4",
"typescript": "^4.8.3"
},
"jest": {
"preset": "react-native",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
}
I have tried:
restarting my machine
npm start -- --reset-cache
cd ios pod install
uninstalling nativewind (even when uninstalled, the error now persists, so I can't get back to my working version beforehand)

Next.js Hot Reload doesn't work inside docker project with WSL2 Windows

I am running a docker-based next.js project. All development is done inside of the a dev container (docker). It uses the WSL2 and dockerDesktop. My system is windows 11. The problem is the hot reload of next.js doesn't work. When I made changes on saving, the next.js app didn't detect changes. This results in constantly refreshing the server with (npm run dev) so I can view my changes.
I put the project on the desktop on my Windows 11. In the WSL2, I can find the project folder is in
/mnt/c/Users/liang/OneDrive/Desktop/open_source/frontend
Below is my envioment
Package.json
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 4000",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "jest",
"test.watch": "jest --watch",
"db.clear": "mongosh \"mongodb://localhost:27017/ramses?readPreference=primary&ssl=false\" --eval 'db.dropDatabase(\"ramses\")'",
"db.init": "mongosh \"mongodb://localhost:27017/ramses?readPreference=primary&ssl=false\" .submodules/ecommerce/db/nosql/*"
},
"dependencies": {
"#babel/cli": "7.16.0",
"#babel/core": "7.16.5",
"#elastic/elasticsearch": "^8.2.1",
"#elastic/react-search-ui": "^1.13.0",
"#elastic/react-search-ui-views": "^1.13.0",
"#elastic/search-ui": "^1.12.1",
"#elastic/search-ui-app-search-connector": "^1.13.0",
"#elastic/search-ui-elasticsearch-connector": "^1.14.0",
"#headlessui/react": "^1.6.4",
"#heroicons/react": "^1.0.6",
"#hookform/resolvers": "^2.8.8",
"#material-ui/core": "^4.12.3",
"#sendgrid/mail": "^7.7.0",
"#tailwindcss/forms": "^0.5.2",
"autoprefixer": "latest",
"babel-loader": "^8.2.3",
"bcryptjs": "^2.4.3",
"bl": "^5.0.0",
"browserify-fs": "^1.0.0",
"enhanced-resolve": "^5.8.3",
"eslint": "^8.6.0",
"eslint-config-next": "^12.0.7",
"follow-redirects": "^1.14.8",
"form-data": "^4.0.0",
"mailgun": "^0.5.0",
"moment": "^2.29.3",
"mongodb": "^4.7.0",
"mongoose": "^6.3.8",
"multer": "^1.4.5-lts.1",
"nanoid": "^3.2.0",
"next": "^12.1.6",
"next-auth": "^4.5.0",
"next-auth-client": "^1.5.0",
"next-connect": "^0.12.2",
"next-i18next": "^11.0.0",
"node-fetch": "^3.2.6",
"nodemailer": "^6.7.2",
"nodemon": "^2.0.16",
"object-keys": "^1.1.1",
"path-browserify": "^1.0.1",
"postcss": "^8.4.12",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.25.0",
"react-responsive-carousel": "^3.2.22",
"react-table": "^7.7.0",
"react-test-renderer": "17.0.2",
"react-toastify": "^8.2.0",
"semver": "^7.3.5",
"sharp": "^0.30.5",
"stripe": "^9.5.0",
"tailwind-styled-components": "^2.1.7",
"tailwindcss": "^3.1.3",
"typescript": "^4.7.3",
"uuid": "^8.3.2",
"webpack": "^5.73.0",
"yup": "^0.32.11"
},
"devDependencies": {
"#testing-library/jest-dom": "5.14.1",
"#testing-library/react": "12.1.2",
"babel-jest": "27.3.1",
"identity-obj-proxy": "3.0.0",
"jest": "27.3.1"
}
}

Issue using rn-nodeify in React-native project

I am developing a mobile app using React native, which involves an interaction with Meta1.js
and Problem is RN does not support core Node.js modules, so I had to install react-native-crypto, react-native-randombytes, rn-nodeify and run ./node_modules/.bin/rn-nodeify --hack --install I actually followed this docs
but I end-up with that error
I also tried to install node, clean the cache, delete watchman, and none of that worked for me, and when I run yarn ios the app crash (build failed)
This is the package.json
"scripts": {
"android": "react-native run-android",
"postinstall": "rn-nodeify --install fs,dgram,process,path,console --hack",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#react-native-community/masked-view": "^0.1.10",
"#react-navigation/bottom-tabs": "^5.11.8",
"#react-navigation/native": "^5.9.3",
"#react-navigation/stack": "^5.14.3",
"#tradle/react-native-http": "^2.0.1",
"assert": "^1.5.0",
"browserify-zlib": "^0.1.4",
"buffer": "^4.9.2",
"console-browserify": "^1.2.0",
"constants-browserify": "^1.0.0",
"dns.js": "^1.0.1",
"domain-browser": "^1.2.0",
"https-browserify": "0.0.1",
"path-browserify": "0.0.0",
"process": "^0.11.10",
"punycode": "^1.4.1",
"querystring-es3": "^0.2.1",
"react": "17.0.1",
"react-native": "0.64.0",
"react-native-crypto": "^2.2.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-level-fs": "^3.0.1",
"react-native-modal": "^11.7.0",
"react-native-os": "^1.2.6",
"react-native-randombytes": "^3.6.0",
"react-native-reanimated": "^2.0.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^2.18.1",
"react-native-tcp": "^3.3.2",
"react-native-udp": "^2.7.0",
"react-native-vector-icons": "^8.1.0",
"readable-stream": "^1.0.33",
"rn-nodeify": "^10.2.0",
"stream-browserify": "^1.0.0",
"string_decoder": "^0.10.31",
"timers-browserify": "^1.4.2",
"tty-browserify": "0.0.0",
"url": "^0.10.3",
"vm-browserify": "0.0.4"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "7.14.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"react-test-renderer": "17.0.1"
},
"jest": {
"preset": "react-native"
},
"react-native": {
"console": "console-browserify",
"path": "path-browserify",
"fs": "react-native-level-fs",
"dgram": "react-native-udp",
"zlib": "browserify-zlib",
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "#tradle/react-native-http",
"https": "https-browserify",
"os": "react-native-os",
"querystring": "querystring-es3",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
},
"browser": {
"console": "console-browserify",
"path": "path-browserify",
"fs": "react-native-level-fs",
"dgram": "react-native-udp",
"zlib": "browserify-zlib",
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "#tradle/react-native-http",
"https": "https-browserify",
"os": "react-native-os",
"querystring": "querystring-es3",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
}
}
this my first time to ask a question on stack overflow and I hope someone will tell me what to do?

React Native ios build - modifying a file in a node_modules package

I am getting the following error during an ios build for a file that belongs to a node_modules package:
bundling failed: SyntaxError:
/Users/user148634/Desktop/mobile-ui/PriceInsight_app/node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js:
Support for the experimental syntax 'nullishCoalescingOperator' isn't
currently enabled (167:52):
According to this message, the file is in the following path:
node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js
However, I can see the file in the following path:
node_modules/react-native/Libraries/Components/Switch/Switch.js
(the folder node_modules/react-native/node_modules/react-native does not exist).
I tried to modify node_modules/react-native/Libraries/Components/Switch/Switch.js but it doesn't have any effect and I get the same error during build.
Any idea why a non-existent path is displayed? Any idea how I modify the file so that it affects the build?
Here is my package.json file:
{
"name": "newapp",
"version": "0.0.2",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest --verbose --coverage",
"test:update": "jest --verbose --coverage --updateSnapshot",
"test:watch": "jest --verbose --watch",
"coverage": "jest --verbose --coverage && xdg-open ./coverage/lcov-report/index.html",
"lint": "npx eslint --fix ./src/*"
},
"dependencies": {
"adm-zip": "^0.4.13",
"apollo-boost": "0.1.17",
"axios": "^0.18.0",
"babel": "^6.23.0",
"buffer": "5.1.0",
"cross-fetch": "^3.0.0",
"enzyme": "^3.3.0",
"fastfall": "^1.5.1",
"got": "^9.5.1",
"graphql": "0.13.2",
"graphql-tag": "2.10.0",
"jasmine-react-helpers": "^0.2.2",
"link": "^0.1.5",
"lodash": "4.17.5",
"moment": "2.21.0",
"plist": "^3.0.1",
"query-string": "^6.1.0",
"react": "16.2.0",
"react-addons-test-utils": "^15.6.2",
"react-apollo": "2.2.4",
"react-dom": "^16.7.0",
"react-native": "^0.57.0",
"react-native-elements": "0.19.0",
"react-native-fabric": "^0.5.2",
"react-native-fbsdk": "^0.6.3",
"react-native-htmlview": "^0.12.1",
"react-native-link-preview": "^1.3.5",
"react-native-login": "^0.0.1-alpha.2",
"react-native-login-keycloak": "^1.0.2",
"react-native-onesignal": "3.2.6",
"react-native-push-notification": "https://github.com/Dhanraj-bidchat/react-native-push-notification.git",
"react-native-sleek-loading-indicator": "^0.1.3",
"react-native-spinkit": "^1.1.1",
"react-native-svg": "6.2.2",
"react-native-swipe-cards": "^0.1.1",
"react-native-swiper": "1.5.13",
"react-native-vector-icons": "4.5.0",
"react-navigation": "1.5.6",
"react-redux": "5.0.7",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-persist": "5.9.1",
"redux-thunk": "^2.2.0",
"victory-native": "0.17.2",
"whatwg-fetch": "2.0.4",
"xcode": "^1.1.0"
},
"devDependencies": {
"#babel/plugin-proposal-optional-chaining": "^7.2.0",
"babel-eslint": "^8.2.3",
"babel-jest": "^22.4.4",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-preset-env": "^1.7.0",
"babel-preset-react-native": "5.0.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.3.4",
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jest": "^21.17.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-only-warn": "^1.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-react": "^7.9.1",
"eslint-plugin-standard": "^3.1.0",
"jest": "^23.5.0",
"jest-resolve": "^23.0.0",
"jest-serializer-enzyme": "^1.0.0",
"react-native-mock-render": "^0.0.26",
"react-test-renderer": "^16.3.2",
"redux-mock-store": "^1.5.1",
"sinon": "^5.0.10"
},
"jest": {
"preset": "react-native",
"setupFiles": [
"./jest-setup.js"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"modulePaths": [
"<rootDir>/src",
"<rootDir>/node_modules"
],
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.jsx?$": "babel-jest"
},
"transformIgnorePatterns": [
"node_modules/(?!(react-native-safe-area-view|react-navigation|react-native-htmlview|react-native-fabric|react-native-login|react-native-elements|react-native-vector-icons|react-native-spinkit|victory-pie|victory-chart|victory-core|react-native-svg|react-native|redux-persist|victory-native|react-native-swipe-cards|react-native-swiper)/)"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/assetsTransformer.js",
"\\.(css|less)$": "<rootDir>/assetsTransformer.js"
}
}
}
change .babelrc to
{
"presets": ["module:metro-react-native-babel-preset"]
}

Resources