Use the iOS 10+ UICloudSharingController
in Appcelerator Titanium.
- Copy the
ti.cloudsharing
folder to yourlib/
(Alloy) or your Resources (Classic) directory - Copy the example code to your Titanium app
- Go for it!
var CloudSharing = require('ti.cloudsharing');
var window = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var btn = Ti.UI.createButton({
title: 'Show message!'
});
btn.addEventListener('click', function() {
var cloudItem = CloudSharing.createShareItem({
filename: 'titanium.png',
label: 'Titanium Logo',
type: 'com.appcelerator.cloudsharing'
});
CloudSharing.openShareDialog({
item: cloudItem,
permissions: [CloudSharing.PERMISSION_ALLOW_PUBLIC, CloudSharing.PERMISSION_ALLOW_READ_ONLY]
});
});
window.add(btn);
window.open();
MIT
© 2017 by Appcelerator