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
Alex Hedley
16,381 PointsSaving the Media [Build a Self-Destructing Message iPhone App]
Hi,
I'm getting the following error when adding code to the
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
...
}
self.videoFilePath = [[info objectForKey:UIImagePickerControllerMediaURL] path];


iOS Development > Build a Self-Destructing Message iPhone App > Capturing Photo and Video Using UIImagePickerController > Saving the Media
Course Link Link
(Edit: I'm using XCode5-DP2, deployment target 6.1 but iOS SDK 7.0)
2 Answers
Patrick Serrano
13,834 PointsI had the same issue. Ben seems to think it is a bug in the SDK beta. What is happening is that the path method that is being called is the wrong method. Split the method calls up and put them on two lines and everything will work fine.
Take a look at my thread from last week. https://teamtreehouse.com/forum/error-when-setting-videofilepath-in-saving-the-media-chapter-of-build-a-selfdestructing-messaging-app
Alan Johnson
7,625 PointsI haven't run through that course just yet, but it looks like that method's expecting a string and getting a pointer to an object type. I'd look and see if maybe you're handing it the wrong key there?
Alan Johnson
7,625 PointsOh, and I meant to say, but Ben Jakuben will be the best person to help out here. HALP BEN, you're our only hope!
Alex Hedley
16,381 PointsThat's awesome, thanks Alan :)
The sample code works fine so think I've made a goof somewhere, just looking about for any obv mistakes but thought I'd post here too.
Ben Jakuben
Treehouse TeacherAlan Johnson, I think you need to do a Quick Tip on how to find the perfect animated gif.

Alex Hedley
16,381 PointsAlex Hedley
16,381 PointsThanks Patrick, I'll add the following:
codemonkey3
656 Pointscodemonkey3
656 PointsHi Patrick, do you get cloud code error when sending image to parse? Can you take a look at my thread:
https://teamtreehouse.com/forum/invalid-type-for-key-file