[TIMOB-23799] iOS: Support Named Pasteboards
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-03-30T22:08:33.000+0000 |
| Affected Version/s | Release 5.5.0 |
| Fix Version/s | Release 6.1.0 |
| Components | iOS |
| Labels | qe-5.5.0 |
| Reporter | Eric Wieber |
| Assignee | Vijay Singh |
| Created | 2016-08-22T16:19:27.000+0000 |
| Updated | 2017-03-31T17:34:22.000+0000 |
Description
Being able to create Named Pasteboards is a large feature of Pasteboards described in https://developer.apple.com/reference/uikit/uipasteboard that we currently do not support.
Ideally, we would support this feature in addition to the General Pasteboard that we support now.
PR: https://github.com/appcelerator/titanium_mobile/pull/8821 Test Case -
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); var btn = Ti.UI.createButton({ title: 'Trigger' }); btn.addEventListener('click', function() { var clipboard = Ti.UI.createClipboard({ allowCreation: true, name: 'test', }); Ti.API.info('clipboard name is: ' +clipboard.name); clipboard.setText('Hello'); Ti.API.info('clipboard text is: ' +clipboard.getText()); var uniqueClipboard = Ti.UI.createClipboard({ persistent: true, unique: true }); Ti.API.info('Unique clipboard name is: ' + uniqueClipboard.name); uniqueClipboard.setText('Hello'); Ti.API.info('Unique clipboard text is: ' + uniqueClipboard.getText()); }); win.add(btn); win.open();Verified in SDK version 6.1.0.v20170330151255. Test information and other information can be found at https://github.com/appcelerator/titanium_mobile/pull/8821.