views:

53

answers:

2

hi Friends i just want to know that how i can save the videos to the iphone simulator & how i can upload it to the web services.

Anks

A: 
vpc=[[UIImagePickerController alloc] init];
    vpc.delegate=self;
    vpc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    vpc.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:vpc.sourceType];
    vpc.allowsEditing = NO;
    vpc.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
    [self presentModalViewController:vpc animated:YES];

i am doing this it gives an error, kuTType undeclared before it used, i dont know about the kuTTypeMovies, please reply as soon as possible.

Thanks

Anki
that is for pick the video in iphone .. i save video file in iphone simulator through its ~library/Application support/iphone simulator/ DCIM/100APPLE.. but iphone simulator dont show anything
Anki
A: 

This question is the same as your. I already tried. It works

vodkhang
please read it crefully i dont about kuTTYpeMovies ? what s that >? i just want to know where shoul i have to declare it?
Anki
you neeed to import #import <MobileCoreServices/UTCoreTypes.h> . And please, don't put the code in the answer, few people will look at it, put it into the question as well
vodkhang
and your question also asks about how to save videos in iphone simulator, you need to write it carefully
vodkhang
#import <MobileCoreServices/UTCoreTypes.h> gives an error no such file or directory
Anki
i also provide the framework but code is not not working fy9, the problem is now to terminating the process
Anki
every thing is working fy9 now, but its not showing any images or video files.
Anki
you mean the UIImagePickerController doesn't show any images/videos in your simulator?
vodkhang
yep it shows no videos . but already copied videos in iphone simulator's core laction . i mean to say iphone simulator has photoes, And videos.. but it shows no videos.
Anki
Look at your comment, I think that it is not the right way to add the videos to iphone simulator, follow my link, in the answer
vodkhang
what comment man i just want to know the right way to add videos. in iphone simulator
Anki
Look at my answer, there is a link to a way to add videos to iphone simulator
vodkhang
i am unable to find 3.2 before media in iphone simulator core location
Anki
i tried your code but it gives me an error
Anki
pickVideoDemo[2709:20b] Error: Error Domain=com.apple.photos Code=13 UserInfo=0x3d31f20 "Operation failed because video file is invalid and cannot be played."
Anki
ah, did you "Put a video file into your application's Documents directory,", it has to be your iphone application's Documents directory. You should `NSLog@(@"%@", NSHomeDirectory());` to get the directory path in your MAC, go there, put a video. It is quite complicated
vodkhang
ok ,you are trying to say first i have to save the video file in my App Document then i have to declare the path for that video in my code...
Anki
You have to first save your video file in your App Document, then the NSHomeDirectory () will point directly to your app document folder
vodkhang
i did that but its not working the error is showen :pickVideoDemo[2709:20b] Error: Error Domain=com.apple.photos Code=13 UserInfo=0x3d31f20 "Operation failed because video file is invalid and cannot be played."
Anki
i tried your s code but its not working for me. iam doing things with that code which i previous post on this post. HEY VODKhang help me to get out of this.
Anki
It is hard to tell over text. You need to set a breakpoint before the taking video code run to see the **Application Document** path, then put it in there, then run the code
vodkhang
i tried breakpoint With my both apps. but nothing happen ?
Anki
will you please send me the sample code for that
Anki