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

Xcode 12 compatibility issue leading to build failure #1510

Closed
Gethyl opened this issue Dec 18, 2020 · 3 comments
Closed

Xcode 12 compatibility issue leading to build failure #1510

Gethyl opened this issue Dec 18, 2020 · 3 comments

Comments

@Gethyl
Copy link

Gethyl commented Dec 18, 2020

Issue

Build fails while linking RNSVG.

image

As you see in the screenshot, RNSVG cannot find the required React modules because at Pod install, they weren't linked.

Fix

Update the dependency in podspec file to use React-Core instead of React.

https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/RNSVG.podspec#L16

You can read more on this here facebook/react-native#29633 (comment)

Temporary work around

For now I have to manually link them before running and then the build succeeds. We build as frameworks, but the idea should be similar for other as well I guess.
Screen Shot 2020-12-18 at 11 41 51 am

Expected Results

Build shouldn't fail at linking of RNSVG.

Versions

React Native - 0.63.4
Xcode - 12.2

@Gethyl
Copy link
Author

Gethyl commented Apr 7, 2021

If any one still has this issue, I eventually automated this by writing a small shell script as shown:-

#!/bin/bash
#$node_module_path - node_module folder path
for podspec_file in $(find $node_module_path -name "*.podspec"); 
do 
# Change dependency 'React' to 'React-Core' to fix issue with React.Framework not added as dependency
  sed  -i '' "/s.dependency/  s/'React'/'React-Core'/"  "$podspec_file"
done

This will scan for all the podspec files and replace 'React' to 'React-Core' in the dependency

Haven't tried through our CI pipleline which is a linux box, but works fine on my local mac.

@MoOx
Copy link
Contributor

MoOx commented Jun 28, 2021

#1604 for a fix

@WoLewicki
Copy link
Member

Since #1604 has been merged, I will close it. Feel free to comment here if something is wrong and we can always reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants