Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Dependency Service Sample does not work

$
0
0

I tried runnign the Dependency Service Sample and it falls short running on iOS 8.4, either on device or in simulator. Works fine on Android.

It seems there's a bug in iOS with the AVSpeechSynthesizer and some Objective-C devs have recommended a workaround which I tried porting to C#... to no avail!

Workaround is here : http://stackoverflow.com/questions/24197952/avspeechsynthesizer-with-ios8

  • (AVSpeechUtterance *)utterance {
    if (!_utterance) {
    ...
    _utterance = [AVSpeechUtterance speechUtteranceWithString:@"hello world"];
    [_utterance setRate:0.2f];
    [_utterance setVoice:[AVSpeechSynthesisVoice voiceWithLanguage:language]];

    // iOS 8 bug fix
    AVSpeechUtterance *dummyUtterance = [AVSpeechUtterance speechUtteranceWithString:@" "];
    [dummyUtterance setVoice:[AVSpeechSynthesisVoice voiceWithLanguage:language]];
    [self.synthesizer speakUtterance:dummyUtterance];
    

    }
    return _utterance;
    }

Anyone tried this sample on current iOS and make it work ? Would be a great demo to actually implemented this as a platform specific pre-requesite on iOS!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>