How to enable file sharing for my app?

链接:http://stackoverflow.com/questions/6029916/how-to-enable-file-sharing-for-my-app

I have an image editing app where users can apply effects to photos. How could I enable it so that users can see my app in iTunes in the File Sharing tab and then just drag+drop photos to the app? Some of the eBook readers like Stanza works like this and it would be a cool option. Maybe someone can point out a tutorial or resource that talks about how to enable and use this technique.

You just have to set UIFileSharingEnabled (Application Supports iTunes file sharing) key in the info plist of your app. Here's a link for the documentation. Scroll down to the file sharing support part. You must also define CFBundleDisplayName (Bundle Display Name), if it isn't already there. More details here.

链接:http://blog.csdn.net/any2mobile/article/details/38410981

链接:http://stackoverflow.com/questions/14925214/how-to-set-a-custom-folder-with-uifilesharingenabled-yes

You can't. iTunes only shows the contents of the app's Documents directory. iTunes doesn't let a user view the contents of folders insideDocuments.

这里要注意的是,你一定要把要共享的文件放在 Documents 根目录,不能是子目录!!! 不然 iTunes File Sharing 只会显示子目录,不会让用户点击进入子目录,也意味着放在子目录的文件不允许读取。所以一定要把文件直接放在 Documents 下,如 

/Applications/90E35BBE-7B62-4D1B-A495-809BC34AB64A/Documents/love.mp3



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值