i want to share text data between two iphone apps. How can i use paste board for this purpose. Can anyone help me with a sample code. Thanks in advance. Suggest me if there are better ways than pasteboard to accomplish my task.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you simply want to use IPC, make both of your apps recognize some URL scheme. Then call
to send, and use
-application:handleOpenURL:to receive.To share strings via the pasteboard, use
to save, and use
board.stringas a getter to retrieve the string to share. But if the user copy anything in between your shared data will be lost.Alternatively, you can share stuff via:
/var/mobile/Library/AddressBookandKeyboardandPreferencescan be accessed even if your app is sandboxed. This may violate SDK rules though.