XIB files becoming blank - using iPhone sdk 4 - iphone

I just updated to iPhone SDK4. The problem I am facing is - I was writing an app in iPhone sdk 3.0 just open that project in xcode 3.2.3 made some changes in xib file, now when i run this project in simulator the user interface (xib) appearing blank (with black color).
Any idea why this is happening...?
Thanks
Saurabh

You may be trying to run directly from IB (with cmd+R) this makes it only load the view you're currently editing and does something similar to what you're describing. Save, switch to xcode and run from there, see if that helps. :)

Related

Xcode Create a working app for iOS 5.1 with xcode 4.6

i can run my app on my 6.1 iOS but can't with 5.1
i have the iOS Deployment Target set to 5.1 on both Project and Target
when i run the simulation for 5.1 it works fine but when i try it on my iPhone it crash's
i committed out all my code thinking that was the problem but the same thing keeps happening
XIB and auto-layout is not enabled
The iPhone simulation works with no errors
I tried to create a new project and have only a label and i still get the same out come
can some one send a link to a single view project that works with 5.1, the program could be blank i just want to compare to mine to see what is different/ wrong.
Sounds like you might be trying to use an API that is specific to iOS6 (UICollectionView or something similar).
You need to plug the device in and run it and see what the console indicates is the problem.
You have Auto Layout turned on for ViewController.xib. There are two ways to work around this. Either disable Auto Layout on that xib:
1) Xcode 4.3 not presenting Autoresizing panel in Size Inspector
Or use one of many methods to enable auto layout while remaining backwards compatible:
2) Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5

iPhone simulator shows blank white screen after application launch

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

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.

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.

iOS SDK 4.1 UIImageView differences?

I just upgraded to iOS 4.1 SDK and now when I run my app in the simulator one of the images (the only one really) that was working fine before the upgrade is no longer showing up in my view. I've tried removing the file and re-adding it to the project, cleaning all targets and running a build, and making changes to the XIB where the UIImageView is configured to for it to recompile it, but no dice. It's worth noting that my Tab-Bar images came through just fine. Any ideas?
If the UIImageView is created inside a .xib, open it up in Interface Builder: can you see the image in the "preview"? If not, then it can't find the image to begin with. Perhaps the file has been renamed?
Look inside the application bundle in the Finder. Is your image file present? If not, is it still referenced in your project? Check Xcode to make sure the file name isn't in red (i.e. missing).
Maybe they've changed the 4.1 simulator to be (or rather, pretend that the filesystem is) case-sensitive?
Does the app work on a 4.0 device?