I just started using XCode and my simulator is acting weird. On launch, it only displays lower half of the screen while the upper half is cut off. And on resizing simulator window, simulator view doesn't readjusts itself instead its cut off.
I set the project properties to universal devices.
https://i.stack.imgur.com/khm5t.jpg
With the Simulator opens, go to Window -> Scale -> 50%.
You can change the simulator scale based on the resolution of your screen.
Related
Im currently testing my Ionic app on the Xcode simulator. It works super fine on every ios device except for the Iphone X. When you slide on the ion-ranges, the animations are strongly delayed, the scrolling is laggy and not smooth. The transitions with click or swipe events are also very laggy and delayed. Have you also expererienced similar things with the IphoneX simulator or do you know how to solve this problem?
I noticed that if I click and try to scroll while holding down the mouse button on the iPhone X simulator, the scroll is very laggy and sometimes won't update until I release the mouse button. Yet on the other simulators, the scroll is smooth as butter, even if I hold down the mouse button (rather than click and flick).
If I change the iPhone X to 'physical size' using the simulator menu (window -> physical size), the scrolling is still laggy. But if I manually resize the window of the iPhone X to anything other than 'physical size', the scrolling becomes smooth like all the other device simulators.
I don't know why, and it's not always consistent, but it seems to work most of the time. Hopefully this helps someone with this annoying problem.
So I upgraded to react native 0.41 and now when I run my app on a physical device (ipad pro) it looks pixelated and isn't full screen. It has black bars on the sides (iphone aspect ratio) and has a 1x button at the bottom right which i can tap to zoom out. I've been googling for an hour and the RN ecosystem moves so fast that google is useless in many cases.
Any ideas?
It's not exactly related to RN. Your app is probably set to run only on iPhone, not on iPad. Maybe it was reset when you upgraded.
An iPhone app that runs on an iPad is displayed in a special "compatibility mode" where you view it in a smaller iPhone-like viewport that you can zoom in and out (the x1 and x2 buttons you see).
If you want your iPhone app to also run natively on iPad:
open Xcode in the project navigator (left panel)
click the project file, then select your app target (will appear on the right side in the left pane under TARGETS once you select the project)
in the "General" tab, scroll to "Deployment info" settings and change the "Device" selector to "Universal".
Note that while it will run in native iPad resolution, if you're not optimizing your UI for larger screens, your existing UI will just stretch and fill up your whole screen.
I'm opening a topic here to find some help regarding the Splash screen on iOS. Apparently, all the process seems to be quite simple, but unfortunately, I've encountered a problem just on a specific case : the default splash screen is showed on the iPads with low resolutions (iPad , iPad 2, iPad Air , ...), the custom one is not set.
Specificity : The application is developed with React Native (Framework) only for iPad on a Landscape mode.
Here below you will find the steps that I followed to achieve the Splash screen :
2 pictures prepared for the Splash screen : Default-Landscape.png (1024*768px) & Default-Landscape#2x.png (2048*1536px).
Project opened on Xcode : MyProject.xcodeproj
Check out the folder "Images.xcassets" in the project.
Left click (2nd column from the left. In the full display interface) > App Icon & Launch Image > New iOS Launch Image.
Two new things appeared: one drop zone and a checklist with the devices that we wanted. Then I've chosen what interested me.
Drag and drop the images in the specific drop zone related to the good format.
After the image uploaded I've click on project "MyProject" (1st column) > click on target "MyProject" (2nd column) > click on "Use catalog assets" (button on the 3rd column) > select "Migrate" > then in the drop down menu I've chosen the settings that I've prepared before "LaunchImage".
Finally I removed the folder "Base.lproj" where the default splash screen (LaunchScreen.xid) was.
Result: After compiling, I've seen that the Splash screen was working for the high resolution devices (iPad Air 2 & iPad Pro), but unfortunatly, on low resolution (iPad 2, iPad Air, iPad Retina), I still have the default screen "NameOfProject" as headline and "Powered by React native" on the bottom of the page.
I really hope that you can help me on this one because I really don't know what's going wrong there. I've tried different import methods, differents sizes and names for the images. But still nothing work.
You may have to delete the app from the Home screen, and then reinstall it. iOS seems to cache the previous launch image for some reason.
Also make sure that your image sizes are correct if you haven't already.
Thanks a lot rclai89!!
Just to add some details to complete this topic. This video explains what you've advised me and solved my problem : https://www.youtube.com/watch?v=yiSehGHZZ18.
App removed from the Home screen : Once the emulator is running, on the top navigation choose Simulator > then Reset Content and settings.
Cache cleared : CMD + SHIFT + K
Derived Data cleared : On Xcode go to the Window item (top navigation) > select Projects > next to the "Derived Data" you have the path where the file is contained, just need to click on Delete button and everything is done.
Close & Re-Open Xcode. The next compilation for all the different devices (in my case iPad) show up the splash screen that I wanted. Awesome!
Have just updated to Xcode 6.01 and most things seem to be working. Frustratingly though the simulator has lost its skin, and more importantly has become a lot smaller on my screen.
The skin was convenient to have a home button to press whenever you needed to easily do it, but the rendered size of the simulator doing a iPhone 5 sized display was perfect as I am doing a lot of dev on a train, where the increased size of the device and content was a benefit.
Has anyone had any luck restoring this to how it was?
The keyboard shortcut to press the Home button is ⇧⌘H:
⇧⌘H
ShiftCommandH
I agree that it's annoying that the iOS Simulator's physical Home button was removed. However, I've now gotten into the habit of using the keyboard shortcut (which is faster overall).
You can also access the button via the Hardware menu:
As far as the simulator size goes, you can restore it to 100% by hitting Cmd + 1, or going to "Window > Scale > 100%".
When I run the iPhone retina simulator in Xcode it stops if from moving above the top of the screen, but the simulator window is bigger than my monitor, so I can't see what's at the bottom of the simulator window, how can I change things so I can move it upwards off the top of the monitor screen?
You can always use cmd+2 or cmd+3 to fit simulator to your screen.
You can scroll the Display of the Simulator with the two-finger scroll.
Can look like this on a 15" retina