-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fatal error on Archive iOS - fatal error: 'RNSVGLength.h' file not found #817
Comments
Can you try unlink and linking again? |
@msand I've installed with Cocoa Pods, automatic link did not work for iOS, the linker not attach .xcodeproj to my project. For Android the automatic linker it worked. I've put on my
And run Building and Archiving on my local environment using new build system it worked (OSX High Sierra), but on appcenter not works. I suspect that AppCenter uses the old build system. |
Did you try pod update? |
I'll try:
I suspect the problem is with CocoaPods. |
Or is there some cache to reset in app center? (i have no experience with it) |
App Center runs in disposable containers, so the environment of app center not persist states, caches e etc... |
Same error here, since upgrading to 8.0.0 (RN 0.57.3) |
@dylancompanjen you've installed lib with CocoaPods too? |
@joaom182 nope, with react-native link. |
Can you please try with the https://github.com/react-native-community/react-native-svg/tree/ios_build_simplification branch? |
@msand i'll try this. FYI, i've tried all ways what i described bellow, but not works. |
@joaom182 Could you make a git repo which I can git clone and npm install && react-native run-ios to test? |
@msand still "RNSVGLength.h" file not found (from RNSVGPainter.h) |
Can you try with a clean project?
Replace app.js with this: import React, { Component } from "react";
import Svg, { Rect } from "react-native-svg";
export default class App extends Component {
render() {
return (
<Svg width="100%" height="100%" viewBox="0 0 100 100">
<Rect x="0" y="0" width="100" height="100" />
</Svg>
);
}
}
|
@msand I finally got it working by using the "legacy build system" in xcode. |
I ran into the exact error described here but |
I have the same issue, but only in XCode. I can run the app in the simulator via I have tried:
The library seems to be removed correctly in xcode, and then added correctly again. No red libraries in "Link Binary With Libraries" in XCode. |
Switching to "Legacy Build System" in XCode (File/Project Settings) solved the problem @msand Is there anything I can do to help you find the build problem? I suspect that there are drawbacks with the legacy system, or that this build system won't be around in the future. Sidenote: Subjectively I feel that my, quite SVG heavy app, performs better with v8 than it did with v6. I'd really like to get some time to setup some objective tests. It's on my list, but right now "the list" is quite long. |
@msageryd I haven't upgraded XCode yet because of the significant number of problems people have been reporting around it, and the version I have works perfectly fine for now. I'm no expert in the XCode build system either, so I think it would probably be best to try and find someone properly experienced in that to take a look at it, perhaps they'll find something else to improve at the same time. Otherwise I'll probably upgrade XCode once a react-native version with proper support for it gets released. |
Ok, sounds like a plan. I have been using the latest XCode without "Legacy.." for a couple of weeks now. No issues whatsoever with RN 0.56 (until the RNSVG issue). |
I wonder if the relative order of the files in the build phases could have any effect. Could you try moving RNSVGLength.m before RNSVGPainter.m and see if the error disappears / changes? @msageryd |
No difference after changing the file order. |
I can't find that screen for RNSVG. In the scheme settings for my project the Parallelize setting is already unchecked. Are there scheme settings for each library, or does your project just happen to have "RNSVG" as it's name? |
Found the scheme settings for RNSVG.
|
I see, alright. Well, thanks for trying it out. Not sure what to try next. Guess I'll have to upgrade xcode to investigate further. Would you happen to know any ios/xcode expert? |
Success.. I did the same thing again, but this time I used Product/Clean Build Folder from within XCode instead of just rm -rf the folder. The project now builds successfully with "Parallelize" unchecked in the RNSVG package. I wonder what trickery the "Clean Build Folder" does besides cleaning the build folder.. |
Ah excellent. So, now to figure out how to make react-native link uncheck parallelize perhaps? |
I was having the same issue. |
Same issue for me too. I did what @gunnartorfis did : I drag and dropped the missing file RNSVGLength.h where it should be. Then I had the same error for other files, and I did the same thing. Afterwards I run |
So, this is not an actual issue with the library, rather the setup/linking. Closing now. |
React Native: 0.52
Build System: (MS app center)
react-native-svg: 7.1.2
fatal error: 'RNSVGLength.h' file not found
The text was updated successfully, but these errors were encountered: