[DatePicker] 0.12.0-rc gives: `DatePickerIOS` has no propType for native prop `RCTDatePicker.onChange` of native type `BOOL`
I upgraded from 0.11.0 to 0.12.0-rc and now I get:
DatePickerIOS has no propType for native prop RCTDatePicker.onChange of native type BOOL
I've leaned the project in xcode and reset the simulator, but to no wail. Can't see that I'm doing anything wrong.
Can you share with us the code you use for the DatePickerIOS stuff? Because I don't have any problem with my code or UIExplorer.
@olofd - you should clean your build with cmd+shift+k from Xcode and run it again. It looks like your native code is stale, because onChange is type RCTBubblingEventBlock on 0.12.0-rc and not BOOL
You were right! My bad! Sry!
I also have this issue, even after cmd+shift+k. Is there another level of staleness that cmd+shift+K might not clean?
This is the offending code. I have 0.12.0-rc
var RCTDatePickerIOS = requireNativeComponent('RCTDatePicker', DatePickerIOS, { nativeOnly: { onChange: true }, });
Wondering if it might have anything to do with project being created against 0.11.4?
Exactly same problem, and cmd+shift+k doesn't help, https://github.com/facebook/react-native/blob/master/Libraries/Components/DatePicker/DatePickerIOS.ios.js#L149 And last modification of the file https://github.com/facebook/react-native/commit/33036b1f01c1e3816745bfe9c243a478445559ee Thoughts ? edit: I clean my project with following methods
- Command+Option+Shift+K
- Command+Shift+K
- Clean derived data from Window -> projects
- "Reset Contents And Settings" in iOS simulator
and still same error
Ok for me the problem was solved closing packager terminal, cleaning project and running packager by myself. @mschipperheyn give it a try. this was caused because I opened a old react 0.11 project, and then went back to different project 0.12 without closing packager process. I hope it helps.
Just upgraded from 0.11.4 to 0.12. Still can't make the error disappear using those methods @brentvatne @alfonsodev
When I removed DatePickerIOS: require('DatePickerIOS'), on react-native.js, another error appears :
ScrollView has no propType for native prop RCTScrollView.snapToAlignment of native type NSString
Is this still stale native code?
@alvingarcia make sure you stop any existing packager terminal, clean from XCode and that you don't use an old bundle. Also I would even recommend a complete rm -rf node_modules if it still don't work.
@alvingarcia also check that new packager process that you run is actually running , sometimes it can fail on starting because for instance you have a chrome debugger session opened.
Just upgraded to 0.12.0 and started to notice this as well. I cleared all node_modules, cleaned out the build and reset content and settings for the simulator but still couldn't get it to work.
I even double checked and the code being executed was what @brentvatne mentioned earlier with it being RCTBubblingEventBlock.
Finally ended up just restarting my computer and now everything is working fine.
Facing the same problem on 0.12.0
same problem here
same here, too. restarted the system as @christopherdro said and it started working fine.
same here. tried restating the packeger , cleaning and nothing
@ohadpartuck Did you try restarting your computer?
Seeing this same issue with a brand new react native integration to an existing applicaiton. Using nothing but simple view demos
I run this, which I have in my .bash_profile, which deletes XCode derived data. It’s the location where Xcode stores all kinds of intermediate build results, generated indexes, etc.
ddd() {
#Save the starting dir
startingDir=$PWD
#Go to the derivedData
cd ~/Library/Developer/Xcode/DerivedData
#Sometimes, 1 file remains, so loop until no files remain
numRemainingFiles=1
while [ $numRemainingFiles -gt 0 ]; do
#Delete the files, recursively
rm -rf *
#Update file count
numRemainingFiles=ls | wc -l
done
echo Done
#Go back to starting dir
cd $startingDir
}
then I restarted XCode, cleaned, removed app from Simulator
restarted packager
then rebuilt
It works fine now (at least for me) but this needs to be traced to the root cause and resolved properly
@christopherdro yes, tried now. still nothing. also tried @idibidiart solution.
Check with 'ps aux' is still any packager process running? Also when packager starts have a look to the output, it can fail when starting. On Oct 17, 2015 09:27, "Ohad Partuck" [email protected] wrote:
@christopherdro https://github.com/christopherdro yes, tried now. still nothing. also tried @idibidiart https://github.com/idibidiart solution.
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/3154#issuecomment-148892833 .