UIFont SIGABRT problem: iPhone SDK - iphone

I am using the code in my viewDidLoad:
[levelLabel setFont: [UIFont fontWithName:#"Ubuntu-Title" size:20]];
To set a font for one of my labels. I also have this font included in the project and in the 'fonts provided by application' section of -info.plist. But when the app loads it freezes and gives me a SIGABRT.
NOTE THAT THIS CODE WORKS ON THE IPHONE SIMULATOR, BUT NOT ON MY 1ST GEN IPOD TOUCH!
Is this the correct way to use custom fonts on iPhone?

You first gen iPod is running iOS 3.*, which does not support custom fonts to be loaded this way.
The font loading via info.plist is iOS 3.2 (iPad version) and higher.
To use custom font on iOS 3.* use https://github.com/zynga/FontLabel

Related

Using Single Storyboard for iPhone & iPad on Xcode 5.1.1

I have been developing an iOS App with iPhone(4-inch) Storyboard. Now I would like to use the same storyboard for iPad also. My iPhone storyboard contains 130+ scenes now.
I need to make it for iPad also.
I tried solution from link:
Converting Storyboard from iPhone to iPad
After following it my Xcode crashes, may be due to many scenes in the single storyboard.
I know about size classes in Xcode 6 and also tried it but the fonts don't update for the iPad size class(Regular Width| Regular Height) on simulator/device with iOS 7 but on iOS 8 it does. Since I have deployment target as iOS 7 I can't overlook the issue.
Can anyone help me with a solution that works on Xcode 5.1.1 of having same iPhone storyboard for iPad(Like a Universal App) as well?
Any help/clue will be appreciated.
Thanks.
Have you tried using size classes?
If that doesn't work, you could always use 2 different storyboards- 1 for the iPhone and 1 for the iPad

AppStore application sumbission xcode 4.2 failure because of launch image

I am trying to submit my first iOS application to AppStore using xCode 4.2.
I always get status of : "Invalid binary".
For the first time I got the following explanation:
"
iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. New iPhone apps and app updates submitted targeting iOS 6 and above must support the 4-inch display on iPhone 5 and must include a launch image with the -568h size modifier immediately following the portion of the launch image's filename. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images
"
but when I add the requested launch image I get another failure with following explanation:
"
Invalid Launch Image - Your app contains a launch image with a size modifier that is only supported for apps built with the iOS 6.0 SDK or later.
"
My target OS is iOS 5.
Please help
You need to target for iOS 6 as iPhone5 is shipped with iOS6, then you can add the launch image with -568h size.
Now apple will accept apps that will support iOS 6.0 or later along with previous iOS version support. For that, you need launch image for retina display (iPhone 5 as well.)
You need following launch images for iPhone(only):
640 x 1136
640 x 960
320 x 480
You are targeting iOS 5, its not an issue. Even you can submit a app targeting iOS 4.3.
Issue is, your application is not optimized for iPhone5, you must add the launch images for iPhone 5 and iPhone 5 launch image resolution(pixel) should be exact 640x1136 (png). You should add it from Target>Launch Images.
You need to set target for latest iOS 6 and for icon , image size for app store please follow the below URL
iPhone , iPad icon size for Retina and non retina

Is it possible to build an app for iPhone 5 screen size with the former SDK (iOS5)?

The latest SDK (Xcode 4.5) doesn't support armv6 and I need to support it right now, so I don't want to upgrade Xcode. Can I support iPhone 5 screen size and make an app in non letterbox mode on iPhone 5 from the previous Xcode (4.3.2)?
[edit] Comment by Brad Larson, change it all : Apple is now explicitly rejecting applications submitted with the iOS 5.x SDK and iPhone 5 default images, saying "Your app contains a launch image with a size modifier that is only supported for apps built with the iOS 6.0 SDK or later."
You can build an app that is compatible with iPhone 5 screen size by adding the 640x1136 Default-568h#2x.png in your resources (if the splash screen defined in your Info.plist is Default.png).
Xcode below 4.5 will let you test on iOS6 devices which is a new for Apple as when iOS5 arrived, all previous version of Xcode where not compatible with iOS5 (impossible to test on iOS5 devices).
So, YES you can develop for iOS6 and iPhone5 screen size from Xcode 4.4 or 4.3.

How to develop label and textfield frame size both Xcode 4.3 and Xcode 4.5

I have developed the form in Xcode 4.5 ..
while i run the program using iPhone simulator 6.0 ,the label and textfield(more than 5 labels and textfields) is not properly aligned and the button is not shown in the simulator...
I run the same program but change the simulator hardware deveice Xcode 4 inch retina display,now its work good..
What is problem and i need the solution.
Thanks in advance.

Application icon for iPhone 3g, 3gs and iPhone 4

I am planning an app for iphone 3g, 3gs and iphone 4. I have a 57*57 image for 3g and 3gs. When I checked documentation apple suggests us to use a 114*114 image for iphone 4. So how can I support both the images with the same build.
Use the CFBundleIconFiles property in your Info.plist and supply two icons, you name the high-resolution one with an "#2x" suffix so the iOS knows it's the high-resolution icon to use on iPhone 4. You can also specify iPad icons (for apps that run on iPhone and iPad) using the same property. This is documented here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BuildTimeConfiguration/BuildTimeConfiguration.html
Call the iPhone 4 icon Icon#2x.png
http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html
You have to list all your icons in your Application's plist, and name the ones for iPhone 4 "Name#2x.ext" (add '#2x' to your file's name).
If you place the original icon and an icon with the same name but add #2x to the end of the name in your resources folder the correct one will be used automaticly.
The collection of different possible icon sizes for iOS is getting pretty long now. But all you need to do is to list all of the files in your app's Info.plist in the CFBundleIconFiles key, and the OS will do the work of picking the correct size.