react native iOS 代码推送时构建失败:未定义的体系结构符号 x86_64:

react native iOS build failed on code push by : Undefined symbols for architecture x86_64:

React Native 项目在构建 iOS 时失败 有这个错误

Undefined symbols for architecture x86_64: "___isPlatformVersionAtLeast", referenced from: -[MSDeviceTracker updatedDevice] in AppCenter(MSDeviceTracker.o) +[MSUtility unarchiveKeyedData:] in AppCenter(MSUtility.o) +[MSUtility archiveKeyedData:] in AppCenter(MSUtility.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是我的依赖关系

"dependencies": {
            "@react-native-community/art": " 1.1.2",
            "@react-native-community/async-storage": " 1.7.0 ",
            "@react-native-community/blur": " 3.4.1",
            "@react-native-community/geolocation": " 2.0.2",
            "@react-native-community/image-editor": " 2.2.0",
            "appcenter": "2.6.0",
            "appcenter-analytics": "2.6.0",
            "appcenter-crashes": "2.6.0",
            "axios": " 0.19.2",
            "crypto-js": " 3.1.9-1",
            "date-diff": " 0.2.1",
            "lottie-react-native": " 3.3.2",
            "moment-jalaali": " 0.9.1",
            "prettier": " 2.0.5",
            "radar-react-native-text-ticker": " 0.14.1",
            "react": "16.12.0",
            "react-native": " 0.61.5",
            "react-native-android-badge": " 0.4.3",
            "react-native-audio": " 4.3.0",
            "react-native-calendar-picker": " 6.0.3",
            "react-native-check-box": " 2.1.7",
            "react-native-code-push": "6.2.0",
            "react-native-collapsible": " 1.5.2",
            "react-native-communications": " 2.2.1",
            "react-native-countdown-component": " 2.6.0",
            "react-native-device-info": "5.5.7",
            "react-native-event-listeners": " 1.0.3",
            "react-native-exception-handler": " 2.10.8",
            "react-native-exit-app": " 1.1.0",
            "react-native-extended-stylesheet": " 0.12.0",
            "react-native-fast-image": " 7.0.2",
            "react-native-firebase": " 5.5.6",
            "react-native-geolocation-service": " 3.1.0",
            "react-native-gesture-handler": "1.5.2",
            "react-native-gifted-chat": " 0.13.0",
            "react-native-image-crop-picker": " 0.26.1",
            "react-native-image-picker": " 1.1.0",
            "react-native-image-resizer": " 1.1.0",
            "react-native-jalali-calendar-picker-radar": " 0.2.7",
            "react-native-keyboard-aware-scroll-view": " 0.9.1",
            "react-native-keyboard-aware-scrollview": " 2.1.0",
            "react-native-linear-gradient": " 2.5.6",
            "react-native-localization": " 2.1.6",
            "react-native-map-link": " 2.7.0",
            "react-native-maps": " 0.26.1",
            "react-native-material-ui": " 1.30.1",
            "react-native-modal": " 11.5.3",
            "react-native-percentage-circle": " 1.0.7",
            "react-native-phone-call": " 1.0.9",
            "react-native-picker-radar": " 4.3.9",
            "react-native-pie-chart-radar": " 1.0.15",
            "react-native-progress": " 4.0.3",
            "react-native-ratings": " 6.5.0",
            "react-native-responsive-fontsize": " 0.4.2",
            "react-native-safe-area-context": " 0.7.3",
            "react-native-screens": " 2.0.0-beta.9",
            "react-native-snap-carousel": " 3.8.4",
            "react-native-sound": " 0.11.0",
            "react-native-svg": " 9.13.6",
            "react-native-svg-transformer": " 0.14.3",
            "react-native-timer-countdown-radar": " 2.2.0",
            "react-native-vector-icons": "6.6.0",
            "react-native-wheel-datepicker": " 2.2.3",
            "react-navigation": " 4.0.10",
            "react-navigation-stack": " 1.10.3",
            "react-redux": " 7.1.3",
            "recyclerlistview": " 2.0.12",
            "redux": " 4.0.4",
            "redux-thunk": " 2.3.0",
            "socket.io-client": " 2.3.0",
            "sse": "0.0.8"
        },

如前所述 here,这可以通过在测试和发布项目的链接库中添加 JavaScriptCore.framework 来解决。

您是否添加了 JavaScriptCore.framework 链接库? 如果你在添加后不断收到不同的错误,请尝试清除构建文件夹