2015-10-06 24 views

回答

4

这个问题出现在iOS版9时,您的应用程序信息.plist文件包含一个键:具有空字符串值的“CFBundleDisplayName”。

你可以在那里输入你的应用程序名称,它应该工作。

键{捆绑显示名称}值$(PRODUCT_NAME)

同样的问题,目前存在和解决方案 App does not have access to your photos or videos iOS 9

+0

真的是非常好的答案!它帮助我很多,非常感谢! –

+0

向plist添加Bundle显示名称后,删除应用程序,清理,删除DerivedData ...没有...不要。无法再次显示权限弹出窗口。 – bauerMusic

+0

http://i.imgur.com/YlgHUFC.png并尝试填写隐私 - 图片库使用说明它适用于我的情况 –

1

你不需要在你的info.plist中有一个键。首先可以肯定的:

  • 通过导入链接二进制与图书馆的Photos.framework
  • 导入照片到您的视图控制器

    let status = PHPhotoLibrary.authorizationStatus() 
    
        if status == .Authorized {    
         // Permission Authorized  
        } else if status == .Restricted {    
         // Permission Restricted 
        } else if status == .NotDetermined {   
         // Permission Not Determined 
        } else if status == .Denied {   
         // Permission Denied 
        } 
    
+2

,如果我们进入没有确定如何,我们得到了iOS权限提示,显示的条件? – user2363025