How troubleshoot black screen issue on iPhone device? - ios

Sometimes, When I added a new UI component or even just update the auto layout value to storyboard, the device went to a black screen state like this:
What does this meaning? What happened on this situation? Is there any log or tips to troubleshoot these kind of cases?
This is the View UI Hierarchy:, there are only two UI Window.
This is the normal one.
What I can do for now is to revert my work to previous state and trial and error. It's time consuming and inefficient.
Update:
Add my interface builder screenshot:
Update the screencast:

I seems that the login button on the first page had a unknown issue. I removed the login button and added it back again. No problem anymore.

Related

Strange Transparent View Appears Beneath Textfield in Mac Catalyst App

I'm in the process of creating a Mac Catalyst app from my existing iOS app. My problem is this strange transparent view that appears beneath my secure textfields. It appears when the textfield gets the focus by clicking into it, entering one or more characters and deleting every character in the textfield. This does not happen on iOS. The app is all UIKit and Swift no SwiftUI involved.
In the first image you can see there's a character in the textfield.
The second I delete it, this strange view appears. I can not remove this view by clicking somewhere else within the app's window. I can remove it, however, by switching to another app or by hitting the escape key.
In the third image you can see another instance of this transparent view/panel/window on a white background where it can be seen more clearly.
Unfortunately, it's not possible to capture it in Xcode's "Dubug View Hierarchy" since the view is gone the second the app goes to the background.
User rene seems to have the exact same problem but he's using SwiftUI which I don't.
I read through posts regarding similar issues and they seem to be solved by telling the secure UITextField that its "textContentType" is ".oneTimeCode" or anything else except ".password" but that idea didn't help me with my problem. I tried setting the "textContentType" and I tried setting the "keyboardType" as well. Both approaches failed solving my problem.
I have the impression that the OS is trying to present me the "passwords" feature so that I don't have to type in a password but this is only a theory since I don't see the grayish view saying "Passwords".
User Eddie Ed mentions a similar problem but hasn't gotten any answers yet.
Maybe it's simply a bug with Catalyst, I don't know. I haven't filed a radar yet. Hopefully, you helpful people have an idea or encountered and solved this problem one way or another. Any help is appreciated. Thank you.

iPhone web application : the virtual keyboard opens unexpectedly

I am having a very weird issue on an iPhone and I would like to have suggestions on the best way to troubleshoot. My web application works fine for a moment then suddenly all text fields and buttons will have no effect, but only to open the virtual keyboard.
For example, a "delete" button which used to display a "yes/Cancel" modal will only make the keyboard open, the modal won't show up... When I reload the page, everything is working as expected again.
I am testing with an iPhone 6 and Chrome.
Did someone already encountered an issue like that?
I have absolutely no idea how to track down this behaviour and all suggestions are welcomed, What do you suggest I should look in priority?
This issue was coming from a bug in a version of Chrome I was using at that moment (I have no idea which one, since my phone has regular automatic updates).
I strongly advise to have always at lease two different platforms when testing websites!

Storyboard corruption on file open

I am having a problem where my content is repeatedly being shifted to the right in the storyboard for multiple view controllers when I open the project. I have done nothing at this point, simply opened it. Further, undoing the modifications through git does nothing. I fix the problems and go about my day adding new features... the apps run fine in the phone and appear normal in the storyboard. However, when I open the project the next day, same thing happens and I have to fix everything again. Has anyone else experienced this issue, and what was your resolution to the problem?
I figured out what the problem was. On my first View Controller, I had some labels that had somehow become set to a width of zero. After I fixed them, and embedded them in a stack, the problem resolved itself. I have no idea how this screwed up several other view controllers; however, fingers crossed, the corruption hasn't happened again since I fixed it.
Well apparently there is just some display bug in Xcode. When I click on a new size class and click back, the elements are restored to their correct size. This was maddening, but apparently it's working fine now if I do this quick fix.

Blank white screen every time I run the iOS simulator

I've created a simple program where a person can log in with a username and password. Every time I attempt to run it, I simply get a blank white screen. I tried changing the background color to a dark green one in hope that it would change it in the simulator too, however I get the same white screen.
This problem arose before I got that breakpoint error, it first started happening randomly in a previous project, which makes me think something is wrong with my xcode.
See my screenshot below:
I had this same issue where I saw the app briefly, and then it went to solid white. It pays to make sure you edit the "Main" storyboard, not the "LaunchScreen" storyboard when following tutorials...
Maybe my embarrassing mistake will help someone else...
There are a few things to keep in mind here that could be causing thsi error. Firstly, as some of the comments have pointed out the first thing you should do is delete the breakpoints from all the lines. To do that, you have 3 choices:
Press the blue arrow just above the console, that you can see here:This will disable all your breakpoints, so if you are using them intentionally somewhere else, don't use this method.
You can press each breakpoint individually, simply pressing the arrows next to your code on the left-hand side. This will disable the specific breakpoint. They then will become more greyish, like the one below #IBAction func loginTapped()
Last but not least, in my opinion the best method, simply grab the blue arrow and drag it to the right or left. This will make a cloud and zishing noise, symbolizing the deletion of the breakpoint.
Once this is out of the way, let's take the second most important step. Check that the loginViewController is the initial View Controller, so that it's the first page that's displayed. To do that, simply open the file inspector on the right-hand side. You can activate it by pressing the third button here:
Then, select your viewController,, so that it light up's blue like seen below:
Then, on the 3rd tab of The file inspector, by pressing the 4th tab that looks like an arrow pointing down. Now you should see a checkbox saying "isInitialViewController". Tick that so that you get through immediately to this screen. It should look like this down below:
Lastly, I'd like to point you to some more things you should check that could cause this error:
You never actually create the UITextField and UIButton
You have a different view covering your viewController(eg, webView or view)
You are on the wrong storyboard, this could happen but is unlikely.
If all this fails, try restarting Xcode, the simulator and running again by pressing the Play Sign or CMD-R.
Hope that helps, Julian
I don't know who this might help but I solved my problem by reinstalling CocoaPods and installing everything with pod install and pod update. I reset my mac some time back because it's storage was full and I forgot CocoaPods and all the pods uninstalled. Reinstalled them and now I'm back.
Edit:
It didn't fix it but I am getting closer.
It happened to me after exiting Xcode and closing the simulator the simulator device setting changed to the default ipod, when I realized this I changed it back to iPhone11. I got the white background but after waiting a few minutes it just worked.

Loosing tint in iPad app after splitter popup activated

I have applied a brown tint to the app. When I select the popup then switch back to landscape view, the app goes back to the default tint. Is there a way to stop that.
here's a few screen shots in order:
1: looks good
2: Activate popup
3: Looses tint, reverts to default
This is a bug. I've been following this issue for a very long time. It started out as a problem described in this question which apple attempted to fix in iOS 4.2. Unfortunately they didn't fix it properly and now we the behaviour you see above. I reported this to Apple and all I know is that it is a duplicate of bug 8594881. I do not know of any workarounds at this time either.

Resources