xinthink / react-native-material-kit

Bringing Material Design to React Native
https://rnmk.xinthink.com
MIT License
4.83k stars 577 forks source link

cmath file not found #437

Open skumarcm opened 4 years ago

skumarcm commented 4 years ago

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 commented 4 years ago

Same here

tsabend commented 4 years ago

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 commented 4 years ago

Same. I also tried:

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

dfeliz commented 4 years ago

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

cristinaITdeveloper commented 4 years ago

Same problem for me

sospedra commented 4 years ago

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

basnow28 commented 4 years ago

Same here

tastycode commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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.

gopherios commented 4 years ago

Temporary fix

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

thuytony commented 3 years ago

Temporary fix

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

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