I'm new to iOS coming from Android. I try to run simulator and open the Control Center on it. When I swipe from the bottom to up I see that it's empty. Any ideas what's going on with my simulator?
I tried at iPhoneX simulator and have the same.
Unfortunately the Simulator does not show a true Control Center. Yes, a blank screen appears, but no controls are available in there. Welcome to iOS ;]
I needed to do this specifically to do a screen recording, but I realised you can't do it that way. So I found out about this way https://medium.com/#skounis/take-a-screenshot-or-record-video-with-ios-simulator-90c196e03b67 for anyone looking to do the same.
xcrun simctl io booted recordVideo <filename>.<extension>
To stop recording, press Control-C in Terminal.
PS - for iPhone X emulator you need to swipe from the top right down (even though that doesn't get you what you want)
The problem not in Xcode but in iOS 11 simulator
Solved
I download iOS 10 simulator and control-center work good in Xcode 9.3
Control Center is not available in iOS Simulator but if you are looking for notification center, you can get it by swiping top-down on iOS simulator. You can test local notifications on simulator
Related
While trying to capture a screenshot on Xcode V12.0.1 - the app screen turns to "Home screen" (of IOS) and a screenshot on the home screen is prodcued instead of the app screen.
It was working fine a week before, but my OS and Xcode were auto updated last week to MacOS 10.15.7 and Xcode V12.0.1 and since then i am unable to take screenshots of the simulator.
I ran into this issue and as of now I can only provide a work arround - Use command line to take the screenshot
cd to the folder that you want save the screenshots to.
Run xcrun simctl io booted screenshot Screenshot.png
Firstly, this problem still happens (at least, for me) in Feb 2021 with Xcode 12.3.
Secondly, I was running Xcode and the simulator on an older (slow) Mac mini, so doing something like xcrun simctl io booted screenshot Screenshot.png worked for me too, but it took over 30 seconds from pressing "enter" to when the snapshot was captured, so by then the simulator screen had changed (I was trying to get a screenshot of the launch image). I suppose with careful timing, to use the command 30 seconds or so before the time the simulator is displaying the desired screen, is one way, but tricky and error prone.
Thirdly, I tried restarting Xcode, after quitting the simulator as well, and it worked for me. It seems to have a good chance of working when Xcode is first started, although later the "home screen" bug appears to surface for some unknown reason.
If you copy the screen it seems to work as well.
Simulator -> Edit -> Copy Screen
Then paste the image from clipboard into an image editor etc.
I try to simulate a very very simple application which I have created in Xcode 9. I try to simulate it in the iOS Simulator in an iPhone6 with iOS 11.2. I have also tested other devices with the same result.
On a real device, the app works as expected. But on the simulator it doesn't.
I expect, that the button will become orange after I have clicked on it. and the emoji should disappear. Instead it changes into some strange "shadowed" look. If I wait then, the button will sometimes turn its background to orange after around 30 seconds.
I have recorded a gif, to illustrate the problem.
http://www.giphy.com/gifs/l4pSUuBtN7aBVvbVe
UPDATE:
Here is another GIF: http://www.giphy.com/gifs/26DNe5B0vxIO6pHiw
The button gets refreshed, as soon as i drag down the info center.
Development machine: Mac mini 2011, i5, SSD, 8GB RAM, high Sierra
hope someone can help me.
UPDATE: 15.02.18
The problem only appears with iOS versions beginning from 10 and up.
With iOS Version 9.0 there is no problem. Expect that there arent any emojis...
In the meantime, i have filed a bug report to apple. But i think there will be no response on that.
Looks that others having the same problem: https://forums.developer.apple.com/thread/96511
iOS 13 UPDATE: Use the Hardware > Toggle In-call Status Bar option for all devices with iOS 13 or higher. The activity indicator is gone for all devices. Fortunately, the in-call status bar no longer changes the layout size.
--
I have finally found a working workaround for this!
For simulators without the notch, set this when you launch the app:
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
Swift 4.1:
UIApplication.shared.isNetworkActivityIndicatorVisible = true
and never set it back to NO. This will show the little loading indicator in statusbar, which will keep the simulator constantly active and will solve your issue.
Just don't forget to make sure you will not use it in the production configuration.
Simulators with the notch in the status bar (iPhone X) don't show the activity indicator, but you can use Hardware > Toggle In-call Status Bar, because the in-call icon is animating and will also keep the screen active.
Found a workaround here (after looking at your link to Apple forum):
https://forums.developer.apple.com/thread/88446
In Terminal:
If you have a discrete GPU in the system (eg: MBP 15" with Radeon HD 6750M):
defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferPerformanceHint 2
If you do NOT have a discrete GPU in the system (eg: MBP 13" or MacMini)
defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferEmulationHint 1
To be sure, try both options. First option helped me (although I have MBP 13" Early 2011).
I had the same problem of simulator not updating the changes from database.
You might have problem with caches, the simulators might need resetting.
Try quitting iPhone Simulator, then run xcrun in Terminal:
xcrun simctl erase all
I've been trying to test my app on IPhone but the phone freezes time to time and stop responding for a while and so .. when its connected to Mac
(Mac is Installed on VMWare and there has been nothing wrong with it till now even the emulator)
any Idea on what may cause the problem ?
I suggest restarting the simulator and Xcode
first quit Xcode then make sure the active window is the simulator next what you want to do is look up at the task bar (gray bar at the top of the screen) click on hardware and then scroll down to reboot and click that, the simulator will now restart when the simulator finishes restarting navigate over to simulator and click on "reset all content and settings"
if that does not fix the problem try using another simulated device in my experience some work better then others (try the iPhone SE or the iPhone 5s they have worked better for me)
I'm using Xcode 6.1, on first time launch iOS 8 simulator is always fine. But if I quit it, and tried to open it again, I'll get a black screen.
I've tried reset content and settings button, but it is not helping. If I reboot my laptop, it will be fine. But still if it shows black screen on second time.
Can anyone please give me some suggestion here? There must be something I could do to reset the simulator.
Sometimes it can take a while to boot the simulated device. You can check on the progress by looking at the simulated device's syslog:
tail -F ~/Library/Logs/CoreSimulator/<Device UDID>/system.log
You can determine the UDID by running xcrun simctl list
Select project-> go to general-> add launchscreen.xib in app icons and launch screen file
I've been working on an app in Xcode; however when running the application in the iOS Simulator for iPhone 5s, it doesn't show the full app and sliding doesn't help, screenshots below.
how it looks in xCode
how it looks in iOS Simulator
How can I fix this problem?
The screenshot of the iOS Simulator window shows scrollbars. I suspect you can scroll up to see the buttons on top or just adjust the scale (in the Window menu) to fit everything into a window without scrolling.
Just press command 2 it will make you simulator shrink.