photo和physics.soc ph的ph发音相同吗

swift3 - xcode 8 PHPhotoLibrary.requestAuthorization causing crash - Stack Overflow
Learn, Share, Build
Each month, over 50 million developers come to Stack Overflow to learn, share their knowledge, and build their careers.
Join the world’s largest developer community.
Display name
Email address
By registering, you agree to the
My app keeps crashing when running in the simulator everytime I try to request authorization for the photo library.
I am using the following code in my appDelegate in didFinishLaunchingWithOptions:
if PHPhotoLibrary.authorizationStatus() != PHAuthorizationStatus.authorized {
PHPhotoLibrary.requestAuthorization({ (status: PHAuthorizationStatus) in
Using xcode 8 beta with swift 3.0.
1,45941535
In my testing, iOS 10 doesn't like to output useful error messages unless you're running on an actual device. In this particular case, you probably haven't provided the key NSPhotoLibraryUsageDescription in your Info.plist file, and that value must be provided before requesting authorization.
8,19132755
Did you find this question interesting? Try our newsletter
Sign up for our newsletter and get our top new questions delivered to your inbox ().
Subscribed!
Success! Please click the link in the confirmation email to activate your subscription.
Have to allow access to photos on device. Add below key and string to your info.plist. The autocomplete in the property list view is "Privacy - Photo Library Usage Description". Or just open your info.plist in source code view and add the following:
&key&NSPhotoLibraryUsageDescription&/key&
&string&We need access to your photos.&/string&
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled扫二维码下载作业帮
3亿+用户的选择
下载作业帮安装包
扫二维码下载作业帮
3亿+用户的选择
photo的ph是什么音标?
肥沙貉脚001
扫二维码下载作业帮
3亿+用户的选择
photo ['fəutəu][f]
为您推荐:
其他类似问题
photo['foto]ph发f 音 (付)
扫描下载二维码An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click
to find out more about this error.}

我要回帖

更多关于 phphotolibrary使用 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信