iPad 2 shows blank black screen after launch randomly on device - xcode

I'm newer to xcode and have picked up this universal app project from another dev who never could figure out how to fix a bug that was in the code because he said that he could not replicate it.
I have 4 different testing devices and I'm able to get the app to work fine on 3 of the 4. iPad retina, iPhone 4, and iPhone 3 all work. It also works fine in simulator. It's the iPad 2 that has been getting the error.
There is a blank / black screen that appears after the application loads. The default.png file shows during loading and then after that the screen goes blank. There is a looping music file that plays on the main view controller iPad_HomeViewController.m. I can hear this playing so I know the app is running, but the screen is blank and you can't use the app. Sometimes the app loads up perfectly and works correctly and then after a few uses of closing it out and reopening it the blank screen appears again. I've also seen it load the iPad_HomeViewController for just a few seconds so that you can see all the graphics and the navigation buttons and then it goes blank/black. I can usually get the blank screen to go away by closing the app out completely and relaunching or by powering the device off completely and then turning it back on and relaunching.
I'm working with xcode 4.3.3

Related

Xcode 11 blank white screen on device

I have a problem with debugging any app using Xcode 11.3.1.
The app builds very quickly (about 3 seconds), but after that, the device displays a white blank screen for a minute or two. On the Report navigator tab, it says that the app is running and debug is already in process but there are no logs. It happens with any app, even a newly created one.
Tried reproducing it on iPhone XS and iPhone 11 pro with 13.3.1 iOS version (the latest one at the moment) - the result is the same.
After this pause, I can debug the app as nothing happened. This behavior happens only during the debug session (no matter using cable or WiFi). If an app was already installed and launched directly from the phone - everything is fine.

Custom Keyboard Crash

I made a custom keyboard. Everything works fine except of two things:
(I am using Xcode 7 and am testing the app on my iPhone 5.)
When I turn the device from portrait to landscape or the other way round
sometimes it does not change the formation and crashs.
I wonder why this happens only sometimes and not every time the first time.
When my phone is not connected to Xcode it does not work like
when it is connected to the computer.
It crashs when I was not in the app for around 5-10 seconds and I open
it again then.
It does not pop up again and a restart is necessary.

Xcode simulator loaded something different from what's on storyboards

I was testing my app and I click on iPhone 6 simulator and out of the blue instead of what I have in storyboards, the simulators loads something different. It loads my app but the app I had months ago when certain buttons were missing and it lined up my app differently. Then when I closed the simulator turned it back on again, everything loaded like normally with the right app. This happened twice before as well.
Why would the simulator load something different from what's in the storyboards?
Try the following solutions:
clean your project: command + k
reset the simulator under the File-tab in the task bar while the simulator is open
open the simulator and delete the app from it like you would on an actual device. This will force-reinstall the application to your simulator and it will work again.
I don't really know why it does that but I guess that might have something to do with cache or something...

iPad launch image is upside down (portrait) for landscape-only app regardless of rotation

I am developing a universal app. My deployment target is 5.1 I want it to run portrait-only on the iPhone/iPod, and in landscape-only on the iPad.
I am testing with the iPhone and iPad simulators, as well as the latest versions of the iPod touch and iPad.
It works as expected on the iPhone. The portrait launch image comes up first, then the app starts. No problems. It works fine on the simulator as well as my iPod. No matter what the rotation, the app starts and continues to run in portrait (bottom home button), which is as intended.
It works correctly in the iPad simulator. The landscape launch image comes up, then the app starts in landscape. Whatever the rotation, the launch image and the app start and run in landscape as expected.
However, on my iPad, the portrait launch image displays in portrait-upside-down, no matter which way the iPad is rotated. When I remove the Default-Portrait~ipad.png and Default-Portrait#2x~ipad.png files from my project, XCode replaces them with Default.png and Default#2x.png, which are for the iPhone--not the iPad, and which also launch upside down.
My InfoPlist includes these settings:
Initial interface orientation: Portrait (bottom home button)
(There is no key for Initial Interface orientation~ipad)
Supported interface orientations: Portrait (bottom home button)
Supported interface orientations~ipad:
Landscape (left home button)
Landscape (right home button)
I tried changing the Initial interface orientation to Landscape, and I tried removing that key altogether. Neither change made a difference in the way it ran.
I’ve now tried everything I can think of to make this work. Does anybody have a solution?
Thanks.
Okay, I finally fixed the problem. Seems like a bug in XCode to me, but I should have caught it.
I located all my image files in the "Supporting Files" folder. This was not a problem for my music files or most of my image files. However, when it came to my Default-Landscape~ipad.png and Default-Landscape#2x~ipad files, XCode did not like it.
I had dragged those files into their respective boxes on the Summary page, and they were accepted. Then I moved them from the top level folder to the "Supporting Files" folder--just like I had done with the Default.png and Default#2x.png files for the iPhone.
When I built the app, I got no errors. When I ran the app, I got no warnings.
However, HERE IS WHERE I WENT WRONG. I did not run the app with the Profiler until late in the game, and apparently even when I did, I must have ignored the two warnings. Finally, I noticed them: Icon specified in the Info.plist not found under the top level app wrapper: Default-Landscape~ipad.png. I had the same warning for Default-Landscape#2x~ipad.png.
So, I deleted those two files from my project. Then I dragged them into their respective boxes on the Summary page, just as I had done before. But this time I did not move the files from the top project folder. I ran a Clean. Then I ran the app.
IT'S FIXED.
Hope this helps somebody else. ;)
I had a similar issue and was able to fix this issue by changing the order of the supported orientations in the plist file to be [0]:LandscapeRight and [1]:LandscapeLeft

White screen in Xcode 4.2 after conversion to Objective C ARC

I have combed through the entire internet looking for this answer , and have found nothing, so I have decided to post.
EQUIPMENT: Mac Mini (2011) , running OSXLion (10.7) , 8gb ram, 500gb hd
XCODE: version 4.2, running IPAD 4.3 and 5.0 simulators
I have developed an Ipad app using the program HYPE (html 5 designer/generator), this program was developed by an APPLE team. I then brought it into Xcode using the PhoneGap template. I had developed this app in a previous version of Xcode (4.0 using MAC osx snow leopard) and was able to transfer everything into Xcode 4.2 (including the phonegap template) successfully.
All was running fine. I launched my app in the app store successfully (Five Element Clinic Book HD - http://itunes.apple.com/us/app/five-element-clinic-book-hd/id495512918?alreadyRedirected=1&ign-mpt=uo%3D2&mt=8)
I noticed some issues I wanted to change (namely the external hosting was not working - my embeded youtube video (iframe) was not working, links to external websites not working and an iframe bringing in a counter script (javascript) also not showing - so I decided to take a look at everything to see if I adding more detailed URLs in the phonegap.plist external hosts area would work.
I didn't even get that far. When I opened Xcode again (after about 2 weeks, so there must have been some kind of API change) - I had a tone of errors that lead me to the information of needing to Convert my files over to Objective C ARC.
So I did this, with no errors or issues. Everything converted seamlessly. All files are showing converted to Objective C ARC.
I CLEANED then reBUILT - with absolutely no errors or warnings - and RAN my app in the IPAD simulator (4.3 and 5.0).
This is what happens. The simulator opens, my app launches, the start up screen shows, the app begins to load the rest of the app and just goes to a WHITE SCREEN. Forever. It goes no where else.
So I have quit the app, restarted the app, deleted the app, tried everything again. Same issue. If I quit the app it just goes to a black screen. I have also restarted Xcode and my computer, ran my disk warriors to fix file permissions, etc.
I still have my old project in my old laptop (Xcode 4.0, MAC OSx Snow Leopard). So I went back there to see if I could just work from the old environment. Nope. Same errors that require me to convert files to Objective C ARC. So I converted with zero issues and zero errors. Cleaned, Built - no errors) and ran the program in the simulators. None of them work, everything loads the start-up screen and goes to a white page.
Does ANYONE know what is going on?
And thank you.
Mine was not a white screen - but a black screen.
In applicationDidFinishLaunching I was using the result of
UIWindow* window = [[UIWindow alloc] initWithFrame:mainBounds];
as a local variable.
Converting to ARC released it.
Instead it needed to be assigned to a property of my app delegate:
#interface MyAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *mainWindow;
}

Resources