【问题标题】:White screen after downloading app from TestFlight - Expo从 TestFlight 下载应用程序后出现白屏 - Expo
【发布时间】:2022-01-20 05:36:33
【问题描述】:

我在使用其中一个应用程序构建应用程序时遇到了一个奇怪的问题

expo build:ios

然后使用

上传应用

运输工具

当我从 TestFlight 下载应用程序时,它是 opens up with a white screen。我尝试使用以下命令在设备上以生产模式运行应用程序

expo run:ios -d

然后在捆绑器中按p 切换到生产模式。使用本地 IP 地址在本地运行良好。

当我导出 .ipa 文件并尝试在它给我的设备上运行时

无法安装该应用程序,因为它的完整性无法得到保证 已验证

以前有人遇到过同样的问题吗?为什么它没有显示任何错误?

一些信息:我正在使用 expo 托管的裸工作流

app.json

{
  "expo": {
    "name": "Myndfulness",
    "slug": "myndfulness",
    "owner": "**************************",
    "version": "1.0.1",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "backgroundColor": "#fff",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 300
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "bundleIdentifier": "app.myndfulness",
      "buildNumber": "29",
      "usesAppleSignIn": true,
      "backgroundColor": "#FFFFFF",
      "icon": "./assets/icon.png",
      "userInterfaceStyle": "light",
      "config": {
        "googleSignIn": {
          "reservedClientId": "**************************"
        }
      },
      "googleServicesFile": "./GoogleService-Info.plist"
    },
    "android": {
      "package": "app.myndfulness",
      "versionCode": 4,
      "icon": "./assets/icon.png",
      "backgroundColor": "#FFFFFF",
      "userInterfaceStyle": "light",
      "googleServicesFile": "./google-services.json",
      "config": {
        "googleSignIn": {
          "certificateHash": "270AA8A33CF59E92614AF182C917CAF866D38719"
        }
      }
    },
    "web": {
      "favicon": "./assets/favicon.png",
      "config": {
        "firebase": {
          "apiKey": "**************************",
          "authDomain": "**************************",
          "projectId": "**************************",
          "storageBucket": "**************************",
          "messagingSenderId": "441874631846",
          "appId": "**************************",
          "measurementId": "G-KX9BYB1D1Z"
        }
      }
    },
    "packagerOpts": {
      "sourceExts": [ "js", "json", "ts", "tsx", "jsx", "vue"]
    }
  }
}

eas.json

{
  "build": {
    "production": {
      "releaseChannel": "production"
    },
    "release": {
      "releaseChannel": "production"
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "releaseChannel": "staging-dev"
    },
    "team": {
      "releaseChannel": "staging-team",
      "distribution": "internal",
      "android": {
        "buildType": "app-bundle"
      }
    }
  },
  "submit": {
    "production": {
      "ios": {
        "appleId": "**************************",
        "ascAppId": "1579481834",
        "appleTeamId": "**************************",
        "sku": "app.myndfulness"
      },
      "android": {
        "serviceAccountKeyPath": "./google-services.json",
        "track": "internal"
      }
    }
  },
  "cli": {
    "version": ">= 0.35.0",
    "requireCommit": true
  }
}

【问题讨论】:

    标签: ios react-native metro-bundler


    【解决方案1】:

    我认为您需要与 Sentry 集成才能跟踪您的 JS 错误,因为出现白屏是因为您的 JS 出现中断

    或者您可以使用https://github.com/a7ul/react-native-exception-handler 并提醒错误以了解是什么导致您的应用出现白屏

    【讨论】:

      【解决方案2】:

      对于遇到相同问题的任何人,我通过使用 EAS 上传构建解决了它

      eas build -p=ios —auto-submit —clear-cache
      

      了解更多使用 EAS 的可用选项

      eas build --help
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-11-10
        • 1970-01-01
        • 2021-01-29
        相关资源
        最近更新 更多