-
Notifications
You must be signed in to change notification settings - Fork 75
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
IOS - React Native auto link Fix #65
base: master
Are you sure you want to change the base?
Conversation
This fixed the issue with the import for me, but I get an EXC_BAD_ACCESS when trying to create a PDF on iOS. |
Just a note that the reason this isn't merged yet is:
I'd be happy to merge a RN 60+ auto link support PR, just need to be confident that it works, and make sure that it's tested well. If someone else is happy to chip in help here, more than happy to merge and release. |
I got the same EXC_BAD_ACCESS error when made the changes in PR#80. Turned out drawText function is using a default font (Times New Roman) which is not supported in my iOS project. Just had to set |
@calinbodnar sounds like we should set the default font to a font that's always available in iOS to make this easier for people. |
This PR worked for me (finally) in react-native 0.71, after trying many other PRs and code changes. I had to copy the RNReactNativePdfLib.podspec from the ios folder to the root of the library (node_modules/react-native-pdf-lib) and then add "ios/" to the paths referenced within that file, and also remove the ".." in front of "../package.json". |
Hey @rcaseSW , |
@shivanip-iprogrammer I did not link manually. I just moved the RNReactNativePdfLib.podspec file to the root of the library, then adjusted the paths within that file so they pointed to the files correctly from the root. So I modified the package.json line as mentioned above, and also modified the following lines as such, adding "ios/" to the paths: s.source_files = "ios/.{h,mm}", "ios/lib/**/" Note that I later found out this solution only works for developing on mac's with an intel processor (x86). It does not build on M1 or M2 macs (arm64 architecture). |
@rcaseSW Thanks for solution but it is not working at my end and i have a mac with intel processor.
It seems this is the issue of linking but unfortunately link does not work after RN>=69. |
Fix IOS, auto import files.
P.S: Probably not the best way to import, but i couldn't find a way to import the folders too.