Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nickfujita opened this issue Oct 8, 2021 · 3 comments
Closed

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

nickfujita opened this issue Oct 8, 2021 · 3 comments
Labels
Needs: Triage 🔍 Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@nickfujita
Copy link
Contributor

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>

@nickfujita
Copy link
Contributor Author

Opened PR with fix for this issue:
#32457

facebook-github-bot pushed a commit that referenced this issue Nov 11, 2021
…2457)

Summary:
Fixes a build error relating to RCTAlertController import when embedding react-native into existing iOS app. This PR resolves the issue detailed in #32356

## Changelog

Adjusts the import syntax which was added in:
f319ff3#diff-56beca6ee071cdd162c269ce765ab12d5af8c8c0ca840bca1e9d1f59e9fab790

Existing:
#import "RCTAlertController.h"

New:
#import <React/RCTAlertController.h>

[iOS] [Fix] - Fix RCTAlertController import build error when embedded in existing iOS projects

Pull Request resolved: #32457

Test Plan:
Build this branch in existing iOS project using swift, and should not have the build error described in the issue above.

Would also like to have this fix cherry-pick'd to release 0.63 after merging.

Reviewed By: RSNara

Differential Revision: D31861814

Pulled By: charlesbdudley

fbshipit-source-id: e60f80c8ea982e400cbf6d9375037d4197bbb8a3
Copy link

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.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 26, 2024
Copy link

github-actions bot commented Apr 2, 2024

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants