Skip to content

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

@nickfujita

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions