Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

No Photos in iPhone Simulator. How to add photos?

mkrollmkroll Posts: 15Registered Users
edited December 2010 in iOS SDK Development
Hi all,
it seems, that the sample photos included in the iPhone Simulator are deleted after resetting the simulator as well.

Is it possible to add images to the simulator again in order to test an application using a UIImagePicker?

Thanks,
Michael.
Post edited by mkroll on
· ·

Replies

  • safa_uksafa_uk Posts: 6New Users
    edited August 2008
    I had the same problem and its because I clicked on the "Clear iPhone Cache and Content" but it seems to get rid of everything,

    all you need to do is just re install the whole of xcode again, you don't need to uninstall first just install over previous and the images will be back on the iPhone simulator.

    the good thing as well is that you dont loose any of your xcode settings.
    · ·
  • hijinkshijinks Posts: 75Registered Users
    edited August 2008
    I got this from a IRC chat room. All the directorys and file names are case sensitive. So when I use. JPG I mean use JPG not jpg.

    Place your images in

    ~/Library/Application Support/iPhone Simulator/User/Media/DCIM/100APPLE

    Create the 100APPLE if it is not there

    Rename your files like

    IMG_0000.JPG
    IMG_0001.JPG
    IMG_0002.JPG

    That will put them in the photo album. You do not see thumbnails though. I haven't figured that out.. I was told make copies and name them THM file types but i didn't get it to work.. but its better then re-installing.
    <a href="http://iphone.zcentric.com" target="_blank">Iphone Noob</a> iPhone Development Blog. Learn to develop for the iPhone SDK with me
    · ·
  • DevTeamOfOneDevTeamOfOne Posts: 361Registered Users
    edited August 2008
    you could just access the net via the web browser in the simulator.

    find an image.

    Hold your click on it.

    it will popup asking if you want to save an image to your library.

    Do so.

    Tada.
    · ·
  • cacaodevcacaodev Posts: 17Registered Users
    edited August 2008
    Sorry but what does "hold the click" means in the simulator ?

    -TX-
    · ·
  • Jeremy1026Jeremy1026 Posts: 1,096Registered Users @ @ @ @
    edited August 2008
    cacaodev wrote: »
    Sorry but what does "hold the click" means in the simulator ?

    -TX-

    I would assume it means click but don't release the mouse button.
    <a href="http://www.1026dev.com/55555_contest" target="_blank">1026 Development's Bingo World Wide 55,555th Winner Contest</a><br />
    <a href="http://itunes.apple.com/us/app/bingo-world-wide/id291539020?mt=8" target="_blank">bingo
    · ·
  • KentKent Posts: 3New Users
    edited November 2008
    The Safari method also gets you thumbnails.
    · ·
  • scottiphonescottiphone Posts: 802Registered Users
    edited November 2008
    Just drag your own photos to safari on the iphone.
    Press and hold to save them.
    · ·
  • hemalimojidrahemalimojidra Posts: 12Registered Users
    edited November 2008
    make new application on iphone in sdk.

    and make UIImage objects of your images which you want to see in your iphone

    put this in applicationDidFinishLonching function

    UIImage * sShot = [UIImage imageWithName:@"imageName.jpg"];
    UIImageWriteToSavedPhotosAlbum(sShot, nil, nil, nil);


    This two line will save your imageName.jpg image file in your iphone similator.

    do this for your all images..
    · ·
  • jeff_lamarchejeff_lamarche Posts: 420Registered Users
    edited November 2008
    <a href="http://iphonedevelopment.blogspot.com/" target="_blank"><font color="red">Check out my iPhone Dev Blog</font></a><br />
    You can send me e-mail at my forum username at mac dot com.
    · ·
  • City41City41 Posts: 88Registered Users
    edited November 2008
    Just drag your own photos to safari on the iphone.
    Press and hold to save them.

    Exactly. Dragging a photo into the simulator opens it in Safari. Doesn't have to be so difficult people :)
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=304982096&mt=8" target="_blank">Man the Turrets!</a>, from <a href="http://www.cityfortyone.com" target="_blank">City41</a>
    · ·
  • cameron50cameron50 Posts: 8New Users
    edited August 2009
    How would I reinstall xcode?
    · ·
  • aryaxtaryaxt Posts: 570Registered Users
    edited February 2010
    thanks this worked, u can also drag and drop images into simulator, and then save them
    · ·
  • rocotilosrocotilos Posts: 3,292iPhone Dev SDK Supporter, Registered Users @ @ @ @ @
    edited February 2010
    Yep, just drag any image from any where in your mac, into the iphone sim screen. that'll open up the safari inside the simulator. then you click and hold on the image, a actionsheet will pop up and select Save Image. you're done.

    for me, i always backup the images, which is under ~/Library/Application Support/iPhone Simulator/User/Media/DCIM/100APPLE to another folder. So when I do a Reset Settings for iphone sim, i then just copy it back to that place.
    · ·
  • RobinSummerhillRobinSummerhill Posts: 1New Users
    edited September 2010
    Dragging photos into the simulator is OK if you have just one or two. If you need to import more then check out this article. It describes how to do a bulk import of photos with correct generation of thumbnails and updating of the photos database. It works on all versions of the simulator including 4.x.
    · ·
  • TapTouchClickTapTouchClick Bay Area, CAPosts: 679New Users @ @ @
    edited September 2010
    I made a quick app that scraped google images and saved the first page all to photos album. Let me see if I can find the project.
    <a href="http://taptouchclick.com" target="_blank">Our website</a>
    · ·
  • JohnAvatar™JohnAvatar™ Posts: 4New Users
    edited October 2010
    Someone said it! All you have to do is find your image, or images (I used JPEG's), drag them into the simulator window. Safari will open with your image in the browser window. Left click (if on a MacBook Pro, or use your mouse) on the image, a popup window should open offering for you to save your image. Click on save and your image(s) will be in your Photo app.

    That's it! Very simple.

    Thanks to all for the clues.... I was wondering how to do this and I was looking for the complicated solution, like dragging images to a Simulator folder somewhere, but you guys pointed me to just dragging images to the simulator window!

    Because of that, I've now registered to this site as one of my favorite iPad/iPhone/iPod Touch developer resources.

    Thank you,
    John Avatar™:D
    · ·
  • JohnAvatar™JohnAvatar™ Posts: 4New Users
    edited October 2010
    Anyone in the Pacific Palisades, Malibu, Santa Monica, CA (90402) area, want to co-venture/co-develop some really cool, revolutionary apps and new hardware with me? I've just formed this new company and plan to grow it fast, with a massive IPO in the near future....

    My first two, silly GodApp's are at the Apple App store, and exercise in the process, from beginning to finish, on developing and getting Apple App's released. I'm working on the real ones now (including hardware).

    Thanks!
    John Avatar™
    Email: JohnAvatar@JohnAvatar.com
    · ·
  • xpousxpous Posts: 1New Users
    edited December 2010
    Is there a way with the SDK to acquire the images from the images in Photo Albums uploaded from iTunes?


    mkroll wrote: »
    Hi all,
    it seems, that the sample photos included in the iPhone Simulator are deleted after resetting the simulator as well.

    Is it possible to add images to the simulator again in order to test an application using a UIImagePicker?

    Thanks,
    Michael.
    · ·
  • dany_devdany_dev Posts: 4,696Tutorial Authors, Registered Users @ @ @ @ @
    edited December 2010
    xpous wrote: »
    Is there a way with the SDK to acquire the images from the images in Photo Albums uploaded from iTunes?

    no, you need to copy it on the right simulator directory.
    · ·
  • JohnAvatar™JohnAvatar™ Posts: 4New Users
    edited December 2010
    I testing this out, but yeah, as someone said, open up the Apple iOS simulator and drag an image to the simulator window (iPad, or iPhone/Touch), then click on that image, hold it and you will be asked to save it. That's it!

    Pretty simple.
    · ·
Sign In or Register to comment.