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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] Ejected SDK 33/34 : XCode build fails with many Redefinition of enumerator errors #4856

Closed
lc3t35 opened this issue Jul 7, 2019 · 12 comments

Comments

@lc3t35
Copy link

lc3t35 commented Jul 7, 2019

馃悰 Bug Report

Environment

expo diagnostics

  Expo CLI 2.21.2 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.0 - /usr/local/bin/node
      Yarn: 1.16.0 - ~/.yarn/bin/yarn
      npm: 6.9.0 - ~/.npm-global/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      expo: 33.0.7 => 33.0.7 
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8 
      react-navigation: 3.11.0 => 3.11.0 
    npmGlobalPackages:
      expo-cli: 2.21.2

Steps to Reproduce

Ejecting , react-native link, pod update, pod install, build with Xcode

Actual Behavior

Build fails with many Redefinition of enumerator errors in files RNSVGCGFCRule.h, RNSVGVBMOS.h, RNSVGUnits.h, RNSVGPathParser.h

Capture d鈥檈虂cran 2019-07-07 a虁 17 36 29

Reproducible Demo

It seems to be related to the use of react-native-svg

@dmydry
Copy link

dmydry commented Jul 17, 2019

Had the same issue after update to sdk 33.

Steps helped me to fix it:

  1. Make sure you don't have pod 'RNSVG', :path => '../node_modules/react-native-svg' in your Podlile
  2. Make sure you don't have react-native-svg dependency in package.json
  3. Add next code to package.json
  "resolutions": {
    "react-native-svg": "9.4.0"
  }
  1. rm -rf node_modules
  2. yarn or npm i
  3. cd ios && pod update
  4. Xcode > Product > Clean

After these steps this error is gone and I built my project successfully.

@lc3t35
Copy link
Author

lc3t35 commented Jul 17, 2019

It seemed to work for me (I have another problem with react-native-iap now : dooboolab-community/react-native-iap#465)

@malikid
Copy link

malikid commented Aug 8, 2019

Tried to fix the issue with this way but got the error below. Our context is upgrading to SDK 34.

error: /ios/Pods/Target Support Files/RNSVG/RNSVG.xcconfig: unable to open file (in target "RNSVG" in project "Pods") (in target 'RNSVG')

Had the same issue after update to sdk 33.

Steps helped me to fix it:

  1. Make sure you don't have pod 'RNSVG', :path => '../node_modules/react-native-svg' in your Podlile
  2. Make sure you don't have react-native-svg dependency in package.json
  3. Add next code to package.json
  "resolutions": {
    "react-native-svg": "9.4.0"
  }
  1. rm -rf node_modules
  2. yarn or npm i
  3. cd ios && pod update
  4. Xcode > Product > Clean

After these steps this error is gone and I built my project successfully.

@millerb415
Copy link

just ran into the same issue fixed it by after doing the steps above delete pod folder and pod lock clean, close, reopen, and rerun the project

Tried to fix the issue with this way but got the error below. Our context is upgrading to SDK 34.

error: /ios/Pods/Target Support Files/RNSVG/RNSVG.xcconfig: unable to open file (in target "RNSVG" in project "Pods") (in target 'RNSVG')

Had the same issue after update to sdk 33.
Steps helped me to fix it:

  1. Make sure you don't have pod 'RNSVG', :path => '../node_modules/react-native-svg' in your Podlile
  2. Make sure you don't have react-native-svg dependency in package.json
  3. Add next code to package.json
  "resolutions": {
    "react-native-svg": "9.4.0"
  }
  1. rm -rf node_modules
  2. yarn or npm i
  3. cd ios && pod update
  4. Xcode > Product > Clean

After these steps this error is gone and I built my project successfully.

@lc3t35
Copy link
Author

lc3t35 commented Aug 15, 2019

This happens again after sdk34 update, no more need for "resolutions" as react-native-svg is 9.5.1 with sdk34.

Expo diagnostics :

Expo CLI 3.0.8 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.0 - /usr/local/bin/node
      Yarn: 1.17.3 - ~/.yarn/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      expo: 34.0.4 => 34.0.4 
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-34.0.1.tar.gz => 0.59.8 
      react-navigation: 3.11.1 => 3.11.1 
    npmGlobalPackages:
      expo-cli: 2.21.2

I had to link manually the needed packages : (don't do react-native link)

react-native link react-native-iap
react-native link react-native-sentry

@lc3t35 lc3t35 changed the title Ejected SDK 33 : XCode build fails with many Redefinition of enumerator errors [SOLVED] Ejected SDK 33/34 : XCode build fails with many Redefinition of enumerator errors Aug 15, 2019
@lc3t35 lc3t35 closed this as completed Aug 15, 2019
@kirsantov
Copy link

But react-native-svg don't work in expo sdk 35 (ejected expokit). The same problems with linking

@CarterBland
Copy link

I'm seeing this issue on react-native-gesture-handler, and I've tried everything you guys posted but nothing seems to work. SDK 35

@lc3t35
Copy link
Author

lc3t35 commented Oct 21, 2019

@kirsantov react-native-svg works in ejected sdk35
@CarterBland the process is :

react-native link
then remove manually, in Podfile and MainApplication, all that is related to react-native-svg, react-native-gesture-handler ....

When will I wake up from this nightmare ?

@CarterBland
Copy link

@lc3t35 What do you mean remove manually in Podfile? remove the pod 'react-native-gesture-handler'?

@kevinvugts
Copy link

Any news about this issue? Can't get it working on sdk 35 and ios 13

@CarterBland
Copy link

@kevinvugts Hey Kevin, I updated XCode to XCode 11, and I removed node_modules and package-lock, essentially reinstalled everything and ran it without running react-native link. Everything worked as expected so far.

@emersonhsieh
Copy link

@kevinvugts I was running into the same issue. I had run react-native link beforehand, so I unlinked all of my linked modules (react-native unlink react-native-gesture-handler react-native-reanimated react-native-svg react-native-vector-icons react-native-webview), deleted ios/Pods/, ran pod install, and then everything built correctly in Xcode.

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

No branches or pull requests

9 participants