Clipboard/Copy on iOS

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Clipboard/Copy on iOS

Post by Aduro91 » Wed Mar 27, 2024 7:01 pm

Is it possible on iOS for a script to work with something a user copies in a browser within the app?

I've tried 'put the clipboardData["text"] into field "check"' in the iOS simulator and nothing.

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Clipboard/Copy on iOS

Post by stam » Wed Mar 27, 2024 7:07 pm

I think copy/paste is restricted on iOS for security reasons, but don't take my word for it...

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: Clipboard/Copy on iOS

Post by Aduro91 » Wed Mar 27, 2024 7:29 pm

stam wrote:
Wed Mar 27, 2024 7:07 pm
I think copy/paste is restricted on iOS for security reasons, but don't take my word for it...
There does seem to be a barrier, this would make sense.

I want to have users sign up/ sign in to their paypal.me and then click the copy link button in the example below
Untitled 39.png
Untitled 39.png (68.48 KiB) Viewed 274 times
Then my app take the link and assigns it to their account. Otherwise its clunkier for users to have to go in and put their paypal.me username in manually. Its not that clunky but would be nicer for them to just click that button then its done

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Clipboard/Copy on iOS

Post by stam » Wed Mar 27, 2024 7:52 pm

I think the user should use the iOS long press to copy - as long as text is selectable should work…

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: Clipboard/Copy on iOS

Post by Aduro91 » Wed Mar 27, 2024 8:05 pm

stam wrote:
Wed Mar 27, 2024 7:52 pm
I think the user should use the iOS long press to copy - as long as text is selectable should work…
Thanks for the pointer. I suppose if long press works its better than having them manually go back and type it out.

Shame theres not a way to get it from the clipboard from the 'copy link' button, or some other way.

I considered put url for the script to read the html source, but I believe it comes up as the page without the user logged in. I also doubt it would work well to have the user input paypal username and password into LC fields, and have my script enter it into the login form and then look at the source and extract their paypal me username, since it often asks for image security things.

Long press might be the best way, thanks!

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: Clipboard/Copy on iOS

Post by Aduro91 » Wed Mar 27, 2024 8:48 pm

stam wrote:
Wed Mar 27, 2024 7:52 pm
I think the user should use the iOS long press to copy - as long as text is selectable should work…
I have another option.

Clicking the facebook button in a normal browser opens a new window with the username in the url, which I can extract doing this but with a lot more manipulation to extract any username from the messy url you get from that button.


on browserLoadRequested pUrl, pType
put pURL into field "check"
end browserLoadRequested

Post Reply

Return to “Talking LiveCode”