Skip to content

Build error when included in existing iOS project in 0.63.4 #32356

Closed as not planned

Description

@nickfujita

Description

After updating from 0.63.3 to 0.64.3 there is a build error when using react-native in an existing iOS swift project.

React Native version:

0.63.4

Steps To Reproduce

While building in an existing iOS project the following errors prevent a successful build.
Definition of 'RCTAlertController' must be imported from module 'React.RCTAlertController' before it is required
Which causes the following error because it thinks it's a separate declaration
Duplicate interface definition for class 'RCTAlertController'

image

Expected Results

There should be no build errors related to unfound RCTAlertController.

After some digging, it seems this is caused by a recent fix in the patch version:
f319ff3#diff-56beca6ee071cdd162c269ce765ab12d5af8c8c0ca840bca1e9d1f59e9fab790

By updating the following import syntax the build issue is resolved.

Existing:
#import "RCTAlertController.h"

New:
#import <React/RCTAlertController.h>

Activity

  1. nickfujita commented on Oct 22, 2021

    @nickfujita
    ContributorAuthor

    Opened PR with fix for this issue:
    #32457

  2. github-actions commented on Mar 26, 2024

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  3. added
    Stale
    on Mar 26, 2024
  4. github-actions commented on Apr 2, 2024

    @github-actions

    This issue was closed because it has been stalled for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍Platform: iOSStale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions