I have an expo RN app that I was able to successfully upload to TestFlight last month but now is being rejected because of the AppStore's depreciation of the UIWebView version. I have removed all references of UIWebView, I have cleared the cache, I have refreshed the package-lock.json and even force removed all references with grep -r "UIWebView" . command. Nothing is working. Every time I rebuild my iOs app with Expo and then upload to TestFlight the build fails and throws this generic unhelpful error: This build is invalid.
I get an email with the below slightly more helpful message:
TMS-90809: Deprecated API Usage - New apps that use UIWebView are no
longer accepted. Instead, use WKWebView for improved security and
reliability. Learn more
I found one article saying I need to update my expo SDK version to 37 but when I do this my app breaks because I am on an old react native version (v 0.59) and they are not compatible.
I would really hate to rip apart my app, update the RN version, update the expo SDK version to only have the error persist.
Is there a way to get my app on App Store Connect without having to update my RN and expo SDK version in my app.json?
docs I have already looked through:
ITMS-90809: Deprecated API Usage -- Apple will stop accepting submissions of apps that use UIWebView APIs
https://developer.apple.com/documentation/uikit/uiwebview
app.json
{
"expo": {
"name": "companyname",
"slug": "companyname",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": ["ios", "android", "web"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/logo.png",
"splash": {
"image": "./assets/logo_original.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.companyname.companyname",
"buildNumber": "9.0.8"
},
"android": {
"package": "com.companyname.companyname",
"versionCode": 2.0,
"config": {
"googleMaps": {
"apiKey": "123"
}
},
"permissions": [
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"CAMERA",
"MANAGE_DOCUMENTS",
"READ_CONTACTS",
"READ_CALENDAR",
"WRITE_CALENDAR",
"READ_EXTERNAL_STORAGE",
"READ_PHONE_STATE",
"RECORD_AUDIO",
"USE_FINGERPRINT",
"VIBRATE",
"WAKE_LOCK",
"WRITE_EXTERNAL_STORAGE",
"com.anddoes.launcher.permission.UPDATE_COUNT",
"com.android.launcher.permission.INSTALL_SHORTCUT",
"com.google.android.c2dm.permission.RECEIVE",
"com.google.android.gms.permission.ACTIVITY_RECOGNITION",
"com.google.android.providers.gsf.permission.READ_GSERVICES",
"com.htc.launcher.permission.READ_SETTINGS",
"com.htc.launcher.permission.UPDATE_SHORTCUT",
"com.majeur.launcher.permission.UPDATE_BADGE",
"com.sec.android.provider.badge.permission.READ",
"com.sec.android.provider.badge.permission.WRITE",
"com.sonyericsson.home.permission.BROADCAST_BADGE"
]
}
}
}
package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest",
"postinstall": "node overwrite/migrate.js"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"#ptomasroos/react-native-multi-slider": "^2.0.0",
"#react-native-community/datetimepicker": "^2.2.3",
"#shoutem/ui": "^1.0.4",
"add": "^2.0.6",
"expo": "35.0.0",
"expo-cli": "^3.20.3",
"expo-constants": "^8.0.0",
"expo-device": "^2.0.0",
"expo-file-system": "^7.0.0",
"expo-image-picker": "^7.0.0",
"expo-linear-gradient": "^7.0.1",
"expo-location": "^5.0.1",
"expo-permissions": "^5.0.1",
"faker": "^4.1.0",
"firebase": "~7.0.0",
"firebase-admin": "^8.10.0",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "0.59.8",
"react-native-animatable": "^1.3.3",
"react-native-app-intro-slider": "^3.0.0",
"react-native-collapsible": "^1.5.1",
"react-native-datepicker": "^1.7.2",
"react-native-deck-swiper": "^1.6.7",
"react-native-device-info": "^5.5.3",
"react-native-draggable-flatlist": "^1.1.9",
"react-native-elements": "^1.2.6",
"react-native-flash-message": "^0.1.15",
"react-native-gesture-handler": "^1.2.2",
"react-native-gifted-chat": "^0.12.0-beta-0",
"react-native-google-places": "^3.1.2",
"react-native-google-places-autocomplete": "^1.3.9",
"react-native-image-slider-show": "^1.0.3",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-maps": "0.24.2",
"react-native-multi-slider": "^0.3.6",
"react-native-picker-select": "^6.3.3",
"react-native-screens": "^2.5.0",
"react-native-swiper-flatlist": "^2.0.3",
"react-native-vector-icons": "^6.6.0",
"react-native-view-overflow": "0.0.4",
"react-native-web": "^0.11.4",
"react-navigation": "^3.13.0",
"redux": "^4.0.4"
},
"rnpm": {
"assets": [
"utils/Fonts/"
]
},
"devDependencies": {
"babel-eslint": "^10.0.3",
"babel-plugin-module-resolver": "^3.2.0",
"babel-preset-expo": "^5.2.0",
"eslint": "^6.6.0",
"eslint-config-react": "^1.1.7",
"eslint-config-react-native": "^4.0.0",
"eslint-import-resolver-babel-module": "^5.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "0.0.0-f6b8d31a7",
"eslint-plugin-react-native": "^3.8.1",
"prettier": "^1.19.1"
},
"private": true
}
You need to update to SDK 37 to remove all dependencies on UIWebView. See this blog post for more information, in particular under the "UIWebView Removed" heading. https://blog.expo.io/expo-sdk-37-is-now-available-dd5770f066a6
Related
Maps are rendered empty while using Expo SDK 46, it was working perfectly in previous SDK versions, my Google API Keys are set and all required APIs are enabled. It just shows a blank map with the Google Logo
Here is my package.json
{
"name": "my-app",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#expo-google-fonts/nunito": "^0.2.2",
"#react-navigation/bottom-tabs": "^6.3.2",
"#react-navigation/core": "^6.2.2",
"#react-navigation/native": "^6.0.11",
"#react-navigation/native-stack": "^6.7.0",
"axios": "^0.27.2",
"expo": "~46.0.7",
"expo-app-loading": "~2.1.0",
"expo-location": "~14.3.0",
"expo-secure-store": "^11.3.0",
"expo-status-bar": "~1.4.0",
"firebase": "8.2.3",
"lottie-react-native": "5.1.3",
"moment": "^2.29.4",
"react": "18.0.0",
"react-native": "0.69.4",
"react-native-bouncy-checkbox": "^3.0.2",
"react-native-check-box": "2.1.7",
"react-native-dropdown-picker": "^5.4.2",
"react-native-gesture-handler": "^2.5.0",
"react-native-google-places-autocomplete": "^2.4.1",
"react-native-maps": "^0.31.1",
"react-native-maps-directions": "^1.9.0",
"react-native-modal-datetime-picker": "^13.1.2",
"react-native-safe-area-context": "^4.3.1",
"react-native-svg-transformer": "^1.0.0",
"react-native-vector-icons": "^9.2.0",
"react-native-webview": "11.23.0"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
I am also facing the same problem with Expo SDK 46, The maps rendered are blank with only the Google Logo. Migrating back to Expo 44 was the only option which worked for me
I'm trying to get Jest working with the TypeORM Expo-Example project
I've done a lot to try to get either ts-jest as well as expo-jest working. I have followed official guides for both Jest and Expo Jest. I was able to expo init a new empty project (not the TypeORM example) and get Expo-Jest working as expected, but when I to apply the changes to the TypeORM expo project, it ran into issues.
I think expo-jest is preferred. It will probably be easier to start from a clean clone of the TypeORM Expo-Example repo.
I've edited the package.json to a version that shouldn't have dependency issues if it is an easier starting point. (the jest stuff can be modified or removed in favor of separate config)
{
"name": "expo-example",
"version": "0.1.0",
"private": true,
"devDependencies": {
"#babel/core": "^7.18.0",
"#babel/preset-env": "^7.18.0",
"#types/jest": "^27.5.1",
"#types/node": "^10.1.3",
"#types/react": "~17.0.21",
"#types/react-native": "~0.67.6",
"#types/react-test-renderer": "^16.0.1",
"babel-plugin-transform-typescript-metadata": "^0.3.2",
"jest": "27",
"jest-expo": "^45.0.1",
"react-native-typescript-transformer": "^1.2.9",
"react-test-renderer": "17",
"typescript": "^4.6.4"
},
"scripts": {
"start": "expo start --dev-client",
"eject": "expo eject",
"android": "expo run:android",
"ios": "expo run:ios",
"test": "jest",
"postinstall": "patch-package"
},
"jest": {
"preset": "jest-expo",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"transform": {
"^.+\\.(js)$": "<rootDir>/node_modules/babel-jest",
"\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"testPathIgnorePatterns": [
"\\.snap$",
"<rootDir>/node_modules/"
],
"cacheDirectory": ".jest/cache",
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|#react-native(-community)?)|expo(nent)?|#expo(nent)?/.*|#expo-google-fonts/.*|react-navigation|#react-navigation/.*|#unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
]
},
"dependencies": {
"babel-jest": "27",
"expo": "^45.0.0",
"expo-splash-screen": "~0.15.1",
"expo-sqlite": "~10.2.0",
"expo-status-bar": "~1.3.0",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.1",
"react-native-sqlite-storage": "^4.1.0",
"react-native-web": "0.17.7",
"reflect-metadata": "^0.1.13",
"ts-jest": "27",
"tslib": "^1.9.1",
"typeorm": "^0.3.6"
}
}
I have the same issue, my problem is an error when i try test the return of getConnection() typeorm function or DataSource({...}).initialize() with expo-sqlite driver... to make it work i use slite3 lib instead expo-sqlite... so it work, see: https://github.com/EmanuelVogt/expo-sqlite-typeorm-jest
I have created an app in React Native / Expo. It works fine during development but is crashing when I create a standalone app (expo build:android)
The splash screen gets displayed and then directly the app crashes.
This is not an issue of the Expo CLI, because I tried to build other apps and they seem to work fine.
My package.json file
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#bugsnag/expo": "^7.12.0",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/hooks": "^2.6.0",
"#react-native-community/netinfo": "6.0.0",
"#react-navigation/bottom-tabs": "^5.11.13",
"#react-navigation/native": "^5.9.6",
"#react-navigation/stack": "^5.3.5",
"apisauce": "^2.1.1",
"dayjs": "^1.10.6",
"expo": "~42.0.1",
"expo-blur": "~9.0.3",
"expo-constants": "^11.0.1",
"expo-image-picker": "~10.2.2",
"expo-jwt": "^1.4.1",
"expo-location": "~12.1.2",
"expo-notifications": "~0.12.3",
"expo-secure-store": "~10.2.0",
"expo-status-bar": "~1.0.4",
"formik": "^2.1.4",
"jwt-decode": "^3.1.2",
"jwt-encode": "^1.0.1",
"lottie-react-native": "4.0.2",
"moment": "^2.29.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-expo-image-cache": "^4.1.0",
"react-native-gesture-handler": "~1.10.2",
"react-native-image-slider-banner": "^1.0.2",
"react-native-image-slider-box": "^1.1.22",
"react-native-image-slider-with-text": "^1.0.0",
"react-native-pager-view": "5.0.12",
"react-native-progress": "^4.1.2",
"react-native-reanimated": "~2.2.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-scrollable-tab-view": "^1.0.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-tab-view": "^3.1.1",
"react-native-web": "~0.13.12",
"yup": "^0.28.5"
},
"devDependencies": {
"#babel/core": "^7.9.0"
},
"private": true
}
And my app.json
{
"expo": {
"name": "xxx",
"slug": "xxx",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./app/assets/icon.png",
"splash": {
"image": "./app/assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"extra": {
"bugsnag": {
"apiKey": "dff242972ecc8c9bbe9d5f36fac4d2d9"
}
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier" : "com.xxx.xx",
"buildNumber" : "1.0.0"
},
"android": {
"package" : "com.xxx.xx",
"versionCode" : 1,
"adaptiveIcon": {
"foregroundImage": "./app/assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./app/assets/favicon.png"
},
"description": ""
}
}
============ UPDATED SECTION ==================
I have google search for the solution and made some modification then I ran into another problem after running
expo start --no-dev --minify
I ran into few more issue
Sometime it throw
-- Failed to load all asset
-- Sometime I get ..Could not connect to development server.
Can somebody please help me to figure out this issue.
Thank you
This question already has answers here:
node_modules/expo/AppEntry.js: Transformer.transform is not a function
(3 answers)
Closed 2 years ago.
I have recently upgraded to the latest expo SDK version 38 from 36, and I have been having javascript build error. I have upgraded the SDK with expo upgrade and by running npm install to install the dependencies. Thanks for your help in advance.
Error: Building JavaScript bundle: error: node_modules/expo/AppEntry.js: Transformer.transform is not a function
package.json:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"lint": "eslint src -c .eslintrc.json --ext js,jsx"
},
"dependencies": {
"#react-navigation/native": "^5.0.0-alpha.22",
"#use-expo/font": "^2.0.0",
"expo": "^38.0.0",
"expo-constants": "~9.1.1",
"expo-contacts": "~8.2.1",
"expo-image-picker": "~8.3.0",
"expo-local-authentication": "~9.1.1",
"expo-notifications": "~0.3.3",
"expo-permissions": "~9.0.1",
"expo-sms": "~8.2.1",
"lodash.debounce": "^4.0.8",
"lodash.memoize": "^4.1.2",
"lodash.orderby": "^4.6.0",
"lottie-react-native": "~2.6.1",
"mem": "^6.0.1",
"moment": "^2.24.0",
"react": "16.11.0",
"react-dom": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-animatable": "^1.3.3",
"react-native-elements": "^1.2.7",
"react-native-gesture-handler": "~1.6.0",
"react-native-keyboard-accessory": "^0.1.10",
"react-native-modal": "^11.5.3",
"react-native-reanimated": "^1.9.0",
"react-native-screens": "^2.9.0",
"react-native-smooth-pincode-input": "^1.0.9",
"react-native-svg": "^12.1.0",
"react-native-vector-icons": "^7.0.0",
"react-native-web": "~0.11.7",
"react-navigation": "^4.0.10",
"react-navigation-stack": "1.10.3",
"react-navigation-tabs": "^2.7.0",
"react-redux": "^7.1.3",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"#babel/core": "^7.0.0",
"babel-preset-expo": "^8.2.3",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-node": "^4.0.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^1.7.0",
"husky": "^3.1.0",
"metro": "^0.61.0",
"prettier": "^1.19.1"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"private": true
}
app.json:
{
"expo": {
"name": "Wif",
"slug": "wif",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
I am not 100% sure but I think it has to do with the metro configuration.
Try this package https://www.npmjs.com/package/#expo/metro-config
I can't run my app using expo android application. My device working on Android Pie (8).
Expo android app version: 2.11.10
I trying run application on another device but have the same issue
error screen
27.0.0 is not a valid SDK Version. Option are 31.0.0, 32.0.0, 33.0.0 Unversioned
my package.json looks as below:
{
"name": "project",
"version": "0.1.0",
"private": true,
"devDependencies": {
"#types/jest": "^23.1.0",
"#types/react": "^16.4.1",
"#types/react-dom": "^16.0.6",
"#types/react-native": "^0.55.21",
"#types/react-navigation": "^2.0.5",
"#types/react-redux": "^6.0.2",
"#types/react-test-renderer": "^16.0.1",
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-native-typescript-transformer": "^1.2.10",
"react-test-renderer": "16.3.1",
"tslib": "^1.9.2",
"typescript": "^2.9.2"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#types/expo": "^27.0.3",
"#types/lodash": "^4.14.116",
"axios": "^0.18.0",
"expo": "^27.0.1",
"lodash": "^4.17.11",
"native-base": "^2.5.2",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
"react-native-animatable": "^1.3.0",
"react-native-maps": "^0.21.0",
"react-native-navigation": "^1.1.486",
"react-native-router-flux": "^4.0.0-beta.31",
"react-native-swipe-gestures": "^1.0.2",
"react-navigation": "^2.7.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-saga": "^0.16.0"
}
}
app.json looks like:
{
"expo": {
"name": "Tream",
"slug": "Tream",
"version": "1.0.0",
"orientation": "portrait",
"sdkVersion": "27.0.0",
"icon": "./src/assets/icon.png",
"splash": {
"image": "./src/assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"android": {
"package": "com.treamcompany.tream"
},
"packagerOpts": {
"sourceExts": ["ts", "tsx"],
"transformer": "node_modules/react-native-typescript-transformer/index.js"
}
}
}
You need to update your expo version:
npm install (for node module)
expo update
npm install react-native-gesture-handler --save
npm start
I had the same issue but i run the above commands and got the output
You can see the explanation for why this happened here: https://blog.expo.io/updated-expo-client-available-on-app-store-and-play-store-8747bd3a1364
For me the solution was:
"in your app.json and package.json files the sdk version should be the same"
"expo": {
"name": "ThirdReactApp",
"slug": "Third-React-App",
"privacy": "public",
"sdkVersion": "33.0.0",
"platforms": [
"ios",
"android"
],
"dependencies": {
"expo": "^34.0.1",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-web": "^0.11.4"
},
The Expo client on your device is probably uptodate and fine but its the app (project) that you are trying to load thats outdated. You simply need to update your app (project) to a more recent and more compatible sdk. That said, follow the instructions on this website for a step by step guide on how to do this.
https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough/
For 27.0.0,You can use Expo apk 2.10.6
https://d1ahtucjixef4r.cloudfront.net/Exponent-2.10.6.apk