React Native Expo 构建号没有增加

Kea*_*ing 14 react-native expo

我正在尝试构建版本“1.2.0”,我已经更改了 app.json 中的每个“buildNumber”和“version”,并且 expo 仍然构建 ios buildNumber:“1.0.0”。我在用 eas build --profile production --platform ios

{
  "expo": {
    "name": "Redacted",
    "slug": "Redacted",
    "description":"Redacted",
    "version": "1.2.0",
    "orientation": "portrait",
    "icon": "./assets/mark.png",
    "splash": {
      "image": "./assets/TRANSPARENT2.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "buildNumber": "1.2",
      "infoPlist": {
        "NSFaceIDUsageDescription": "This app uses the FaceID feature to login. If faceID fails or if it is not available for any reason, the app will fall back to a standard login system."
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "permissions": [
        "CAMERA",
        "USE_FINGERPRINT",
        "USE_BIOMETRIC",
        "VIBRATE"
      ],
      "package": "Redacted"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": [
      [
        "expo-notifications",
        {
          "icon": "./assets/DarkVersion.png",
          "color": "#d2282e",
          "sounds": [
            "./assets/notification.m4r"
          ]
        }
      ]
    ]
  }
}
Run Code Online (Sandbox Code Playgroud)

这是我在 expo.dev 上得到的...因此我无法提交应用程序。

世博会建设

这是控制台中的错误。

在此输入图像描述

L4i*_*ivi 22

相同的经历

\n

我在更新 my-expo-project 中的 app.json 文件时也有类似的经历。\n我保持版本字符串相同0.9.9,仅将内部版本号字符串从 更改124125

\n

运行eas build --profile production --platform iOS导致相同的控制台错误。

\n
\n

您已经提交了该版本的应用程序。

\n
\n

expo.dev 上的构建摘要显示旧的构建号已交付。

\n

较旧的版本号已交付给 expo.dev1

\n

解决方案

\n

事实证明我必须使用expo prebuild命令来解决这个问题。

\n
\xe2\x9e\x9c  my-expo-project git:(v125) $ expo prebuild\n\xe2\x9c\x94 Created native projects | /android, /ios already created | gitignore already synced\n\xe2\x9c\x94 Updated package.json and added index.js entry point for iOS and Android\n Using npm to install packages.\n\xe2\x9c\x94 Cleaned JavaScript dependencies 3698ms\n\xe2\x9c\x94 Installed JavaScript dependencies 11150ms\n\xe2\x9c\x94 Config synced\n
Run Code Online (Sandbox Code Playgroud)\n

现在,应用程序配置已同步到./iOS文件./Androideas build --profile production --platform iOS,现在可以将正确的捆绑包和内部版本号传递到 expo.dev

\n

正确的内部版本号已交付给 expo.dev2

\n


Kea*_*ing 4

结果eas build --profile production --platform ios每次运行时都不会更新 plist 文件(我认为超级蹩脚)。您需要手动进入./ios/<yourApp>/plist文件并更新CFBundleVersionCFBundleShortVersionString密钥。这只是你第一次运行之后的事情eas build --profile production --platform ios