Koden Koden - 1 month ago 15
iOS Question

System.setClipboard not working for ios (AS3)

This question has been asked before but it was a few years ago and there was no clear cut answer

Simply put

System.setClipboard(this.text);


Is not working for ios publishings, although the code is working with no problems in a mac osx.

Answer

You need this

import flash.desktop.Clipboard;
import flash.desktop.ClipboardFormats;

Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT,this.text);