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
James Atlee
203 PointsInstall DB camera
I want to integrate this custom camera, called DB camera. https://github.com/danielebogo/DBCamera/blob/master/README.md But im not really sure on how to do it. I need some better instructions than the ones they provide.
2 Answers
James Atlee
203 PointsYes I did. I get FBTokenInformation errors. And by the way I am trying to implement this custom camera view into the self destructing messaging app
Stone Preston
42,016 Pointsit seems pretty simple. install cocoa pods (Treehouse has a short course on using cocoa pods here. then add pod 'DBCamera', '~> 1.1.2' to your podfile and run the pod command to install this one.
then import it into your viewController class:
#import "DBCameraViewController.h"
#import "DBCameraContainer.h"
and conform to the protocol in your viewController's .h file
@interface RootViewController () <DBCameraViewControllerDelegate>
then implement the following method (there are several ways to present it, this one seems the simplest)
- (void) openCamera
{
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[[DBCameraContainer alloc] initWithDelegate:self]];
[nav setNavigationBarHidden:YES];
[self presentViewController:nav animated:YES completion:nil];
}
and call that method when you want to present the camera. I havent tested this mind you so im not certain this is the way to do it, but I think it will work
James Atlee
203 PointsWhen I try to run it, I get a lot of Apple Mach-O linker errors
Stone Preston
42,016 Pointsare you using the workspace that was generated after you ran the pod command? you need to use that workspace in order for the pod to work
Stone Preston
42,016 PointsStone Preston
42,016 Pointsyou are getting facebook token errors? im not really sure why this would affect that...hmm strange. remove any code related to the camera you added and see if the errors persist. if they do, something else is wrong with your project
Thomas Numan
2,241 PointsThomas Numan
2,241 PointsTo solve the FBTokenInformation errors add the frameworks :