react-native-text-input-mask: React Native 0.60 not work
Bug
Hello! This component not work is RN 60
Environment info
React native info output:
// paste it here
Library version: x.x.x
Steps To Reproduce
…
Describe what you expected to happen:
Reproducible sample code
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 22
- Comments: 57 (9 by maintainers)
Commits related to this issue
- Alteraçòes seguindo as dicas presentes em https://github.com/react-native-community/react-native-text-input-mask/issues/135#issuecomment-524402210 — committed to AlisonG2/react-native-text-input-mask by AlisonG2 5 years ago
- Update RNTextInputMask.m v0.60 issue #135 — committed to ROD-TEL/react-native-text-input-mask by ROD-TEL 5 years ago
- Fix for issue #135 — committed to mbody/react-native-text-input-mask by mbody 5 years ago
- Merge pull request #1 from mbody/master Fix for issue #135 — committed to ROD-TEL/react-native-text-input-mask by ROD-TEL 5 years ago
this kind of issues shouldn’t be allowed, it’s poorly edited and it gives no insight whatsoever.
I’m using 0.60.5 on Android and it’s working. No warnings. I’m going to test on iOS later and I’ll try to update this.
In react-native 0.62 I just added this line below to Podfile and ran
pod install:pod 'RNInputMask', :path => '../node_modules/react-native-text-input-mask/ios/InputMask'And now it works for me 😃
@betoharres updated the readme file in #140 . We need
Dummy.swiftas onRN 0.60we cannot useuse_frameworks!. But for any one usingRN 0.60.1or greater version no need ofDummy.swift. I have mentioned the instructions in readme file in #140 .Am currently using the newest version of react native 0.60.5, but am getting the error
React/RCTBridge.h file not foundDid not have this error before upgrading.
Some solution that I tried were: https://stackoverflow.com/questions/50453883/react-native-build-failed-react-rctbridge-h-file-not-found/50460552
However, the top solution, when I went into manage scheme. There is no React, and it also says React(missing). There is a React-Core, and I tried using that, however the project still fails
also followed this link getsentry/sentry-react-native#395 (comment) but did not work
@betoharres if you add following two lines in header search path
with mode
recursiveand change the imports in RNTextInputMask.m fromto
It will work with
RN 0.60.5with manual integration. Usage with pods through auto linking will not work as currently the swift code or usage of frameworks is not supported inRN 0.60.5. Need to wait for following pull request to be released. https://github.com/facebook/react-native/pull/25619@waqas19921 when you run
pod installdo you get this warning:[!] use_native_modules! skipped the react-native dependency 'react-native-text-input-mask'. No podspec file was found.?@karmil32 I’m using RN
0.61.5, but I followed the instruction “For RN = 0.60.*” and it is working fine for me. No need to useuse_frameworks!.It works if you link it like this:
Now i get error while compiling on iOS.
The 'Pods-AppName' target has transitive dependencies that include static binaries: (/AppPath/ios/Pods/Crashlytics/iOS/Crashlytics.framework and /AppPath/ios/Pods/Fabric/iOS/Fabric.framework)I know that’s related to Crashlytics but don’t how to fix it.
EDIT: Also tried 0.60.* way but got error:
Build/Intermediates.noindex/ArchiveIntermediates/TelematicsB2B/BuildProductsPath/Debug-iphoneos/RNInputMask/RNInputMask.modulemap' not foundThank you for the PR you made @waqas19921
I’m upgrading from RN 0.59.9 to RN 0.60.5. This last library is currently the show stopper.
In my package.json, I’m pointing to: “react-native-text-input-mask”: “https://github.com/react-native-community/react-native-text-input-mask#abf0e7f”
I’m pinning it to the commit that merged your PR since I don’t want bleeding edge master all the time.
yarn installand then run it (tried both via terminal and Xcode) but am not able to get my app working.Xcode is returning the following on app start:
I have InputMask.framework inside Embedded Binaries and Linked Frameworks and Libraries. I also have it in Link Binary With Libraries.
Just to note, before upgrading this setup worked. Any ideas what I may be doing wrong or missed?
----- UPDATE
To overcome the above issue, I had to remove any remaining references to the react native core libraries in Xcode. Since Pods now handles this, it meant that all of those references had to be removed.
There used to be a whole bunch of .xcodeproj files in under the Libraries folder (for example RCTText, RCTAnimation etc). I deleted all of them (remove reference) and left only RNTextInputMask.xcodeproj
Also made sure there was nothing in Build Phases -> Link Binary With Libraries except InputMask.framework and libRNTextInputMask.a
Now running
react-native run-iosworks from the terminal!Unfortunately, running from Xcode does not.
After this, I then ran into the issue you were facing @k3ithl1m
Really odd that it works from the terminal but not from Xcode GUI.
---- FINAL UPDATE
Ok everything works now.
There were several warnings in yellow after doing
pod installthat I was ignoring.After listening to the above instructions and adding the $(inherited) flag to each corresponding area from the warnings, rerunning
pod installand then building the app, the RCTBridgeDelegate error was gone.It still failed during the build though. It failed with:
These lines were added for the sake of react-native-config and was removing yoga. I had to remove the following lines from my podfile:
Redid the
pod installand then test ran it in both Xcode and via terminal.Finally DONE! Works in the terminal and in Xcode. Crazy long, but hopefully helps anyone else who runs into the plethora of problems that one will face when upgrading RN to 0.60
@betoharres See setup first line for iOS here: https://github.com/react-native-community/react-native-text-input-mask#setup
That is you have to do following step mentioned in above link
iOS only: you have to drag and drop InputMask.framework to Embedded Binaries in General tab of Target
Adding use_frameworks! creates some build error that I don’t remember exactly, but after time struggling I made this worked!
GOD bless you, man. It worked not only for input mask, but for all the libraries without podfiles. One thing - you have to add this search pass to the library project itself, not for your root project. Maybe also pod ‘boost-for-react-native’, :podspec => ‘https://raw.githubusercontent.com/react-native-community/boost-for-react-native/master/boost-for-react-native.podspec’ in podfile helped me
Quick Tip for those who wants to install @waqas19921 fork but wants to keep the dependency at the exact commit that he fixed the Pod support. Run the command like this:
yarn add waqas19921/react-native-text-input-mask#ce7a78f#ce7a78fis his last commit at this time of writing.@waqas19921 version 2.0.0 not available via npm. Can you please make it a release?