UIPasteboard is used to store different types of data into iOS clipboard. We can store data of NSString, NSArray, UIImage, NSUrl, NSData into it and can retrieve the data into that particular format too.
Questions tagged [uipasteboard]
263 questions
7
votes
4 answers
iOS: How to copy HTML into the cut-paste buffer?
I'm interested in letting my users copy the text they've entered into the cut-and-paste buffer, but I'd like to do that as HTML.
Is such a thing even possible? Or do I need to use a MIME format? (I have no idea.)
Thanks.

Code Monkey
- 71
- 1
- 2
7
votes
1 answer
Sharing File Data Between Applications in Swift/iOS
I've been doing research on how to share data between applications securely. I'd like to get some info on the correct way to handle this before I do a deep dive on implementation using the wrong method. Just cause you can do something does not…

Unome
- 6,750
- 7
- 45
- 87
7
votes
2 answers
Copy GIF to UIPasteboard
I'm trying to copy a GIF image to the UIPasteboard in swift, at the moment it only copies the static version of the image and seems to convert it to PNG looking at the file extension when I upload it somewhere.
Wondered if anyone had any idea how to…

jackchmbrln
- 1,672
- 2
- 14
- 26
7
votes
1 answer
Filter UIPasteboard when copying web content from safari to contenteditable UIWebView
My app is a rich editor which uses UIWebView and HTML5's contenteditable feature.
Now, my app have some problem to deal with copying web content from safari to my UIWebView when the web content has any image.I want to replace the image html tag…

tangqiaoboy
- 1,476
- 1
- 15
- 32
6
votes
1 answer
The persistancy on my UIPasteboard is still active when the app is uninstalled. why?
I use the UIPasteboard class to use data with severals app. The doc say that the persistancy is removed when the creator application is uninstalled. I do two app, one for copy, the other for past:
creator app:
-(IBAction)paste:(id)sender{
…

Anthony
- 2,801
- 3
- 30
- 49
6
votes
2 answers
How to get programmatically the source of the pasteboard content on iOS
On iOS 14, when the user copy/paste content on another app, a notification is displayed with the name of the application where the pasteboard content came from :
Is it possible to get this information programmatically ?
For example, if the user…

dgp
- 683
- 3
- 13
6
votes
6 answers
Allow Full Access check in keyboards iOS10
Recently iOS has an update of iOS 10 & there are certain changes for developers one of the change is now we can't check allow full access the way we did previously is given below
-(BOOL)isOpenAccessGranted{
return [UIPasteboard…

iYoung
- 3,596
- 3
- 32
- 59
6
votes
2 answers
Paste Formatted Text, Not Images or HTML
I am trying to emulate the pasteboard behavior of the iOS Pages and Keynote apps. In short, allowing basic NSAttributedString text formatting (i.e. BIU) to be pasted into a UITextView, but not images, HTML, etc.
BEHAVIOR SUMMARY
If you copy…

DenVog
- 4,226
- 3
- 43
- 72
6
votes
1 answer
Privately sharing data between iOS apps that have different team IDs
How can I privately share data between two apps on the same device that have different team IDs? We used to do this via the pasteboard, but with iOS7 to use app-specific pasteboards they now have to have the same team id.
The problem we are trying…

Magic Bullet Dave
- 9,006
- 10
- 51
- 81
6
votes
1 answer
What is the "iOS rich content paste pasteboard type" when copying from Safari?
When I copy text from a website in Safari, two pasteboard items are created. This is the output of [pasteboard items]
(
{
"Apple Web Archive pasteboard type" = < [...archive...] >;
"public.text" = "pages of a journal,";
…

zolibra
- 532
- 6
- 16
6
votes
1 answer
How can I get the standard iPhone Copy bubble to appear on a UIImage?
In iPhoto, I can simply hold my finger over an image to get a "Copy" popup (like the popup you see in text boxes).
In my UIImageView's, this is not the case. How can I enable it?

Bill
- 44,502
- 24
- 122
- 213
6
votes
2 answers
UIPasteboard - cannot copy text
This code should copy the string to the generalPasteboard, as the [[UIPasteboard generalPasteboard] string] object, but the method causes the program to terminate.
- (void)copyResultToPasteboard {
NSString *message = self.resultTextView.text;
…

Boz
- 1,646
- 5
- 15
- 15
6
votes
1 answer
UIPasteBoard doesn't paste audio files?
I am developing an app in which one of the module is, A simple listing TableView which shows the list of audio file. When user selects any audio file an action sheet comes with one of the option SMS. I Need to send the particular audio file through…

Manu
- 4,730
- 2
- 20
- 45
6
votes
3 answers
Named UIPasteboard between apps?
Is it possible to use a named UIPasteboard (ie, not the global one) to transfer data between two apps?
the apps are completely independent of each other, so have different bundle IDs from different vendors
I'd like to use a named pasteboard, so the…

Matthew
- 1,363
- 11
- 21
6
votes
3 answers
How to clear/empty pasteboard on viewWillDisappear
I use UIPasteboard to copy/paste text between two UITextView.
Code looks like this:
- (void)viewDidLoad {
[super viewDidLoad];
pasteBoard = [UIPasteboard generalPasteboard]; //it is declared in .h as UIPasteboard…

Aleksey Potapov
- 3,683
- 5
- 42
- 65