App is working fine in Android Device after production
and its working fine on ios expo. but when i create .ipa file for production and test app via testflight its stuck on white screen.
so app store is keep showing me this reult.
I am Attaching my App.js code
import React, { useCallback, useEffect, useState } from 'react';
import { createStackNavigator } from '#react-navigation/stack';
import { NavigationContainer } from '#react-navigation/native';
import * as SplashScreen from 'expo-splash-screen';
import { Button, Text,BackHandler, View,TouchableOpacity,StyleSheet,Image,ActivityIndicator,StatusBar,AsyncStorage } from 'react-native';
import Navigations from './Navigations'
const Stack = createStackNavigator();
function App() {
useEffect(() => {
function prepare() {
SplashScreen.hideAsync();
// Pre-load fonts, make any API calls you need to do here
}
prepare();
}, []);
return (
<NavigationContainer>
<Navigations>
</Navigations>
</NavigationContainer>
);
}
export default App;
Now my 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"
},
"dependencies": {
"#react-native-community/datetimepicker": "^3.5.2",
"#react-navigation/material-bottom-tabs": "^6.0.9",
"#react-navigation/native": "^6.0.6",
"#react-navigation/native-stack": "^6.2.5",
"#react-navigation/stack": "^6.0.11",
"#redmin_delishaj/react-native-select": "^1.0.6",
"#stripe/stripe-react-native": "0.2.2",
"#unimodules/core": "~7.2.0",
"#unimodules/react-native-adapter": "~6.5.0",
"expo": "^43.0.0",
"expo-apple-authentication": "^4.0.3",
"expo-av": "^10.1.2",
"expo-document-picker": "^10.0.3",
"expo-facebook": "^12.0.3",
"expo-google-app-auth": "~9.0.0",
"expo-image-picker": "^11.0.3",
"expo-permissions": "^13.0.3",
"expo-splash-screen": "~0.13.5",
"expo-status-bar": "^1.1.0",
"i": "^0.3.7",
"install": "^0.13.0",
"moment": "^2.29.1",
"nodemon": "^2.0.15",
"npm": "^8.1.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-credit-card-input": "^0.4.1",
"react-native-customizable-checkbox": "^1.0.14",
"react-native-dropdown-picker": "^5.2.3",
"react-native-image-overlay": "^0.1.2",
"react-native-image-pan-zoom": "^2.1.12",
"react-native-image-slider-box": "^1.1.9",
"react-native-image-viewing": "^0.2.1",
"react-native-keyboard-aware-scroll-view": "^0.9.4",
"react-native-material-menu": "^1.2.0",
"react-native-paper": "^4.9.2",
"react-native-pull-to-refresh": "^2.1.3",
"react-native-ratings": "^8.1.0",
"react-native-render-html": "^6.3.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-swiper-flatlist": "^3.0.15",
"react-native-vector-icons": "^9.0.0",
"react-native-video-controls": "^2.8.1",
"react-native-web": "0.17.1",
"react-native-webview": "11.13.0"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
and i am posting reply from App store
Guideline 2.1 - Performance - App Completeness
We continue to run into the same bug in your app. Specifically, your app keeps launching to a blank screen and no further content loads. Please review the details below and complete the next steps.
Review device details:
Device type: iPhone and iPad
OS version: iOS 15.1
Next Steps
Please run your app on a device to reproduce the issues, then revise and submit your app for review. If at first you're unable to reproduce the issue, try the following:
For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce.
For app updates, install the new version as an update to the previous version, then follow the steps to reproduce.
If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.
Actual Screen shot from ios Device
I am having this issue too but I believe one of my changes fixed and then introduced it. Check out your “main”: and “metro.config.js” if you have one, expo is picky in their structured workflows.
Might also be missing linked react native packages, react-native-svg makes me want to never use svgs in expo
Related
We have built a webview app in React Native and we have published it to the app store. We are facing a major bug where if you use the app, then leave it for a significant amount of time and go back to it, it will just give you a blank white screen
Has anyone experienced this before or have a solution? Let me know if you need to see any more of our code
Package.json
{
"name": "------",
"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",
"eject": "expo eject"
},
"dependencies": {
"expo": "~44.0.0",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-error-boundary": "^1.1.12",
"react-native-web": "0.17.1",
"react-native-webview": "11.15.0"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
I'm receiving the following error when running react native app using expo on IPhone (on android it's working correctly)
An image of the error is attached.
In addition, this is 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": {
"#expo/vector-icons": "^12.0.4",
"#react-native-community/masked-view": "^0.1.10",
"axios": "^0.21.1",
"expo": "~40.0.0",
"expo-app-loading": "^1.0.1",
"expo-font": "^9.0.0",
"expo-status-bar": "~1.0.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.0.1",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "^2.18.1",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.4",
"react-navigation-header-buttons": "^7.0.0",
"react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.3",
"redux": "^4.0.5"
},
"devDependencies": {
"#babel/core": "^7.9.0" },
"private": true
}
Any idea will be appreciated.
you have two versions of react-native-safe-area-context installed in your app. remove react-native-safe-area-context from your dependencies and run expo install react-native-safe-area-context
In this link you can find the solution approved by a collaborator.
In my case, problem persisted and I did as suggested in the link above but I skip steps 2 and 5. I kept expo version in 4.1.0.
delete node_modules and your lockfile (package-lock.json /
yarn.lock)
change the expo package version in package.json to 38.0.8
remove react-native-safe-area-context from your package.json
run yarn or npm install
run expo install react-native-safe-area-context
try running
cd ios && pod install
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"
},
"dependencies": {
"#react-native-community/masked-view": "^0.1.10",
"#react-native-firebase/app": "^8.4.2",
"#react-navigation/native": "^5.6.1",
"#react-navigation/stack": "^5.6.2",
"expo": "^39.0.3",
"expo-ads-admob": "~8.3.0",
"expo-av": "~8.6.0",
"expo-image-picker": "~9.1.0",
"expo-status-bar": "^1.0.0",
"expo-web-browser": "~8.5.0",
"firebase": "7.9.0",
"lottie-react-native": "~2.6.1",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "^0.63.3",
"react-native-appearance": "~0.3.3",
"react-native-dark-mode": "^0.2.2",
"react-native-elements": "^2.3.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-hide-show-password-input": "^1.1.0",
"react-native-material-ripple": "^0.9.1",
"react-native-paper": "^4.0.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.9.0",
"react-native-tts": "^3.2.0",
"react-native-vector-icons": "^7.1.0",
"react-native-web": "~0.11.7",
"react-navigation": "^4.4.0",
"react-navigation-stack": "^2.8.2",
"yarn": "^1.22.10"
},
"devDependencies": {
"#babel/core": "^7.8.6",
"#types/react": "~16.9.41",
"#types/react-native": "~0.62.13",
"typescript": "~3.9.5"
},
"private": true
}
This is Package.json of my project in react native. How to install cocoa pods in this project I read somewhere that when using expo dependencies in the project you can't install cocoapods in the project so how to install cocoa pods when using expo dependencies
You just can't install cocoa pods when using expo, that simple. If you need some library from react native community that needs to install cocoa pods, you just can't use it unless expo made its own. You can check if that library is available for expo here: https://docs.expo.io/versions/latest/
Almost everything from react native community has its own expo version if needed.
To install, use $ expo install <module-name>.
You should use expo bare workflow if you want to add react native librairies which are not included in expo client already.
With Expo bare workflow you can still use expo modules like expo-ad-mobs and even expo client if you have some fail over strategy for your newly added librairies.
https://docs.expo.io/bare/exploring-bare-workflow/
But you will have to build the app yourself, while expo managed workflow lets you use expo cli & infrastructure to build your ipa/apk.
If you just want to build the app and not add any other library, just use expo cli commands like expo build:ios
Problem
I get the error "Cannot read property 'State' of undefined" when trying to use a stack navigator in React Navigation. Switch and bottomTabNavs are working perfectly fine.
If anyone knows how to solve this problem that would be amazing!
What I've tried
I've already checked to make sure react-native-gesture-handler is installed and linked properly.
My Package.json:
{
"name": "app",
"version": "5.1.0",
"private": true,
"devDependencies": {
"babel-jest": "23.6.0",
"fs-extra": "^6.0.1",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.7.0",
"reactotron-react-native": "^3.2.0",
"replace-in-file": "^3.4.2"
},
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios --simulator=\"iPhone X\"",
"apk": "cd android && ./gradlew assembleRelease",
"rename": "node ./bin/rename.js",
"start": "react-native start",
"test": "jest"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"axios": "^0.18.0",
"lodash": "^4.17.11",
"react": "16.6.3",
"react-native": "0.58.0-rc.2",
"react-native-firebase": "^5.2.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-rate": "^1.1.6",
"react-native-sensitive-info": "5.2.9",
"react-native-splash-screen": "^3.2.0",
"react-native-status-bar-height": "^2.3.1",
"react-native-table-component": "^1.2.0",
"react-navigation": "^3.3.2"
}
}
The issue was that the pod file was not installed even though react-native link indicated the package was successfully linked.
To solve the issue follow these steps:
cd ios
Pod install
Clean ios folder
Run application
I'm working on an Ionic 3 project which currently runs fine on a connected iOS device (with the ionic cordova run ios --device command), and builds both with the Ionic CLI and in Xcode.
However, when I attempt to run on my device through Xcode, it hangs on the startup screen and I see the below error(s) in the Xcode console. This behavior also occurs on the beta build I currently have on TestFlight- so I don't think it's restricted to my environment.
2017-08-11 10:42:15.996743-0400 MyApp[11551:3839240] libMobileGestalt MobileGestaltSupport.m:153: pid 11551 (MyApp) does not have sandbox access for <deviceID?> and IS NOT appropriately entitled
2017-08-11 10:42:15.996819-0400 MyApp[11551:3839240] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
This error brings up a lot of results on Google and StackOverflow, but I haven't been able to find a resolution. There is a recent SO question with an answer specifically related to Ionic, but the step there (running npm install) didn't help
It seems to be related to plugins in the project & perhaps their permissions, however I want to be clear that I've setup the App ID on the Apple Developer site properly, enabled Push Services for both Dev and Distribution, and associated the App ID to a Dev Provisioning Profile and a Distribution Provisioning Profile.
I have this developer account associated to Xcode, and am signing the build with the account that has the App ID and other setup I just described. Push notifications (and everything else) work fine for me when running on my dev device.
My hunch is this is somehow related to the Push plugin I'm using in combination with a build/project option, but I do have the APS entitlement in my project config, as well as the Push Capability set to ON in the project.
The error message itself references an OpenRadar issue, but nothing on that page really helps. I took a look at my Info.plist file as one user mentioned, but I can't find any settings that might be related to this issue. There is an App Transport Security Settings dictionary with allowed domains, however I don't see how that'd be the issue because I can't even run on my dev device which is in the allowed domains.
I'm using Xcode 8.3.3 and attempting to build to a device on iOS 10.3. My Ionic info and package.json:
cli packages: (/Users/david/Source/sideline-app/node_modules)
#ionic/cli-plugin-cordova : 1.6.2
#ionic/cli-plugin-ionic-angular : 1.4.1
#ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
Android SDK Tools : 25.2.5
Node : v7.4.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 6.0.0
npm : 4.0.5
package.json
{
"name": "MyApp",
"version": "0.0.1",
"author": "AppAuthor",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/common": "4.1.3",
"#angular/compiler": "4.1.3",
"#angular/compiler-cli": "4.1.3",
"#angular/core": "4.1.3",
"#angular/forms": "4.1.0",
"#angular/http": "4.1.0",
"#angular/platform-browser": "4.1.0",
"#angular/platform-browser-dynamic": "4.1.0",
"#angular/tsc-wrapped": "^4.3.4",
"#ionic-native/contacts": "^4.1.0",
"#ionic-native/core": "3.7.0",
"#ionic-native/facebook": "^4.1.0",
"#ionic-native/keyboard": "^4.1.0",
"#ionic-native/mixpanel": "^4.1.0",
"#ionic-native/push": "^4.1.0",
"#ionic-native/social-sharing": "^4.1.0",
"#ionic-native/splash-screen": "3.7.0",
"#ionic-native/status-bar": "3.7.0",
"#ionic/app-scripts": "^2.1.3",
"#ionic/storage": "^2.0.1",
"ajv": "^5.2.2",
"autoprefixer": "^7.1.2",
"chat-plugin": "file:onymos-plugin-chat",
"cordova-ios": "^4.4.0",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.5",
"cordova-plugin-contacts": "^2.3.1",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-facebook4": "^1.9.1",
"cordova-plugin-mixpanel": "^3.1.0",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.2",
"cordova-plugin-whitelist": "^1.3.1",
"cordova-plugin-x-socialsharing": "^5.1.8",
"cordova-sqlite-storage": "^2.0.4",
"es6-promise-plugin": "^4.1.0",
"ionic-angular": "^3.6.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-auto-complete": "^1.5.2-beta",
"ionicons": "3.0.0",
"ng2-validation": "^4.2.0",
"onymos-plugin-chat": "file:onymos-plugin-chat",
"phonegap-plugin-push": "^2.0.0",
"rxjs": "^5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "^0.8.12"
},
"devDependencies": {
"#angular/cli": "^1.2.7",
"#ionic/app-scripts": "1.3.7",
"#ionic/cli-plugin-cordova": "1.6.2",
"#ionic/cli-plugin-ionic-angular": "1.4.1",
"ionic": "3.7.0",
"typescript": "2.2.1"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-sqlite-storage": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-contacts": {
"CONTACTS_USAGE_DESCRIPTION": " "
},
"cordova-plugin-facebook4": {
"APP_ID": <FB app ID>,
"APP_NAME": "MyApp"
},
"cordova-plugin-mixpanel": {},
"phonegap-plugin-push": {},
"onymos-plugin-chat": {}
},
"platforms": [
"ios"
]
}
}
UPDATE
After removing the iOS platform from my project (for another reason) and re-adding it, I no longer see the hanging behavior on the startup screen. I still see the error in the console output- however it doesn't appear that it was the cause of the hanging I was observing. My guess is that removing and re-adding the iOS platform reset something related to one of my plugins.
Posting my update as an answer for closure, in case anyone else hits this:
After removing the iOS platform from my project (for another reason) and re-adding it, I no longer see the hanging behavior on the startup screen. I still see the error in the console output- however it doesn't appear that it was the cause of the hanging I was observing. My guess is that removing and re-adding the iOS platform reset something related to one of my plugins.