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

cmath file not found #437

Open
skumarcm opened this issue Jun 21, 2020 · 12 comments
Open

cmath file not found #437

skumarcm opened this issue Jun 21, 2020 · 12 comments

Comments

@skumarcm
Copy link

skumarcm commented Jun 21, 2020

I am trying to compile my react native application on iOS that makes use of react-native-material-kit

Following is the configuration:
RN : 62.2
React: 16.11
react-native-material-kit: 0.6.0-beta.1
Platform: iOS

I am getting the followings Error while trying to compile and run the app on my iPhone from Xcode:
'cmath' file not found in the file: Pods/Flipper-folly/Math.h

This is caused by the following "include" directive in "node_modules/react-native-material-kit/iOS/RCTMaterialKit/TickView.m:9"

Has any one faced this issue?

@Kunalpaul12
Copy link
Contributor

Same here

@tsabend
Copy link

tsabend commented Jul 10, 2020

Yea same. It’s preventing me from upgrading a rn project and appears to be an issue with how this library is packaged. Any chance we can get an update?

@mbdebbeler
Copy link

mbdebbeler commented Jul 13, 2020

Same. I also tried:

  • :modular_headers => true

  • manually adding react-native-material-kit to the project

  • switching my C++ dialect and library in build settings

No dice, still getting 'cmath' file not found, coming from the same place as above.

@dfeliz
Copy link

dfeliz commented Jul 14, 2020

Same. Solved it by disabling flipper for the moment because we won't use it.

@cristinaITdeveloper
Copy link

Same problem for me

@sospedra
Copy link

Same thing. Also tried a myriad of things. Also, we have flipper in place. Maybe these 2 don't play well together.

@basnow28
Copy link

Same here

@tastycode
Copy link

Same. Solved it by disabling flipper for the moment because we won't use it.

@dfeliz How did you disable flipper? The only way I can see to disable it involves changing a ton of files.

@basnow28
Copy link

This is the library I used instead: https://callstack.github.io/react-native-paper/index.html.
As I was using the MKTextField from react-native-material-kit I could import similar component from react-native-paper.
Hope this library can help someone :).

@salujaharkirat
Copy link

@tastycode you need to make the following changes to disable Flipper for now:-

PodFile(remove following) -

def add_flipper_pods!(versions = {})
  versions['Flipper'] ||= '~> 0.33.1'
  versions['DoubleConversion'] ||= '1.1.7'
  versions['Flipper-Folly'] ||= '~> 2.1'
  versions['Flipper-Glog'] ||= '0.3.6'
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
  versions['Flipper-RSocket'] ||= '~> 1.0'
  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
  # List all transitive dependencies for FlipperKit pods
  # to avoid them being linked in Release builds
  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end
# Post Install processing for Flipper
def flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == 'YogaKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
end



  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
#  add_flipper_pods!


flipper_post_install(installer) 

AppDelegate.m(remove following)

#if DEBUG
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif



  #if DEBUG
    InitializeFlipper(application);
  #endif


Let me know if it works.

@AlexArtisan
Copy link

Temporary fix

Replace in file "react-native-material-kit"/TickView.m - "math.h" to <math.h>

@thuytony
Copy link

thuytony commented Dec 4, 2020

Temporary fix

Replace in file "react-native-material-kit"/TickView.m - "math.h" to <math.h>

It's work. @xinthink Can fix it in master branch?

torufuruya added a commit to torufuruya/crm that referenced this issue Apr 1, 2021
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