Xcode Create a working app for iOS 5.1 with xcode 4.6 - iphone

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

Related

Picker not populating in iOS6 but populating in iOS 5.1

Have an odd thing happening with an app I'm on.
Firstly, the code and particular action within the app is fine when running on the iOS 5.1 simulator. When I run the same app on iOS 6.0 simulator, the action doesn't work.
Building the code on 5.1 sim produces an error free build. Building on 6.0 produces yellow warnings only.
I kind of expected this after some things being deprecated after the SDK upgrade.
The yellow warnings I have are of a deprecation but only that a Group Table View Background Color is now not available in 6.0 so I don't think that's affecting it.
Before posting code that works in 5.1, I'll explain.
I can fill, enter and save some text in a plain old text box. I then use that saved text to populate a picker in another tab.
As I say, works great with no problems in 5.1, seems not to work in 6.0.
Has anyone experienced similar things populating their pickers from 5.1 to 6.0?
Is their anything common that you guys know about before I delve deeper?
Many thanks for reading,
Gaz.
please make sure the you have copied the yourDataBase.sqlite from iOS5 simulator to your application bundle in iOS6 simulator.

How to make iPhone4 and below version app compatible for iPhone5?

I have an application in iphone market which works for iPhone 4s and lower version. So now iPhone 5 has been launched which bigger size screen, my question is what all changes i have to do in my application so that it will be compatible with iPhone 5 also.
1) Do i have to rebuild my app for iPhone 5?
2) Do i have to make changes only in UI ?
3) Will the iPhone 5 will its make it compatible?
Your valuable replies will help me a lot. Thanks in advance.
Here is my answers,
1) Do i have to rebuild my app for iPhone 5?
If you want to utilize the complete screen space, you can add Default-568h#2x.png and rebuild the app and release it.
2) Do i have to make changes only in UI ?
You can utilize the complete screen space for iphone 5. You can code for screen modifications in case of other iPhones.
3) Will the iPhone 5 will its make it compatible?
Yes. It will make it automatically compatible. It will add a black strip on top and bottom to compensate for the extra space in the screen unless you add Default-568h#2x.png.
If your app uses the standard UIKit provided by Apple, you only need to add a 4 inch launch image to your app, and it will automatically resized itself. But if your app using custom controls or graphics-heavy like in games, you might want to adjust the images and take advantage of the larger screen.
You also have to make sure the methods you used do not deprecated on iOS6 to prevent the app from crashing. Some references if you need further reading.
To make older app compatible with iPhone 5 You need to look for Following things.
Latest Xcode version 4.5.
Open your project and select Upgrade settings for new version.
Add Default-568h#2x.png for new resolution .
For UI you have to change your xib's object autoresizing property.When you select View Go to
inspector and select size property It will show you None, Full Screen, Retina 4 options . Set autoresize property for all your Buttons , labels and check xib for retina 4 and None both.It is same like you set it for Landscape and portrait .
5.Some other changed will be in code because some method has been depreciated for ios 6.0.
6. After doing all this .You can run it on iphone 5 simulator for testing.
I have an app that was using GLKMatrix3 and its supporting functions. I found that the GLKMatrix3Multiply function would always crash on iPhone 5 hardware. Easy to workaround using GLKMatrix4 instead, but the point is that I would never have found the problem without actually trying my app on iPhone 5 hardware.
I was told to file a bug for the GLKMatrix3 problem, so maybe this will be fixed. But the code runs just fine in the iOS 6 simulator.
I learned from this that, whether or not you need to rebuild your app for iPhone 5, you do need to at least run your app on a device before advertising support for that device.

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.

I modified the iOS app, but when I build and run it with xcode 4, it doesn't change

I made an app (already approved in the app store) with xcode 4 and it runs.
Now I would like to modify it for an update. My app has 2 localize (English and Italian) and before I modified it, I removed the second localize. My app is a tab bar app with 3 buttons.
My problem is that I added a new button to the tab bar in the mainWindow (everything is correct also name and nib) but it doesn't appear when I run it on my iphone nor on the simulator (iphone or ipad 3.2, 4.0 or 4.2). It works only on the 4.3 simulator (my iphone is 4.3.3).
If I remove the mainWindow (both), then it works on the iphone and 3.2, 4.0, 4.3 simulator as before I modified it.
What can i do?
Thanks!
When in doubt, try a full clean and rebuild. I've found xCode likes to hold onto old files if they're (mistakenly) marked as unmodified, doing a full clean and rebuild usually fixes this problem
Like #Dan F says, clean and rebuild is a must. Also I've found that putting out releases won't work unless you increase the app version number. If it's currently at 1.0 try changing it to 1.1 (or however you want to version your app) and see if that fixes it.
Otherwise you'll want to play around with your build settings and make sure the versions you're building for are correct. Just a few thoughts...

XIB files becoming blank - using iPhone sdk 4

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. :)