Closed JonathanWi closed 8 years ago
Looks like it's just a matter of updating the require.
Could you submit a PR if you have time? Otherwise, I'll tackle this over the weekend.
Hey thanks for the quick answer! I'm not sure how to update the require to be honest, would really appreciate if you have the time to do it!
Have a great week-end
I got this to work by following the instructions at: http://facebook.github.io/react-native/docs/linking-libraries-ios.html#content
there's an xcode project for the speech module that you drag in and add to your linker
@aportner is there anything you think I should add to the readme to make it more helpful?
nope, I think that's good. this was the first react native module I used, so I'm glad you included those instructions.
maybe move the "Linking the Library" part of the readme under Installation?
Thanks for the feedback @aportner.
I don't believe this issue was ever resolved. I am facing this same issue currently with React Native 0.14.2. The issue appears to be related to facebook/react-native#1821 like @JonathanWi stated initially.
I tried updating the require without success. It appears that NativeModules.SpeechSynthesizer does not evaluate to an object.
I'm having hte same problem @joshbuchea on 0.14.2.
Never mind, just got it working. This is the require update I had to make in SpeechSynethesizer.ios.js
to get it to work:
var NativeSpeechSynthesizer = require('react-native').NativeModules.SpeechSynthesizer;
var invariant = require('react-native').invariant;
Note, this is not the same as the PR submitted by Yonas which reads like this:
var NativeSpeechSynthesizer = require('react-native').NativeModules;
// var invariant = require('invariant');
var invariant = require('react-native').invariant;
Hey, still new to coding but got kind of the same problem as above. but updating the require in SpeechSynethesizer.ios.js didn't work for me. got the error
undefined is not an object('evaluating NativeSpeechSynthesizer .stopSpeakingAtBoundary')
any ideas ?
cheers
Did you rebuild your ios project in xcode?
link the xcodeproj and re-run the app.. should work fine.. It works fine for me.
Hi,
Your plugin looks very promising, and I'd love to use it in my current project, but it seems that - since React core update (see https://github.com/facebook/react-native/issues/1821 ), SpeechSynthesizer is not part of the core anymore.
When trying to install your plugin, I'm prompted with an error screen due tu SpeechSynthesizer not being part of NativeModules.
Any Ideas on how to fix this?
Cheers