Can anyone tell me how to add video the iPhone simulator so that I can test some apps I am working on? Thanks in advance!
okey, try this:
- (void) downloadVideo {
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sepwww.stanford.edu/sep/jon/trash/poolwaves.mov"]];
You can change the temp.mov to temp.m4v to save the vid in m4v.
NSString *tempPath = [NSString stringWithFormat:@"%@/temp.mov", NSTemporaryDirectory()];
[imageData writeToFile:tempPath atomically:NO];
UISaveVideoAtPathToSavedPhotosAlbum (tempPath, self, @selector(video:didFinishSavingWithError: contextInfo:), nil);
}
- (void) video: (NSString *) videoPath
didFinishSavingWithError: (NSError *) error
contextInfo: (void *) contextInfo {
NSLog(@"Finished saving video with error: %@", error);
}
if you change the url to your moviefile, this should work really well...
the movies are saved in this directory: /Library/Application Support/iPhone Simulator/4.3.2/Media/DCIM
but you are right, if i copy a file to it, it won't show up in the simulator
greets