ClipboardText Class For iOS

Hi,

I am trying to implement copy- paste text feature for iOS. I am making web app using Cocos Creator. A same code working for Android but for for iOS.

onClipboardText: function (callback) {

    if (cc.sys.isBrowser) {
        if (!!navigator.clipboard && !!navigator.clipboard.readText) {
            navigator.clipboard.readText().then((text) => {
                callback(text);
            });
        }
        else{
            callback();
        }
    }
},

Can someone please help me how I can fix for iOS.

Hi @zzf_Cocos thank you for revert but I am trying to copy paste feature on web browser. When I am opening my web app on Android install browser its working fine but for iOS, its not working.

I think if I use “if (cc.sys.isBrowser)” instead of (cc.sys.isBrowser), then it will try find native iOS (.ipa) file.