Xcode9 made my Iphone7 screen go black - ios

I launched an app with my own iphone7. the app had nothing on it. It is a single page application in IOS. when I ran the app it made my phone's screen go black. I can still get messages and it makes sounds, but the screen is black so I can not use it. How can I fix it?

I assume you're still running the app itself, and because your app has no content, it shows a black screen by default. If that's the case, you can forcibly terminate the app by double-tapping on the Home button, and then swiping down on the problematic app.
As an alternative, you could try soft resetting the device itself, by holding the Sleep button and the Home button at the same time for 10 seconds.
As a last resort, you can hard reset the device under Settings -> General -> Reset -> Erase All Content And Settings. Note that this will erase everything on the device, so should only be attempted if nothing else works.

Related

iOS 11 Single App Mode, Disable lock screen

I'm working on developing a kiosk app to run in single app mode on two 12.9" iPad Pros. We want the option to turn these kiosks off so I'm using the ionic-native Insomnia and Battery-Status plugins to keepAwake when it is plugged in and allowSleepAgain when it is unplugged.
The problem is, the enclosures that were selected to house the iPads completely block all of the buttons, including the home button. When the iPads are plugged back in, the screen turns on and shows the "Press Home to Open" screen. To actually hit the home button, we need to get a key and remove the iPad from the enclosure.
Is there any way, either through the standard iPad preferences, or through the Configurator/Single App Mode preferences, to bypass the lock screen and go directly into the app when it wakes up?
I know I could probably find a way to setBrightness to 0 when unplugged and to 100 when plugged back in. But, that seems less preferable to me than letting it actually go to sleep.
Thanks

Black screen showing instead of LaunchScreen.xib

I'm trying to make my file LaunchScreen.xib show as the launch screen of my app. Whenever I run the app for the first time (where you run the app, and the simulator loads up for the first time), the splash screen is not shown.
There's one black screen before the simulator loads, but then there is a second black screen before my app loads. If I run the app again, after the simulator is loaded, the launch screen displays with no issue. However, if the black screen shows the first time, users will assume the app is not working, hence why this is a concern.
These are the settings I am using for my launch screen.
All help appreciated.
It is just Xcode's fault. While starting the app Xcode attaches its debugger and does some communication and a lot of other stuff. It is very possible that the launch screen is not displayed during that time or just for a split second.
If you just have the app on the device, completely quit it and then start it again, the launch screen should show up as expected.
There is no issue. The simulator load with blackscreen, it's not belong to your application. (os loaded at that time). After simulator loaded os, it launches your app with your laucnh screen

App starts and the device screen goes black sometimes

This is a very strange bug. I'm running my app on an iPhone device and only sometimes, when the app starts, you can see the app for a freckle of a second and then the screen goes black.
Any advice?
If you have call any thread or block the main thread to be execute, then for some second your screen will be blank. To avoid that add some splash screen shot, like FaceBook shows. Replace Default launch images. Default is blank, so it shows black screen. If you make required size screen shots then it will not shows black screen when app launch.
I do not know exactly why this happens but I develop an app and testing on several devices like 4, 4S,5,5S(iOS 7.1, 8.1) and get same black screen as you get after I change device. My solution is always "quit from simulator and open it again" when I do like this it works fine (Sometimes 3-4 times). I guess there is nothing to do by user. My thought, Only apple can solve this problem if we lucky :)

Xcode 5 and iPhone 5S - Running app "crashes" device (sort of)

I'm creating a new app. Very, very initial stages (i.e., it literally has no custom code yet). All I've done so far is a basic implementation of Urban Airship's libraries.
Sometimes (about 50% of the time?), when I push the app to my device, the following occurs:
App doesn't load on device
Xcode reports "failed to get task for process"
Device exhibits odd behavior.
"Odd behavior" includes:
Device wallpaper disappears and is replaced with an all black background.
Tapping on any icons gives them a pressed/shadowed look, but nothing happens.
Tapping on the icon again sets it back to its normal state. Again, nothing else.
Pressing home button does nothing.
Pressing lock button will lock device, but no attempt to unlock the device (home button or lock/unlock button) has no effect.
Attempting to use Siri gives the initial sound, but nothing further.
Hard rebooting the device gets it functional again. There doesn't seem to be a pattern to when this "bug" appears.
Has anyone else encountered this "bug"?

How to simulate iPhone being put to sleep in iOS simulator?

The iPhone app I'm working on seems to exhibit a bug when the phone is put to sleep in the middle of an operation. Is there any way to simulate the phone being put to sleep in the iOS simulator?
Specifically I'm referring to the user pressing the button on the top of the phone next to the headphones which immediately blanks the screen.
NOTE: The OP asked about "turning off" the phone, which is not what happens when you push the button on top. Leaving here since part of getting to the solution is figuring out what question to ask.
Yep. In the menu bar when you've got the iOS Simulator open, Click Hardware -> Lock.
Note that this looks slightly different than actually sleeping the phone (it keeps the "slide to unlock" screen running), but achieves the same effect.
You can also do other nifty things like rotate the device and hit the home button.
To be clear, hitting the home button on the top of the phone doesn't turn it off. It just puts it to sleep.
When possible, you should always test your app on an actual device. The simulator does not simulate all of the complex OS-level stuff that goes on behind the scenes for background apps and the WatchDog process and that sort of thing.
As of 2021 to lock the simulator's screen:
Device -> Lock
or
Cmd + L

Resources