How to close individual React Native emulator? - ios

I'm running my app on a React Native emulator. I was originally emulating just the iPhone 6, and then added an iPhone 6 Plus emulator. When you add a second emulator it keeps the first one open. How do you close one of them while keeping the other open? Basically I want to de-select one of the emulators shown in the photo below:
Thanks!

Xcode device's emulator behaves like any other window, so you just have to Cmd+W on the one you want to close, it's like closing just one window of any other application.
And if you want to know more about Mac keyboard shortcuts, here's a link!

Related

Strange bug - Some elements are visible when I run app from Xcode, but not if I start running the app from device

Context: Native iOS app developed with Swift which manages external control units via bluetooth. I use Xcode Version 14.2, but it used to happen with older versions as well. Tested on devices with iOS 15 and 16.
In a specific section what the app has to do is:
take the data through the Bluetooth input and output
go to the outputs screen and present the outputs
from the outputs screen go to the inputs screen and show them
The problem is as follows.
If I take a physical iPhone and connect it to the Mac, then start the app from Xcode, everything works fine.
If, with the same iPhone, I start the app not from Xcode but with a tap from the iPhone screen, the app starts correctly, connects via Bluetooth, shows all the outputs correct, while for the inputs they are all correct except the last. The last one is never displayed, all the others are.
The main problem is that I don't know how to debug since it only happens when the app starts unlinked from Xcode. Does anyone know of other ways to troubleshoot the problem or have had similar problems and know of possible solutions?

Disable Debugging in Expo For React Native App

So I've opened up my react-native app in Expo today (using the iOS simulator) and I am creating by what looks like a debugging overlay.
Screenshot here:
I don't need this and it's blocking some of the UI for testing.
How does one turn it off?
You have the Element Inspector open. To toggle it off do either:
⌘+D if you are in the simulator
Shake your phone if you are on an actual device
This should open up the debugging menu. You can then click on Toggle Element Inspector to close it.

How to cancel a Slide Over secondary app and choose a different app?

I did an iOS 9 app using Xcode 7.0 beta 3. As shown at Doing a SlideOver, I did a Slide Over and chose the Calendar app. In the simulator the device was set to iPad Air 2. Everything worked fine. But, when I do a different iOS 9 app and a Slide Over, the Calendar app appears! How can things be reset so that I can choose any secondary app when doing a Slide Over? I tried some obvious things like quitting and restarting Xcode, and restarting my Mac Book Pro.
Pull down from the top of the slideover window.

How can I see the source of a webpage as it would be displayed on an iPhone?

I don't have an iphone, but I want to see what the HTML looks like to my users using an iphone.
Is there a way to emulate an iphone, so that flash does not appear ? For example if I visit YouTube, I don't want to see the Flash player in an emulator.
Thanks
Download Xcode for free if you have a mac and you can use the iphone simulator bundled with it. See this link on How to run iPhone emulator without opening Xcode
try safari browser. select Develop, User Agent, iPhone (or iPad or iPod Touch) from that menu.
if the Developp menu is not found then, Show Develop menu in menu bar in the Advanced Preferences

iOS Safari, when running our web-app in stand alone mode, crashes iOS in background

We're developing a web app that extensively uses Cavas 2D for some demos, and is successfully running on both iOS and Android devices. Recently we've added stand-alone mode for iOS devices, so user has to "Add-To-Home-Screen" and run it using screen icon, just like regular app.
What happens recently is that after 10-12 times we start the web app on iPhone4:
Status bar (initially set to 'black') suddenly turns white and we cannot exit Safari (by pressing home button).
If we try to make screen shot (home + power button), shutter sound is played as if screen shot was taken and saved.
If we try to lock the device (power button), screen turns black, but no action after that can bring unlock-screen or any screen for that matter - display remains black.
We can only do reset by pressing home + power for 10 seconds after this point.
If we do not lock the device, web app continuously work with no issues at all, it does not crash, but cannot exit it (double click on home button also has no result).
Has anyone experienced this with their web apps?
Any guidance in how to debug this would be highly appreciated. We've tried using Safari on OSX, connect iPhone to it and use Develop -> iPhone menu but no luck so far.
Thanks in advance!
I would start trying to debug by running XCode with the iPhone connected to the computer.
In XCode open "Organizer" and go to the tab "Devices".
You should see your device there, from which you can view the iOS console. That might be able to tell you what is going wrong with the phone stops responding.
I don't think you have to put the phone in development mode (or be a paid developer) to see the iOS console.

Resources