Remove icon gloss effect from an Adobe Air iOS app? - ios

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.

Related

Font is being ignored when app is built?

So I have just finished making a game (with help from #Fluidity) and when I build it the fonts requested are all ignored. I have selected fonts to be used in main.storyboard but when it gets to the game the default is used. Any help is appreciated.
You'll need to add the file in your project and specify this font in your Info.plist
For example, add the following in your Info.plist
<key>UIAppFonts</key>
<array>
<string>Fluidity.otf</string>
</array>
I'm assuming the filename is Fluidity.otf
I fixed the problem by Checking the box in Target Membership relevant to the necessary application.
Target membership is located on the right after clicking your custom font under your application files.

How to turn off "Requires Full Screen" option in iOS using Cordova 6?

When you create an application using Cordova 6, then build it for iOS, you will see that if you open the project properties on XCode, the option "Requires full screen" is enabled:
This is very troublesome because it prevents the app from "multitasking" on iOS (you cannot split the screen with your app open), as mentioned in [CB-9161] Support iPad multitasking in iOS 9:
Just want to mention, the fix (2) also needs to update the project's
info plist file to indicate the app does not require the full screen
as shown below
<key>UIRequiresFullScreen</key>
<false/>
In previous versions of Cordova, you were able to control this option using the FullScreen preference. However this no longer has an effect on iOS. The recommended alternative way is to use the cordova-plugin-statusbar plugin. But this does not provide any option to turn off full screen and the other options offered by the plugin do not allow multitasking either.
Question: how do you turn off the "Requires full screen" option from your Cordova 6 project (meaning: without having to manually update the XCode project after building for iOS)?
I would use the Cordova Custom Config plugin
With that plugin, you can pretty much change anything on the plist or manifestfile via the config.xml
So in your case, after installing the plugin, just add:
<config-file parent="UIRequiresFullScreen" platform="ios" target="*-Info.plist">
<false/>
</config-file>
in your config.xml

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

Titaniumn app to not run in background - Without changing info.plist

I'm trying to make my app not run in the background using Appcelerator Titanium, and have only come accross the solution which suggests editing the info.plist file after the build has completed.
<key>UIApplicationExitsOnSuspend</key>
<true/>
This works as expected, however this means I would have to put this in each time I do a full rebuild on the app. Does anybody know of anything i can put in the tiapp.xml file in order to acheive this?
Thanks
You can just copy the built info.plist into your Resources folder once. From http://developer.appcelerator.com/blog/2010/04/adding-custom-fonts-to-ipad.html
"As an update for those using 1.3+, we’ve changed the way that custom Info.plist files are handled in Titanium. You’ll want to copy the Info.plist that is generated for your project under build/iphone into your project root folder. You can edit this file to add any custom Info.plist changes. From now on, Titanium compiler will always use this Info.plist."

Resources