How to name iOS launch icons for a universal app? - ios

This may be a trivial question, but I can't seem to find a concise answer on how to appropriately name (and what dimensions to use) for the iOS launch icons?
Note I am not using Xcode but rather am porting a LibGDX game over to iOS via RoboVM. This is what my iOS /data/ folder looks like right now:
I think I have all of the "Default" launch images set properly, but I'm not sure about the launch icons. (All of this confusion is really coming from the fact that there is scarce info about the new iPhone 6 and 6 Plus.)
So basically, what launch icon files are wrong and/or are missing?
Oh, also in my plist.xml file, this is what I have:
If I add more launch icon images, would I need to change anything here?
(I'm new to iOS development if it isn't painfully obvious yet.)

In my libGDX ios project, I have the following icons in my ios/resources folder (not in the data folder):
Icon-40.png
Icon-40#2x.png
Icon-60.png
Icon-60#2x.png
Icon-72.png
Icon-72#2x.png
Icon-76.png
Icon-76#2x.png
Icon-Small-50.png
Icon-Small-50#2x.png
Icon-Small.png
Icon-Small#2x.png
Icon.png
Icon#2x.png
And then in my Info.plist.xml file I have:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon</string>
<string>Icon-40</string>
<string>Icon-60</string>
<string>Icon-72</string>
<string>Icon-76</string>
<string>Icon-Small</string>
<string>Icon-Small-50</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
This seems to work as desired. And, since I'm here and these also took a while to work out, here are the launch images, including the new iPhone 6 and 6+ which it seems are needed to allow native screen resolution support on those devices:
Default-375w-667h#2x.png
Default-414w-736h#3x.png
Default-568h#2x.png
Default-Landscape#2x~ipad.png
Default-Landscape~ipad.png
Default.png
Default#2x.png
Default#2x~ipad.png
Default~ipad.png
As far as I can tell, there are no corresponding Plist entries needed for these.
Hope this helps!

See section "Icons for Universal Apps" of the following document:
https://developer.apple.com/library/ios/qa/qa1686/_index.html
They follow the format Icon-"size".

There is now a dedicated wiki page to how to define your icon when you submit your app for iOS.
It´s available here:
https://github.com/MobiVM/robovm/wiki/Howto-Create-an-Asset-Catalog-for-XCode-9-Appstore-Submission%3F
Since xCode 9 you need to define an asset catalog

Related

App is not showing in the share menu of shared options in shared extension in iOS8

I'm developing share extension for my app.
Every thing is fine, but i'm facing one main problem, my app is not in the share menu while sharing from photos app.
Below is the plist of my shared extension.
It's not showing in the list, below is the screenshot:
But when i go to more option, set the switch of my extension off and on, now it is showing in the list, But i need to do it every time, below are the screenshots:
Every time i ran the extension from X-Code, It's not showing the share menu, i need to go to more option, set the switch off and on again, then only it is showing.
Can it show every time in the share menu?
Is there anything i'm missing in the plist or extra configuration required?
I need your valuable suggestions.
Thanks in advance.
Update:
I have checked it in iOS9. It's working fine without any issues.
For anyone having the same problem and not finding a solution, worth trying also to check "Deployment Target" of the extension.
It can be different that the main app and is setup by default when the extension is created.
In my case it was higher than what I had on my device.
This is a bug in iOS. There is no workaround in the current version. File a bug report with Apple and hope that they fix it soon.
I encountered this issue on iOS 14 Beta, resolved by restarting the device.
Step by step flow for creating Share Extension
Then just Run the application
Check Out Plist count to be 1 (1 = allows attachment 1) for images
Plist
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.ui-services</string>
</dict>
Useful inks
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ShareSheet.html
http://www.appcoda.com/ios8-share-extension-swift/
http://www.appcoda.com/tag/app-extension/
Sharing data from Extension to Main App information link & How to create Today's extension?
How to create widgets showing on home screen in iOS 10
I faced the same issue. I found, that in the Build Settings (of extension target) field Wrapper Extension was empty, while it should be assigned as "appex". Assigning "appex" to Wrapper Extension solved my problem.
I had encountered with the same problem and fixed it by changing deployment target version for the extension. In my case ios version of the device that was tested was lower than my target ios version for the extension

Missing AppIcon in Organiser

I've recently migrated my application to support iOS7 and during that process updated my app icons to use an Asset Catalog; which is all working great in the app. However, in Organizer—and TestFlight—my app icon is missing.
The same is also happening in TestFlight—which implies there is something missing from my bundle. Any help would be gratefully received.
So it seems you still need to have the Icon files entry in the app plist that points to an icon that is a resource in the app; even though Xcode removed this when I converted to the catalog; here is the entry that I created manually whilst also keeping the asset catalog:
Note that I have tested this with different icons and this setting does not impact the icons the App actually uses at runtime; this entry appears to only be used by Organizer and TestFlight, thereby solving my problem.
Yeah while using the Asset Catalog, you may need to do the following to get the App's Icon linked and working for Ad-Hoc distributions / production to be seen in Organiser, Test flight and possibly unknown AppStore locations.
After creating the Asset Catalog, take note of the name of the Launch Images and App Icon names listed in the .xassets in Xcode.
By Default this should be
AppIcon
LaunchImage
[To see this click on your .xassets folder/icon in Xcode.]
(this can be changed, so just take note of this variable for later)
What is created now each build is the following data structures in your .app:
For App Icons:
iPhone
AppIcon57x57.png (iPhone non retina) [Notice the Icon name prefix]
AppIcon57x57#2x.png (iPhone retina)
And the same format for each of the other icon resolutions.
iPad
AppIcon72x72~ipad.png (iPad non retina)
AppIcon72x72#2x~ipad.png (iPad retina)
(For iPad it is slightly different postfix)
Main Problem
Now I noticed that in my Info.plist in Xcode 5.0.1 it automatically attempted and failed to create a key for "Icon files (iOS 5)" after completing the creation of the Asset Catalog.
If it did create a reference successfully / this may have been patched by Apple or just worked, then all you have to do is review the image names to validate the format listed above.
Final Solution:
Add the following key to you main .plist
I suggest you open your main .plist with a external text editor such as TextWrangler rather than in Xcode to copy and paste the following key in.
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon57x57.png</string>
<string>AppIcon57x57#2x.png</string>
<string>AppIcon72x72~ipad.png</string>
<string>AppIcon72x72#2x~ipad.png</string>
</array>
</dict>
</dict>
Please Note I have only included my example resolutions, you will need to add them all.
If you want to add this Key in Xcode without an external editor, Use the following:
Icon files (iOS 5) - Dictionary
Primary Icon - Dictionary
Icon files - Array
Item 0 - String = AppIcon57x57.png
And for each other item / app icon.
Now when you finally archive your project the final .xcarchive payload .plist will now include the above stated icon locations to build and use.
Do not add the following to any .plist: Just an example of what Xcode will now generate for your final payload
<key>IconPaths</key>
<array>
<string>Applications/Example.app/AppIcon57x57.png</string>
<string>Applications/Example.app/AppIcon57x57#2x.png</string>
<string>Applications/Example.app/AppIcon72x72~ipad.png</string>
<string>Applications/Example.app/AppIcon72x72#2x~ipad.png</string>
</array>
Yet another possible hiccup with migrating to Asset Catalog.
There is two ways to define icons in project settings: CFBundleIconFiles since iOS3 and CFBundleIcons since iOS5. The older, despite being older, contrary to common sense about backward compatiblity, still takes precedence. I was using CFBundleIcons before migrating directly to Asset Catalog. And after i migrated, i removed the original files pointed to by CFBundleIcons because, you know, now i had the shiny new Asset Catalog, right? And XCode did three things:
it hides the visual editing of former CFBundleIcons from General project settings. Why would you need it when you already opted in for the shiny new Asset Catalog, right?
it does not remove the original CFBundleIcons key of Info.plist, though, by opting in for the Asset Catalog, you are saying clear and loud that you are not going below iOS5
it does not validate the said key either. No little red crossmarks anywhere, because the project settings UI which could display them, is not visible anymore
The result is hidden, visually noneditable, possibly outdated/wrong key in Info.plist which takes precedence over what Asset Catalog created for you.
Go open your Info.plist manually and delete CFBundleIcons, rebuild, reupload, and voilà, icon is back.

UIInterfaceOrientation info.plist

I am working on an iOS app using Adobe Air to package it.
I am trying to set the InterfaceOrientation to the info.plist.
So added UIInterfaceOrienation to my app.xml but it gives me "application.iPhone.InfoAdditions contains an invalid value" error when I try to create an iOS Package.
This is what the app.xml looks like
<iPhone>
<InfoAdditions>
<![CDATA[
...... other values
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>
]]>
</InfoAdditions>
Not too sure what I'm missing here.
Any ideas?
I don't think you will be able to do this via the air packager.
The closest you will be able to get imho is this
portrait
false
The solution you suggested will work in native development, but not (yet) using the air packager.
I think you are going to be able to change it via code like this: stage.setOrientation( StageOrientation.ROTATED_LEFT );
source : http://polygeek.com/4301_air-mobile_playing-with-stage-orientation-in-mobile-air-apps

Remove icon gloss effect from an Adobe Air iOS app?

How do you prevent iTunes from adding the default gloss effect when compiling an iOS app using Adobe Air? Using Adobe Flash CS6. . . .
Add the following to the InfoAdditions element in the application descriptor file:
<InfoAdditions>
<![CDATA[
<key>UIPrerenderedIcon</key>
<true/>
]]>
</InfoAdditions>
from : http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d129907d2886-8000.html
This will require you to add a boolean UIPrerenderedIcon key to the app's info.plist file and set it's value to true.
To do so, follow the steps below:
Change the extension of the .ipa file produced by Flash CS6 to .zip.
Unzip the file and right-click to view the app's contents, which should be located in a directory named "Payload."
Locate and edit the info.plist file, adding the UIPrerenderedIcon key/value pair mentioned above.

Missing languages on iOS simulator

When I run my application, my iPhone/iPad simulator only gives me 6 language choices (English, German, Japanese, Italian, Spanish, and Hungarian). After having Googled this it seems like there should be at least 18 language choices available.
I've reinstalled Xcode 4.3.1, and installed the iOS 5.1 simulator, and it has the same issues, same languages.
Does anyone know where these languages are defined, and why a simulator wouldn't have all available options? Google and the Apple Dev forums are of no help.
Here's a screenshot:
Update: I decided to install the slightly older 5.0 simulator (instead of 5.1), and whenever I'm using the 5.0 simulator it appears I have all of the languages. If I switch back to the 5.1 simulator I still only have the 6 languages shown in the above screenshot.
I think something bad has happened to your simulator installation, not that Apple removed languages. If they were to cut down on the number of languages in the simulator to only 6 Magyar would be an odd choice (with only 12.5M or so speakers).
I also checked my Xcode 4.3.3/iPhone 5.1 simulator and I have what I assume the full complement of languages. Might be worth trying to reinstall your simulator!
The list of languages presented by the simulator in the Settings app can be found in
/Applications/Xcode-4.3.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/GlobalPreferences.plist.
It's in binary format so you would need to copy it away to a temp directory and use plutil -convert xml1 <file_name> to convert it to something you can read. You could check and see if the languages are missing from this list.
For reference here's what mine looks like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppleLanguages</key>
<array>
<string>en</string>
<string>fr</string>
<string>de</string>
<string>ja</string>
<string>nl</string>
<string>it</string>
<string>es</string>
<string>pt</string>
<string>pt-PT</string>
<string>da</string>
<string>fi</string>
<string>nb</string>
<string>sv</string>
<string>ko</string>
<string>zh-Hans</string>
<string>zh-Hant</string>
<string>ru</string>
<string>pl</string>
<string>tr</string>
<string>uk</string>
<string>ar</string>
<string>hr</string>
<string>cs</string>
<string>el</string>
<string>he</string>
<string>ro</string>
<string>sk</string>
<string>th</string>
<string>id</string>
<string>ms</string>
<string>en-GB</string>
<string>ca</string>
<string>hu</string>
<string>vi</string>
</array>
<key>AppleLocale</key>
<string>en_US</string>
</dict>
</plist>
Based on information in the answer posted the user named idz, located in this same question, I was able to figure out how to fix this.
I was using 5.1, I had to install the previous version of my simulator (5.0), then locate the language directories from 5.0 and copy them into the proper location for 5.1, and then restart the iPhone Simulator. Here are some detailed steps:
Locate the language .lproj directores for the 5.0 simulator. /Applications/Xcode-4.3.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/PrivateFrameworks/Preferences.framework/
Within this folder you will see many folders with the .lproj extension, e.g. English.lproj. Copy all of the .lproj folders that you find here.
Locate the folder with the .lproj directories for the 5.1 simulator. /Applications/Xcode-4.3.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/
Paste the folders you copied into this directory. I chose not to overwrite any existing folders when I did this.
Restart your iPhone Simulator.
Make sure your iPhone Simulator is set to 5.1. While the iPhone Simulator is selected, go to Hardware -> Version -> 5.1. Now when you go to choose the language for the simulator you should have all of the languages available that you copied over from the 5.0 folder.
Alternatively some have said that you might be able to fix this by simply uninstalling the Xcode SDK and reinstalling it, but I've found this way to be much faster.
I submitted a bug report to Apple for this, and after a week had no response. I've directed them to this page for the fix to the problem, but I'm still not sure how this happened in the first place.

Resources