Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
DXATC Design
3,333 PointsThe camera button isn't showing up?
I followed everything as far as I can tell, but there isn't a button showing up in the bottom. I'm using Xcode 8 and swift 3 though, so I'm worried i've done something wrong..
2 Answers
Zheng Wei Quah
6,850 PointsTry downloading the project files and making sure that you have copied the snippets right!
I am using Xcode 8 and Swift 3 and there is no problem.
However, the video has omitted an additional step to be done in Info.plist that may result in fatal error when clicking the camera button.
From Apple Docs: To protect user privacy, an iOS app linked on or after iOS 10.0, and which accesses the user’s photo library, must statically declare the intent to do so. Include the NSPhotoLibraryUsageDescription key in your app’s Info.plist file and provide a purpose string for this key. If your app attempts to access the user’s photo library without a corresponding purpose string, your app exits.
Have fun coding!
p.s. same concept for accessing camera
Evan Goodwin
Courses Plus Student 22,260 PointsJust to clarify how to resolve the NSPhotoLibraryUsageDescription error for iOS 10.
Go to info.plist Click + sign on the last item in list Under 'Information Property List' choose Privacy - Photo Library Usage Description in the 'Value' column put 'FaceSnap requires access to the photo library'. save
run simulator and push button. Permission pop up should appear with the text in the Value column.
luke jones
8,915 Pointsluke jones
8,915 PointsDid you fix the problem?