UIPasteboard Handoff bug

Originator:an00na
Number:rdar://28809480 Date Originated:17-Oct-2016 05:07 PM
Status:Closed Resolved:iOS 11
Product:iOS SDK Product Version:10.0
Classification:Serious Bug Reproducible:Sometimes
 
Summary:
Copying something into pasteboard on Mac causes UIPasteboard content thrashing on iPhone if these two devices Handoff to each other.

It is easy to reproduce in my real app with busy works. Not so easy to reproduce in the sample app, so please have patience. It will occur.

Steps to Reproduce:
1. Copy an image in Photos app.
2. Launch sample app on your iOS device. It should show the copied image.
3. Copy some text on a mac that Handoff to your iOS device.
4. Wait to see the image disappear.(If it doesn't disappear it is another UIPasteboard Handoff bug that makes pasteboard content transferring unreliable.)
5. Wait longer(may take as long as several minutes) to see image appear again.
6. Wait longer(may take as long as several minutes) to see the image disappear again.
7. Repeat 5~6. Read the console logs.

Some tips that may help reproduce the issue: 
* Tap Home button to go to springboard and then return to the app.
* Reorder steps 1~3.

Code: https://cloudup.com/cjMK5Apubcy

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!