I've seen many questions asked about how to add images to the simulator and have seen two answers: - Click and hold to save in Mobile Safari on the phone - Add the files to the 100Apple (or whatever) folder Both worked great in everything previous to iOS SDK 4.0. Those same methods no longer work for me, and neither for anyone else that I have seen.
I have tried to write an image to the photo library manually using the following chuck of code I found somewhere
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
UIAlertView *alert;
// Unable to save the image
if (error)
alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Unable to save image to Photo Album."
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
else // All is well
alert = [[UIAlertView alloc] initWithTitle:@"Success"
message:@"Image saved to Photo Album."
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
[alert release];
}
But it errors every time. So is it a problem with the write access of the simulator? or just some bug? I have already updated to the iOS 4.1 SDK in hopes of it being fixed, but it isn't.