Font size for different size and dpi devices in smartface - smartface.io

I am developing an mobile app which should support for all type of device sizes and dpi's.
Is there any short-way or formula that i can implement for font sizes basing on dpi value of the device?
Can any one suggest whats the best way to implement font sizes for all my controls in Smartface App Studio to support all type of devices!

You should check this link about images : http://www.smartface.io/developer/guides/project/anatomy-project/#images
There is no way to make it look good for all devices by using only one folder. Because different devices have different resolutions, icons should be added to the related folder.
For iOS, there is only one folder. You should use original icons, lets say it is myicon.png, also you should use 2 times the original icon(make it 2 times larger) and add it too into the same folder and name it as myicon#2x.png.
That is all for iOS.
But for Android, there are more different resolutions. You should find the correct folder for your device from the link. I can simply suggest you to keep in mind that, your original icon should be placed under mdpi folder, you should use 1.5 times original in hdpi folder and you should use 2 times the original icon for xhdpi folder.

Related

How do you update the app icons and launch images to support IOS 6 and 7 simultaneously?

I have been stymied figuring out how to release an application from Xcode5 that supports IOS7 AND IOS 6+ in the same build, with assets (icons and splash screens) that load correctly for both, AND still render the assets for IOS 6 correctly. The major hangup I had was trying to make IOS 6 still render the icons without shading or highlighting since the "prerendered" option is no longer even available in Xcode 5's GUI. Any ideas how to get all of the content and the icon to render correctly AND support multiple OS versions?
Andrew
Apple has clear guidelines on requirements for IOS 7 apps but even then, I ran into errors making a single app support multiple OS versions. After getting it to work, I thought I would point out a few areas that were hangups for me to aid others in the future.
I first updated the whole of my app to support IOS 7 cleanly and then went back and enabled previous versions but that process is not necessary.
Just ensure you first set the correct deploy target
Once you set the deployment target, Xcode5 nicely changes the list of default assets it requires to support the multiple OS versions. Ensure you reupload the correct versions of icons at the required resolutions and required filenames (shown below for IOS6-IOS7 support)
Do the same for the launch images, note that you will have to rename your launch images to new names, Xcode tries doing this for you if you let it. Note the new sizes below, as IOS7 expands the launch image background behind the status bar.
Finally, manually add the two .plist flags below and you should be set to have your icons render across IOS versions consistently, with no gloss (explanation follows)
IOS7 in its new flatness removes the postprocessing the previous versions did where they added a highlight and gloss effect to icons. That effect is no longer done for IOS 7 apps but if you load an app from Xcode5 on IOS 6, it will reapply the default gloss effect. This is infuriating because there no longer is a "prerendered" GUI flag in Xcode to disable that postprocessing. As mentioned above, you need to add the flag manually to your application's plist. In my case, I had to add the flag in two locations to force IOS 6 to stop applying the effect. You can access the plist by either opening the file directly or navigating to the settings in your project overview. You may need to uninstall the app from your simulator and then rebuild the app to force simulator to lose its cache of the old icon.
If you setup the asset catalogue you can open it select the image and then go to the inspector and tick this box
Just use "asset catalog" (you can select that from general on your target).
That would create an images.xcassets on your project there you can easily drag your icon designs for pre iOS 7 and for iOS 7.
UPDATE:
So after the formal release of iOS 7 I can now write this:
On the asset catalog itself select the Appicon set that you want to set as pre-rendered then go to Attribute Inspector and just mark "iOS icon is pre-rendered". you can also set there of course which OS and devices you want to support (it would create all options so you can just drag& drop to set).
Important thing to note is that for some reason if you use several targets and several sets inside this catalog you must add the Target Membership manually. To do this just mark the "asset catalog" file, go to file inspector and mark all targets where you want to use it. I think Apple should do that automatically when you select the "asset catalog" from the target settings but till then I decided to mention that here (took me an hour to figure this out).
I went through this recently. Seems by default it only shows the following.
Easy fix is add a new AppIcon
To give you all these options.
My experience with this:
When creating a new empty app, it will create a "default" app icons / launch images asset catalog that is incomplete as stated by #Smick.
The annoying part of this new "catalog" is that it doesn't show the image sizes.
To work around the issue, select the project on the project navigator, and on the "General" you will notice 2 areas - App Icons and Launch Images. Those will point to an asset catalog. You can change it to "don't use asset catalog." After that, the interface will change to a list of files / dimensions.
However there are several issues with this interface:
It should only ask for the retina versions of the images (and compute the normal, or have two links, one for normal and another for retina).
Several images (the launch ones) need to be renamed for them to work (the system does this for you).
Two images are not assignable due to errors (iPad Portrait iOS 7, and iPad Landscape iOS 7, both in normal resolution) - you can specify an image for them, but the image will not stay on and will become de-selected when you insert the next image.
The image dimensions specified are slightly different from the ones stated on the HIG manuals.
I've a strong dislike of the "new" notation of images with points (as they are device dependent and so not exact).
If you don't want to see iOS 6 reapply the "highlight / lighting" on the icons, you need to add a key on the app plist (project manager | project | info. There, you can add a key "Icon already includes gloss effects". You may need to add it also on iOS 5 icons if required.
For Xcode 6
For LaunchImage you must make sure you check iOS 6.0 and Prior
iPhone (Portrait ) or iPad // depend on your project configuration
Sizes
Default.png (320x480)
Default#2x.png (640x960)
Default-568h#2x.png (640x1136)
The same to AppIcon

IPhone Ipad Dual app Cannot figure out how to specify 2 icons for a dual app

I am writing my first dual app and cannot figure out how to give tell it about the 2 icons to use
I read the following documentation
To specify the icons for your app, add the CFBundleIcons key to your app’s Info.plist file. The contents of that key include a list of filenames intended for use as the primary app icons. The filenames can be anything you want, but all image files must be in the PNG format and reside in the top level of your app bundle. When the system needs an appropriately sized icon, it uses the information in the key to choose the image file whose size most closely matches the intended usage.
I cannot figure out how to do this.
As Dan mentioned, you only need to drag and drop your images into the proper boxes (iPhone icon box, iPhone Retina icon box, etc).
You'll need the PNGs in the proper size, though. You can find information about sizes at the following link: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html
Also if you are using images for your elements (UIButton, UINavigationBar, etc), it's a good practice to name *#2x.png your retina display artwork, like:
navBarBackground.png <- Normal screen
navBarBackground#2x.png <- Retina screen
Edit: This way, your application will automatically use the proper image file with the proper screen.
If you are using Xcode 4+, then all you need to do is click on the project file at the top of the project navigator, then select the target you are building for, and then drag and drop your icon files into the appropriate boxes in the summary view

IPhone application and IPad retina icon

I've created an application for iPhone with icon versions for retina and no-retina display (icon#2x.png and icon.png).
Whenever I try to install this application on an iPad 3 a part of Default#2x.png is used instead of icon#2x.png.
Have i to upload specific icon for iPad ? and in this case where!? from Xcode 4.3.2 I see only 2 spaces to include icons, but reserved for iPhone version. I suppose that i need to create a new voice into plist file... but I'm not sure and documentation didn't help me.
I ran into the same problem. I created the resource files Icon-72.png and Icon-72#2x.png in the root of the bundle and added them to "Icon files" in the Info page of the target (Info.plist). Strangely, this didn't do the trick.
My final solution was to convert the target temporarily into an universal app, drag the iPad icons into the corresponding slots of the target's summary page and build it. After that, revert the target to an iPhone/iPod touch app, clean it, built it again.
Interestingly, this seems to work.
Old question, but with Xcode 6.3, if you use assets catalogs, select AppIcon, tick iPad (for iOS 7 and up) and add your 76x76 and 152x152 icons to the catalog
I would create 2 more icons called
icon~ipad.png
icon#2x~ipad.png
The first one will allow for iPad 1/2, and the second one will allow for Retina iPads (iPad 3).
Adding those 2 icons may be enough. Also, try a Clean & Rebuild as Luke said.
Hope this helps =)
I think you should use Icon-72. i used that
When determining the appropriate App-Icon the OS searches the "best fitting size" Icon in the CFBundleIconFiles array or the CFBundleIcons in the Info.plist. If the Default(#2x).png is in one of those arrays, it is selected for best fitting on iPad Retina. Solutions:
Eliminate the Default(#2x).png from this arrays. For the Launch image there is another property. If you do that, the iPhone Retina Icon will be selected.
Optionally add the iPad resolution Icons (72, 72 / 144, 144) to one of those arrays. Then the OS will determine one of those as best fitting.
For the Info.plist keys see also:
https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW1
Consider, that the naming of those Icon files are only relevant for older iOS versions. In new versions, the OS just searches for sizes in the mentioned arrays.

Difference between Icon properties in info.plist?

I'm working on an iPhone app and I'm not sure which plist property to use out of the following:
Could anyone shed some light on what each of them do and the difference between them?
Apple requires that you include an icon that measures 57x57 pixels. If you are just going to use that image, then you put it under the Icon File property.
However, Apple recommends that you include images of different sizes for different purposes, such as for the retina display, the ipad, and the search bar. If you are going to include multiple images, which will make your app look better, especially the retina one, then you include all of those images in the Icon Files property. Do note that you do not need the Icon File property if you are using the Icon Files property.
I am still developing for IOS 4 so I do not know about the Icon Files (IOS 5) property but I would assume that there are new places where your icon might pop up in IOS 5 where it will not pop up in older IOS versions. You would place those images under that property.
Hope that helps.

Can i use a jpeg image for launching Screen

i was currently in to an app development and i have added a launcher screen in JPEG format which is displayed both in simulator and device .. but does it create any problem with apple approval guidelines ?
Update for iOS 8+: you can now use XIB-based launch assets, which is by far the best approach to reduce file size and re-use the same assets for multiple screens sizes. Also, since XIBs support JPG assets, you can always embed JPGs onto XIB files now too!
The Apple documentation pre iOS 8 (now removed), explicitly stated that only PNG is allowed for the launch image:
App Launch (Default) Images
Every app must provide at least one launch image. This image is
typically in a file named Default.png that displays your app’s initial
screen in a portrait orientation. However, you can also provide other
launch images to be used under different launch conditions. All launch
images must be PNG files and must reside in the top level of your
app’s bundle directory. (Avoid using interlaced PNGs.)
I can't speak to how accurate this document is, but it seems they are pretty specific on this point.
My advice: use 8-bit PNG's, and if your files are getting to big, simply don't include the #2x versions for the retina iPad. The 1x version upscales reasonably well on the retina iPad, and better than bloating your app by 5MB+
Yes ofcourse you can use JPEG image in Launch screen or anywhere in project.NO it absolutely does not create any problems in approval process of Apple.So go ahead and code!
Use a png if you can; not only is png artwork better visually, but iOS is optimised for png files.
While it is true Apple won't reject your app for using a jpeg, your users might.
NO you should not use jpgs
Here are apple recomendations
Note: For all images and icons, the PNG format is recommended.
The standard bit depth for icons and images is 24 bits (8 bits each for red, green, and blue), plus an 8-bit alpha channel.
You do not need to constrain your palette to web-safe colors. Although you can use alpha transparency in the icons you create for navigation bars, toolbars, and tab bars, do not use it in application icons.
You can only use PNG files for the launch images. Here is the proof.
Yes , you can choose any one from JPEG/PNG.There is no guidelines from apple to choose type of image.
For more information you can follow apple launch image guidelines.
but I assume that PNGs are more preferable because Apple seems to use PNGs virtually everywhere in iPhone OS.