App stuck on SplashScreen forever on iOS using SDK23

Hi,

My App runs fine with the splash info on app.json, image is shown and everything runs smooth. App was created with CRNA.
But when I want to release it for production and use exp build:ios for generating the .ipa, the generated standalone app gets stuck on the splash screen forever. I’m testing the standalone app with testFlight and it gets stuck on the splash screen and app never starts.
The standalone production version for Android runs just fine, splash screen is shown then the app gets loaded and it runs ok…
How can I figure out what is going on with just the production ready version of the ios app? Why doesn’t it pass the splash screen?

package.json:

"expo": "^23.0.4",
"react": "16.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz",

app.json:

{
  "expo": {
    "name": "appqbaarcliente",
    "description": "Compre Ingressos/Produtos em seus eventos favoritos",
    "slug": "appqbaarcliente",
    "privacy": "unlisted",
    "sdkVersion": "23.0.0",
    "version": "1.0.10",
    "orientation": "portrait",
    "primaryColor": "#6fb96b",
    "icon": "./assets/icons/app-icon.png",
    "notification": {
      "icon": "./assets/icons/notification-icon.png",
      "color": "#000000"
    },
    "packagerOpts": {
      "assetExts": [
        "ttf"
      ]
    },
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "br.com.qbaar",
      "buildNumber": "13"
    },
    "android": {
      "package": "br.com.qbaar",
      "versionCode": 13,
      "permissions": []
    },
    "splash": {
      "image": "./assets/eventcoin_inverted.png",
      "backgroundColor": "#6fb96b"
    },
    "loading": {
      "icon": "./assets/eventcoin_inverted.png",
      "hideExponentText": true,
      "backgroundColor": "#6fb96b"
    }
  }
}

I already tried with the Expo Fork of react native version 23.0.0 and I already tried removing the splash and/or loading sections of the app.json and still the app doesn’t load on iOS devices.

Thanks in advance!

The native device logs might provide a hint as to what’s going on. There are a few guides on how to read iOS device and simulator logs in the docs here: https://docs.expo.io/versions/latest/guides/logging.html#view-logs-for-your-iphone.

Also load your app with dev mode disabled, without building the ipa: https://docs.expo.io/versions/latest/guides/development-mode.html

Thanks guys!! I was able to get the specific errors when running on production mode with expo.

The thing was that I had a package using the old ViewPropTypes, and Yarn was not fetching my newest version of the package that was hosted on github. I had to create a tag on github for using the specific URL, with the tag on it, for yarn to fetch the new version, since yarn was caching the old version because of the same URL. Now with the trailing #v0.1.1 it fetches the new version

I found a good solution for handling the old and new ViewPropTypes on components and it looks like this (if anyone needs it):

import {
  View,
  ViewPropTypes as RNViewPropTypes,  
} from "react-native";
const ViewPropTypes = RNViewPropTypes || View.propTypes;

I also had another bug with react-navigation with the DrawerNavigator that now needs some properties that it didn’t on the old versions:

const MainDrawerExample = DrawerNavigator({
  Drafts: {
    screen: DrawerExample,
  },
}, {
headerMode: 'screen',
drawerPosition: 'right',
drawerOpenRoute: 'DrawerOpen', // <- mandatory now
drawerCloseRoute: 'DrawerClose', // <- mandatory now
drawerToggleRoute: 'DrawerToggle', // <- mandatory now
});

(taken from: https://github.com/react-community/react-navigation/issues/3148

Just listed the other bugs here because it may be the same problem for others… never know…

After correcting these issues I could get the App working on production mode! Thanks a lot!

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.