wuxudong / react-native-charts-wrapper

a react native charts wrapper (support android & iOS)
2.44k stars 657 forks source link

[XCode 14 build error] Cannot find 'LabelByXValueFormatter' in scope #911

Closed AlixH closed 1 year ago

AlixH commented 1 year ago

*Do read files under `lib/` before reporting issues, you can find all the config there, all of them are straightforward.**

Expected Behavior

Build Success

Actual Behavior

Build failed

Screenshots

Screenshot 2022-10-26 at 17 16 26

[Edited] Here are more details:

Screenshot 2022-10-28 at 15 58 52

All the other formatters are found, except this one !

Data and config

I am building with XCode

Steps to Reproduce the Problem

Build from XCode with following spec

Specifications

Ps: with version 0.5.10 I am getting a similar error but with an other module that is not found

AlixH commented 1 year ago

@wuxudong do you have any idea on that ? I need this release cause I need XCode 14+ to support iOS 16

AlixH commented 1 year ago

I have finally figured it out: I had remains of the old iOS setup with the bridging header file @wuxudong, I think it would be good, instead of erasing the old doc completely, to indicate how to migrate :) For those having similar errors: make sure that in both XCode and your RN project, you have no traces left of RNCharts (may it be files or folder)

ray-aoms commented 1 year ago

I have finally figured it out: I had remains of the old iOS setup with the bridging header file @wuxudong, I think it would be good, instead of erasing the old doc completely, to indicate how to migrate :) For those having similar errors: make sure that in both XCode and your RN project, you have no traces left of RNCharts (may it be files or folder)

Having the same issue. i saw two lines in ios/xxx.xcodeproj/project.pbxproj

56165089233D0DCB0088D649 /* RNCharts-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNCharts-Bridging-Header.h"; sourceTree = "<group>"; };

and

56165089233D0DCB0088D649 /* RNCharts-Bridging-Header.h */,

After removing them, I still get the same error.

@AlixH could you please let me know what files/lines you have removed? Thanks

AlixH commented 1 year ago

I have finally figured it out: I had remains of the old iOS setup with the bridging header file @wuxudong, I think it would be good, instead of erasing the old doc completely, to indicate how to migrate :) For those having similar errors: make sure that in both XCode and your RN project, you have no traces left of RNCharts (may it be files or folder)

Having the same issue. i saw two lines in ios/xxx.xcodeproj/project.pbxproj

56165089233D0DCB0088D649 /* RNCharts-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RNCharts-Bridging-Header.h"; sourceTree = "<group>"; };

and

56165089233D0DCB0088D649 /* RNCharts-Bridging-Header.h */,

After removing them, I still get the same error.

@AlixH could you please let me know what files/lines you have removed? Thanks

I had a folder at the root of my XCode project called RNCharts and also one in my RN project inside which there was a bridging file. I deleted all that and cleaned everything (clean build folder, npm clean-install and pod deintegrate then pod install) [Edited] And I don't recommend touching the .pbxproj manually