Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I put a live photo into the iOS Simulator?

I want to create an app to display a live photo. But I don't have an iPhone 6S. Is there a opportunity to put a live photo into the iOS Simulator? Thanks!

like image 849
Beeke Avatar asked Jun 01 '16 12:06

Beeke


People also ask

Does Camera work in iOS simulator?

The Camera doesn't show on iOS simulator, but works on Android emulator ❓ #1045.

Can you install apps on iOS simulator?

Install Apps on SimulatorsTo install an app on a connected simulator, follow these steps. Go to Apps > Install Application. Find and open the app you want to install from your Mac. The app appears in the list of installed apps on the right side of the iOS Gateway window.


1 Answers

The interface has improved greatly since this was originally asked/answered. It's now very easy to do this.

  • Go to Photos App and find the LivePhoto(s) you want to put on your (simulated) device.
  • Select the photo(s), go to File-> Export-> Export Unmodified Original For n Photo....
  • The saved files will be exported to your Desktop. There will be two files for each LivePhoto.
  • Drag both files (for each live photo) onto the simulator device.
  • LivePhotos are created and automatically placed in your simulated device's photo gallery.

enter image description here

Original Answer:

This is how I did it. Using the PhotosUI interface, my app asks for a LivePhoto. Using the PHAsset it gives me, I save a local copy of the .mov file and the high quality .png image. These two files are the "LivePhoto". In Xcode, I go to Devices with my phone connected, select the app, click on the settings cog icon at the bottom and select download container. Go to Finder, right click on the .xcappdata file I just downloaded, select ShowPackageContents and the files are where I wrote them. I drag them into the app (Xcode is open - drop them on the navigator pane on the left), and they will be added to the app's bundle.

like image 93
Mozahler Avatar answered Nov 02 '22 22:11

Mozahler