How to add images to iPhone Simulator? - ios-simulator

I have used UIImagePickerController with UIImagePickerControllerSourceTypePhotoLibrary, but it says "No photos".
Where does the simulator get the images from? Where should I copy the images so that they are displayed in the simulator?

Now you can do this easily just by dragging and dropping the images in to Photos app in iPhone Simulator.

Run the simulator
Run Safari on the Simulator
Drag a picture onto Safari running on the Simulator, this opens the image.
Click and hold on the image, or tap on the share icon in the bottom tool bar.
You will get an alert asking if you want to store the image to your phone

If someone gets an error similar to
One or more media items failed to import:
/Users/Username/Desktop/Screenshots/Screen Shot 2021-07-09 at 12.05.29.png: The operation couldn’t be completed. (Cocoa error -1.)
You can try to move the picture to the user's root folder. In my case /Users/Username/Screen Shot 2021-07-09 at 12.05.29.png, and I was able to drag and drop my image from Finder to the simulator.

Open photo on simulator. The gallery will open.
Drag the pic you want into the simulator gallery.
That's it. The pic is now on the gallery.

You can drag files like images or video from your local mac machine to simulator once you open the photos or video list of the iphone.
But make sure you're uploading from Documents folder else it won't get uploaded if you drag files from other folders.

Related

Badge Drawable in BrowseFragment doesn't appear on Amazon TV

I've got a BrowseFragment displaying some api-loaded content using the Leanback Support Library. I'm also showing a custom logo in the top right hand corner using the setBadgeDrawable method on the BrowseFragment. This logo is included in the apk in the res folder. It appears as expected on an Android TV emulator, however when I install the binary onto an Amazon Fire TV stick, the logo disappears. All other functionality of the application is identical on Amazon Fire TV.
The image is a PNG and here is how I'm setting it:
setBadgeDrawable(getActivity().getResources().getDrawable(R.drawable.logo));
Any reason why this would be happening? Any help is appreciated. Thanks.
Apparently Amazon Fire TV has a size limit on the image. Once I shrunk the image, worked just fine. Weird.

Image superimposed on android emulator

I have not been able to find out why I use a ASSUS ROG 2080 gpu super and this image is appearing on top of my android emulator. This is just with a standard File - > Xamarin Project.
Is it something to do with my 2080 super rather than my android emulator?
Edit 2
As you see its no where to be seen nore is it in the programs list.
The issue was not inside the Nivda driver it self but it was actually in a program called CPU Tweek
If you see here the button at the top with on or off if you switch that off it will no longer appear
However if you want to see the Fps in an app on simulator leave it on and go to settings cog at the top of the screen. Then to the OSD tab and scroll down to photo and simply turn that off.

iOS 9 status bar appears below black bar

What is happening to my app in Xcode 7 / iOS 9?
The whole screen looks condensed, as if an iPhone 4S app is displaying on an iPhone 6. It looks normal in the iPhone 4S simulator.
I thought it was a problem with the auto layout constraints in the main storyboard, so I eventually deleted everything apart from the root view in the root view controller (blue screen), and there's still a problem with it.
I tried enabling size classes, thinking that this was the problem due to previously being disabled, but the result was the same.
Is anyone else getting this problem in their existing apps running in iOS 9?
Target>General>Launch Image Source>use asset
it will create new asset named BrandAsset, place your launch images over here. Create LaunchScreen.storyboard if already not existing and select it to Target>General>Launch Screen File.
Thanks for the answers. They pointed me in the right direction, as I wasn't aware it was anything to do with the launch screen.
I found out I had no LaunchScreen.storyboard file. Digging around in the docs led me onto this:
New projects are created with a launch screen storyboard file called
LaunchScreen.storyboard. Alternately, you can create a new launch
screen file using File > New, selecting the User Interface category,
and choosing a file type of Launch Screen.
It was weird that I had to do this, as I only started developing this app in iOS 8, and apparently this was a change in iOS 8. But with iOS 9 Apple are obviously getting more aggressive with deprecating incorrectly set up projects, and the consequences were that it was bug to my app.
The positive I guess, is that all of this forced me to at least create a launch image instead of having nothing.

Xcode iOS 7 simulator- no home button?

I have download Xcode today ,and i can't see the home button in simulation.
I was trying to do cmd+1 but it didn't work .
How i get back the home button ?
Cmd-Shift-H
(wasn't obvious to me too when I first opened it)
The Hardware tab will give you access to the home button, as well as other things such as rotate screen, shake screen, and lock the device.
Good luck!

how to save video in ipad simulator

I want to pick video from photo library using imagePickerController.
but there is no video on my simulator. I know how to load images in simulator but don't know how to load video. Please help.
You will have to drag&drop a .mov file to the simulator. Once you do that, you will see the video and you can save it to the camera roll (with one of the buttons displayed in that screen).
But you won't be able to pick the video in the simulator because there is an error while compressing the video.

Resources