react-native-text-size icon indicating copy to clipboard operation
react-native-text-size copied to clipboard

Trouble linking project on iOS

Open unixcow opened this issue 6 years ago • 9 comments
trafficstars

So i spent hours trying to figure out why do i get 'React/RCTBridgeModule.h' file not found when trying to build my project after linking react-native-text-size, i tried both manual install and using link. For some reason react-native-text-size can't find required header files, even though Search Header paths seem to point at the right direction $(SRCROOT)/../../react-native/React recursive. Also, Some people suggested unchecking Parallelize Build but i already have that disabled.

react-native Version: 0.59.8 react-native-text-size Version: 3.0.0

Any idea how can resolve this?

unixcow avatar Jul 27 '19 05:07 unixcow

I'm having the same issue. Did you manage to fix it ?

ulazarevic avatar Jul 29 '19 19:07 ulazarevic

@unixcow , @ulazarevic , please try the new version 4.0.0 rc 1. yarn add [email protected] I don't have a Mac but hope it works.

aMarCruz avatar Jul 30 '19 00:07 aMarCruz

@aMarCruz

It's still not working. In react-native 0.60 they changed the way of importing libraries into the project.

When I try manual linking I get the same error message as @unixcow.

When I try automatic linking I get the following message:

error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:

  • react-native-text-size (to unlink run: "react-native unlink react-native-text-size") This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink " and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

ulazarevic avatar Aug 01 '19 09:08 ulazarevic

@ulazarevic thanks for your feedback, I will fix this asap.

aMarCruz avatar Aug 01 '19 16:08 aMarCruz

@ulazarevic here's how i managed to get it working, a bit hacky though

  1. Install npm i react-native-text-size
  2. Go to react-native-text-size folder in node_modules then iOS folder
  3. Find RNTextSize.podspec change s.source_files to *.{h,m}
  4. Add pod 'RNTextSize', :path => '../node_modules/react-native-text-size/ios/RNTextSize.podspec' into your Podfile
  5. Run pod install

@aMarCruz yeah i still have same issue even on latest version

unixcow avatar Aug 07 '19 12:08 unixcow

Thanks @unixcow! It's working!

spale44 avatar Aug 08 '19 10:08 spale44

@unixcow thanks! and sorry for the delay, I am about to finish my current project and will soon launch a functional version.

aMarCruz avatar Aug 09 '19 00:08 aMarCruz

@aMarCruz did you release some version fixing this?

mayconmesquita avatar Sep 26 '19 02:09 mayconmesquita