'react-native run-ios failing with error: The Legacy Build System will be removed in a future release. You can configure the selected build system

react-native run-ios keeps failing with below error,any help will be greatly appreciated

 react-native run-ios --scheme "xUI" --udid 37C090D5-6637-4C94-9B54-C447A726E80C

error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually: - react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons") This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink " and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md info Found Xcode workspace "xUI.xcworkspace" info Building (using "xcodebuild -workspace xUI.xcworkspace -configuration Debug -scheme xUI -destination id=37C090D5-6637-4C94-9B54-C447A726E80C") error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening x.xcworkspace. Run CLI with --verbose flag for more details. Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace x.xcworkspace -configuration Debug -scheme x -destination id=37C090D5-6637-4C94-9B54-C447A726E80C

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Prepare build
error: The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
Build Preparation
The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.


** BUILD FAILED **


The following build commands failed:
    Prepare build
(1 failure)


Solution 1:[1]

Use either of the option to solve it.

1.Add this in WorkspaceSettings.xcsettings

<key>DisableBuildSystemDeprecationDiagnostic</key>
<true/>

2.Use Xcode to perform the same:

File-> Workspace Settings -> Check "Don't show a diagnostic issue about build system deprecation" and click done.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nandakishore Bhandari