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
0
votes
1 answer
Copy Custom font with with Font Style and Font Size
It's paste simple text when I copy text with below code.
let range = NSMakeRange(0, tvTexta.attributedText!.length)
let rtfData = try! tvTexta.attributedText!.data(from: range,
…

Krunal Nagvadia
- 1,083
- 2
- 12
- 33
0
votes
2 answers
How to fix 'sharing to instagram stories' in iOS 13 using URL Scheme
I have implemented sharing to insta stories which are working fine for iOS 12 but not working on iOS 13.
I have tried/verified following points
Verified URL Scheme
Checked changes to UIPasteBoard
Verified asset urls
Everything is as per…

Shahbaz Saleem
- 317
- 2
- 14
0
votes
0 answers
UIPasteBoard items Any is not Any?
So i'm going to send data back and forth between 2 applications and i thought since it's A LOT of data in different models i can use a UIPasteboard. However i can't get it to work. Here's the code and issue.
struct TestModel {
var value1: Int =…

Vollan
- 1,887
- 11
- 26
0
votes
1 answer
UIPasteboard not giving value
An object that helps a user share data from one place to another within your app, and from your app to other apps.
This is the statement written at the very beginning of UIPasteboard docs. But when I try to use it in two different apps accessing…

Thullo
- 97
- 15
0
votes
0 answers
How to Paste from UIPasteBoard into WKWebView?
I am attempting to have a UIBarButton (right side) as a paste button. The user will have already copied text to the UIPasteBoard in the previous ViewController. When hitting the UIBarButton (Paste), The text should appear on the text field on the…

Juan Mireles II
- 99
- 1
- 2
0
votes
1 answer
Detect if user copied text from textfield
I want to use the word that user copies from my app textfield.
I found this code:
NotificationCenter.default.addObserver(self, selector: #selector(clipboardChanged), name: UIPasteboard.changedNotification, object: nil)
But 'clipboardChanged'…

Ahmadreza
- 6,950
- 5
- 50
- 69
0
votes
1 answer
ios UIPasteboard equivalent on flutter
How can i access the pasteboard of iOS using Flutter? I can manipulate only text with Clipboard.setData(ClipboardData(text: 'mycontent'));, but i need send data to my clipboard. Some help?

outrowender
- 351
- 1
- 5
- 17
0
votes
0 answers
IOS/Objective-C/Xcode: Copy text to clipboard
I am experiencing some strange behaviour.
I have the following code in my app that is supposed to pre-fill a long link in a clipboard so the user only needs to paste.
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
…

user6631314
- 1,751
- 1
- 13
- 44
0
votes
3 answers
prevent uitextfield to paste non numeric string
I am using a textfield with phone number.
The copy paste is enable in Textfield.
The textfield should not take non numeric value.
But the problem is that if paste any String i takes non numeric value.
I have tried below code but not getting…

guru
- 2,727
- 3
- 27
- 39
0
votes
0 answers
UIPasteboard Pasting Formatted RTF
I'm copying an NSAttributedString with text and a custom font to UIPasteboard as RTF, with the following code:
let attrString2 = NSAttributedString(string: myString!, attributes: [NSAttributedStringKey.font: UIFont.init(name:…

Jacob Perks
- 11
0
votes
1 answer
How to know the url in UIPasteboard.general.URL is valid?
If the url get from UIPasteboard.general.URL is always valid URL? My requirement is if the string in UIPasteboard is a valid url, I will show "Paste and Go", if not, I will show "Paste and Search".

lypw2009
- 201
- 3
- 11
0
votes
1 answer
How can we get text while user copying message from whats up , Skype and so on like third party app using iOS Swift?
Step 01: I can run my app (APP NAME : TextDetectAPP)
Step 02: User press Home button
Step 03:User open the Skype or any third party app (APP NAME : TextDetectAPPMove to Background state )
Spep04: User copy text (I need to get copy text from Skype…

suripappu Rengan
- 61
- 1
- 1
- 5
0
votes
1 answer
copy-paste in searchbar isn't working while copying from other apps
Do I need to explicitly code something to have this feature? After long press on the searchbar, the paste button comes, do I need to implement any delegate method for that button? Or it is implicit?

user804417
- 155
- 2
- 13
0
votes
0 answers
Issues with UserDefaults.standard.value(forKey: "barcodeId") as! String
Can anyone tell me why the copied data from user defaults is not passing the correct value? Below is my code, the weird part about all of this is outside of the app, when pasting on to notes or safari on the device. It does indeed past the correct…

Tiktak132
- 21
- 6
0
votes
0 answers
Auto populate data from UIPastboard to UIwebview
I currently made an app that has a UIwebView and a button that invokes the camera. I've managed to successfully get the data to store in UIPastboard. But how do I auto-populate the barcode data on to display on a webbased form? I know I will need to…

Tiktak132
- 21
- 6