FG
📱 Mobile & Cross-Platform

New RN project will not build on Xcode 12.5 Beta 3

Freshabout 19 hours ago
Mar 14, 20260 views
Confidence Score95%
95%

Problem

EDIT (by @kelset): Please read the current status of things at this comment. --- Description Running the latest Xcode/React Native etc. Upgrading an existing project failed so I tested with a new RN project (npx react-native init TestApp --version 0.64.0 --template react-native-template-typescript). It will build and run under Xcode 12.4, but fails when attempting to build with Xcode 12.5 Beta 3 (12E5244e). It's unlikely to be relevant, but the app is targeting an iPhone 12 Simulator running iOS 14.5 React Native version: Run `react-native info` in your terminal and copy the results here. [code block] Steps To Reproduce Provide a detailed list of steps that reproduce the issue. 1. Install the above tools, Xcode 12.5 Beta 3, RN 0.64.0 etc. 2. Create a new app (npx react-native init TestApp --version 0.64.0 --template react-native-template-typescript) 3. [code block] 3. [code block] then [code block] 4. [code block] 5. This error also appears if you replace step 4 with launching Xcode.app and building the app that way Expected Results Describe what you expected to happen. A successful build of the example app, running on the simulator. Snack, code example, screenshot, or link to a repository: Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a min

Error Output

error also appears if you replace step 4 with launching Xcode.app and building the app that way

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix React Native Build Issues on Xcode 12.5 Beta 3

Medium Risk

The issue arises due to incompatibilities between React Native 0.64.0 and Xcode 12.5 Beta 3, particularly with the new build system and changes in Swift compatibility. These changes can lead to build failures when using the latest beta version of Xcode.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Update Podfile

    Modify the Podfile to ensure compatibility with Xcode 12.5 Beta 3. Add the following line to the top of your Podfile to enable the new build system.

    ruby
    use_frameworks!
  2. 2

    Install CocoaPods

    Navigate to your project directory and install the updated CocoaPods to ensure all dependencies are correctly linked.

    bash
    cd ios && pod install
  3. 3

    Clean Build Folder

    In Xcode, clean the build folder to remove any cached data that might be causing the build to fail. You can do this by selecting 'Product' from the menu and then 'Clean Build Folder' (or use the shortcut Shift + Command + K).

  4. 4

    Set Build System to Legacy

    If the issue persists, temporarily switch the build system back to the legacy build system. Go to File > Project Settings and select 'Legacy Build System' under the Build System dropdown.

  5. 5

    Rebuild the Project

    Attempt to rebuild the project in Xcode after making the above changes. Ensure that you are targeting the correct simulator and that all dependencies are properly linked.

Validation

To confirm the fix worked, attempt to build and run the project on the iPhone 12 Simulator. A successful build without errors indicates that the issue has been resolved.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

react-nativemobileiosandroidresolution:-lockedneeds:-triage-:mag: