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!
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
Andrew Kelly
4,738 PointsAnother Ribbit Question
Hey Guys,
I'm wondering if anyone else has run into an issue with Ribbit hanging when trying to record a video?
I'm pretty much through the whole course with no errors. I just finished the course about viewing Videos within the inbox.
I tried to upload a video to make sure that the code was working as expected and the app ended up freezing.
I don't know if this is something I have done wrong and I am more then willing to post code, I just didn't want to post the whole app right away.
I wasn't sure if it could be my own phone as well. It's near its limit for file sizes and sometimes chugs. It's an iPhone 4S running iOS 7.1
The only other thing I can think of, is that there's an issue with the upload. The problem with that is I'm not seeing any errors on that end as well.
Any help would be appreciated.
Thanks so much, Andrew
9 Answers

Patrick Donahue
9,523 PointsI GOT IT!
You are missing a curly brace!
if ([mediaType isEqualToString:(NSString *)kUTTypeImage]) {
self.image = [info objectForKey:UIImagePickerControllerOriginalImage];
if (self.imagePicker.sourceType == UIImagePickerControllerSourceTypeCamera) {
UIImageWriteToSavedPhotosAlbum(self.image, nil, nil, nil);
}
} else {
Just need to add it before the "else" statement in the didFinishPickingMedia method.

Stone Preston
42,016 Pointsnice catch. thats so weird it even compiled.

Patrick Donahue
9,523 PointsYea - I don't get it either.

Andrew Kelly
4,738 PointsI am currently getting nothing at all. As soon as I tap on the button "Use Video" the app becomes unresponsive.
If I tapped on "Retake" or "Cancel" buttons before hitting the "Use Video" everything responds as expected. It isn't until I hit the "Use Video" button does it freeze.
So far the only logs I am getting are my own and the only exception comes from the timeout function being deprecated in iOS 7 (Which wasn't there when I posted the question, I had just finished the course)
Thanks for the help Stone.

Stone Preston
42,016 Pointsif you want to put your project on dropbox or github il take a look at it

Andrew Kelly
4,738 PointsThat would be great. The dropbox location is: https://www.dropbox.com/sh/1z8mglh2qgu37em/AABlPxR4ZriuSGdwpC89kXroa
Thanks again Stone.

Stone Preston
42,016 Pointsunfortunately I forgot I dont have a cable with me right now, so I cant test it on a device to test the video. ill take a look later today though and see what happens

Andrew Kelly
4,738 PointsNo worries Stone. I just appreciate you taking the time to look at it. It's been a little thing that hasn't stopped me from moving forward but has been bugging me so I thought I'd finally ask today.
I am in no massive rush... again, I just appreciate the help.

Patrick Donahue
9,523 PointsI pulled your code to see if I can help. I cannot save a video - the app freezes and I am not getting anything in the console.
My user name is Patrick - just in case you saw a new user in your database. I am going to set some breakpoints and do some more research. I am using an iPad mini retina 7.1.

Andrew Kelly
4,738 PointsThanks Patrick! I really appreciate your help.

Stone Preston
42,016 Pointstry removing the lines that save the video to the library in your didFinishPickingMedia method and see what happens.
these are the ones:
if(UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(self.videoPath)) {
UISaveVideoAtPathToSavedPhotosAlbum(self.videoPath, nil, nil, nil);
}

Andrew Kelly
4,738 PointsI don't believe that is the solution unfortunately. It has continued to freeze even with the code removed.

Andrew Kelly
4,738 PointsThat's so great Patrick! Thanks so much. That was a sneaky one as the indenting totally hide it from me. I really appreciate all your help.
I sent you a video to say as much.

Patrick Donahue
9,523 PointsNot a problem! Thanks for the video - I appreciate it!
Stone Preston
42,016 PointsStone Preston
42,016 Pointswhen you say it freezes do you get any exception info in the console?