[TIMOB-24614] iOS: AVFoundation/AVSpeechSynthesizer class not found
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-09-25T18:52:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Hyperloop 2.2.0 |
Components | Hyperloop |
Labels | ios |
Reporter | Naga harish M |
Assignee | Jan Vennemann |
Created | 2017-04-20T20:29:05.000+0000 |
Updated | 2017-10-02T23:39:14.000+0000 |
Description
Hi,
I tried to load AVSpeechSynthesizer like this in Appc titanium mobile app using hyperloop.
var AVSpeechSynthesizer = require('AVFoundation/AVSpeechSynthesizer');
But getting below error.
[ERROR] : An error occurred during build after 3s 610ms
[ERROR] : The iOS class "AVSpeechSynthesizer" could not be found in the framework "AVFoundation". (../build/iphone/build/Products/Debug-iphonesimulator/soispeech.app/testSpeech.js)
But when I tried like this var AVSpeechSynthesizer = require('hyperloop/avfoundation/avspeechsynthesizer');
did not get any error and my code is working as I expected.
When I am unable to load like this, where as other classes are loaded in same
var AVSpeechSynthesizer = require('AVFoundation/AVSpeechSynthesizer');
I am doing anything wrong or did I need to config something before I load this class in to JS file.
Looks valid, moving to Engineering!
I also noticed that even when using the workaround, when you continue to the next step of:
you will get the following error: {noformat} [ERROR] TypeError: undefined is not a constructor (evaluating 'new AVSpeechSynthesizer()') {noformat}
PR: https://github.com/appcelerator/hyperloop.next/pull/211
Verified fix is in Hyperloop 2.2.0. Able to build when referencing AVSpeechSynthesizer.