How to get selected text in ios build ionic3

#1

i am using this code for get selected text in android, but in ios it not working please help me.
var selectedText = “”;
if (window.getSelection){
selectedText = window.getSelection().toString();
console.log(‘selectedText’,selectedText)
}