iPhone simulator shows blank white screen after application launch - iphone

I am new to iPhone application development, and I am building a new calculator just to see how everything works.
I completed my code, but when I run the application, it does not show anything on the simulator.
I have created a number pad, but the screen is blank (white) after the application launches.
Can anyone give me a pointer, please?
I am using Xcode 4.2 and deployment target is 5.0

If you are using empty template for your project them make sure that you are correctly adding your view to window in appdelegate file in function named applicationDidFinishLaunching.
It can also happen when you target for iphone and using xid file related to ipad or another way.
hope it will help you and sorry for my bad english

Related

How to make my iphone app work on an iPad?

It is my understanding (i have seen it) that some apps can be opened and viewed in an iPad. Although, the iPad keeps the screen small, or pixelated if doubled the screen size.
I am attempting to do the same thing with my app, however when I attempt to run it on an iPad it crashes with the error
'Could not find a storyboard named 'MainStoryboard_iPad'
This is obvious, as I do no have a storyboard for the iPad, but currently I don't want one. I just want the iPad to run the app as an iPhone app in a smaller version. So my question is, how do I stop it from looking for the iPad storyboard? Its my understanding I must adjust something in the plist.info but I don't know how to access that in xcode. its my understanding you select the project in the navigator then select 'info' but I don't see any information that people say should be in the plist.info.
Thanks
You seem to have made your application universal. You want to set your "devices" to iPhone. This can be done on the target summary page (No need to interact with your .plist directly).
Only target iPhone platform, and do not call any iPad interface objects in your code. You should look in your Main xib file to make sure there are no references to an iPad interface object.
iPhone only apps should natively run in double-pixel mode. In order to resolve the pixelated / grainy issue you see, use #2x (for iPhone) size images. This will reduce the pixelation you see, but will still contain some.
Ok, I found the final issue. After editing the summary to 'iPhone' I also had to go into the Info tab and change the line that says
'Main storyboard file base name (iPad) to MainStoryboard_iPhone. It was currently set to MainStoryboard_iPad. That second step fixed the issue.
Thanks guys!

How to convert xcode 4.1 iPhone app in to ipad app

I was recently developed a big project on iPhone in Xcode version 4.1.
Now i need to convert this app for iPad.
I have verified so many links but all are regardig Xcode 3 ond it's extensions.
How to upgrade, how to resize the view etc etc
Please help me. Thanks in advance
Your best bet would be to create two new projects, one for iPhone, and the other universal and see what differences are in place there, especially the app delegates.
Quite a lot of the things won't be needed, however the app initialisation need some consideration, and most views tend to happily scale up to ipad resolutions without much or any additional work.
That was how I added iPad support into one of my apps I was writing anyway.
Depends how your app is build. If you are using Builder in XCode you can simply create new xib for each controller/view you have in app and name it with suffix ~ipad.
So if you for example have MyController.xib you will create MyController~ipad.xib and your controller will be loaded from this file automatically when run on iPad.
Changing the project preferences to universal gives you the possibility to specify a second MainWindow.xib in the info.plist file (Main Nib file base name (iPad)) which is the starting point for your iPad Interface. At this point running the app on an iphone would load your original interface and running on an iPad gives you the blank window once you created the corresponding blank MainWindow file.
Edit: You need also a second AppDelegate that holds the reference to your new window.

White blank screen in iPhone simulator and Black blank screen when loaded into iPhone

When I run my app on the simulator, every time a white blank screen would be generated. but after I black iPhone button on the bottom to exit the app, the views will then be visible after you re-enter the app. then the app run as usual.
But the situation is different when I load it into my iPhone.
Only BLACK blank screen can be seen into the app. after I exit the app and re-enter it, still nothing can be seen, and the app would automatically exit, too.
I dunno why it would be like that as simulator just simulate the real iPhone.
Here is some information:
iOS version of my iPhone: iOS 5
XCode version: XCode 4.2
Hope someone can help me. Thanks a lot.
Make sure that your Base SDK is as high or higher than your current version. Change it in your target settings and your project settings. Also change your compiler to Apple LLVM and your debugger (under edit scheme) to LLDB.

Universal application has black iPad screen

I've just finished my app for iPhone and it is working fine. I now want to make the app universal but am getting a black screen when running it on the iPad simulator. Here is what I have done so far:
When electing to make universal, I allowed xCode to create my "-iPad" version of my main nib; Therefore, I have MainWindow.xib for iPhone and MainWindow-iPad.xib for iPad. I have checked my plist file and have confirmed that both entries are present
Have double checked each UI component in the new iPad version to make sure all connections are made identically to the iPhone version. I also double check that the classes are correct
I have made sure that the "visible at launch" and "full screen at launch" options are selected
I read somewhere that removing the "-" worked for someone and have tried renaming my nib and plist entries
I am assuming that my app would then load the proper nib. Obviously I'm either wrong or have some configuration not right
On the other hand, if I need to make some change in my didFinishLoadingWithOptions to force they selection between my nibs - well I must admit I don't know how to accomplish this either.
Thanks!
If the app doesn't crash, than it means it can find the black screen.
Truncating the cache is done in Product -> Clean and also what you could try is "Reset" on the iOS simulator.
Further more, what you could check is if the "view" is linked correctly in your nib. (see image).
OK, after much trial and error, I have gotten this to work; Although, I'm not quite sure which exact steps solved the problem, I have a sneaking feeling it was some of the settings I had for the versioning of the app.
I created a new test app for iPhone and then converted it to iPad. Of course this worked unlike my app. I then compared everything I could think of between the apps. I changed the supported version from 3.1 to 4.0 on the Target -> Summary tab. I then check my build settings and changed everything in there to 4.0 as well. Finally, for each .xib file I set the deployment to "Project SDK Version (iOS 4.3) and the Development to "Interface Builder 3.1" because that is what my test app was set to. To be honest, I don't even recall altering these or do I really even know if this has an impact all I know is that I did change them as described. Did a project clean, reset the simulator and now it is working. I'm wondering if it was the 3.1 was too early for the iPad...
Anyway thanks.

How to set the start screen in iPhone app?

I developed an app which takes 2-3 seconds to start up. I want to show a picture in this time frame, a UIImage or some other view. How can I do that? I tried pasting it in the window but it isnt showing.
You need to add an image to your project called Default.png. This is what the iPhone will show while your application is launching.
The easiest way to accomlish this is as follow:
1. Start XCode
2. From Xcode run the app on the iPhone and have it show excast screen you need
3. in XCode start Organiser tool
Organiser tool will allow you to capture screen directly from the connected iPhone and will even give you an option to have this saved as default.png directly as part of your project.
Worked great for me