Is it possible to use a named UIPasteboard (ie, not the global one) to transfer data between two apps?
Apple's docs say:
Pasteboards may be public or private. Public pasteboards are called system pasteboards; private pasteboards are created by applications, and hence are called application pasteboards.
The implication is that a pasteboard can be either "global and public" or "named and private".
I created two apps, with different bundle IDs, and seem to be able to pass stuff from one app to the other using a private named pasteboard. But is that just a feature of the iOS Simulator, or something which really supported but not well documented?
Thanks for any insight!
An object that helps a user share data from one place to another within your app, and from your app to other apps.
Get Pasteboard to save your time! You're able to create your templates or phrase like email reply, addresses used many times, game promo code, etc. Then paste them in any application just by tapping. Features you might love: - Work in any apps.
You can set a custom string for your pasteboard value and use that across your apps so your apps have to access the value with your unique string:
UIPasteboard *pasteboard = [UIPasteboard pasteboardWithName:@"youruniquestring" create:YES];
[pasteboard setPersistent:YES];
//save the unique identifier string that we created earlier
[pasteboard setString:@"your message"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With