Splash image renders sideways for iPad app - iphone

I have an iPad application that only supports landscape mode (just for a demo I am doing) eventually it will support both. I want my app to launch in landscape mode and display my splash image. The app launches correctly in landscape mode however my image is displayed rotated to the left. The image file is in Landscape mode so I cannot understand why it is doing this. Any ideas?
Here is my plist:
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>UILaunchImageFile</key>
<string>welcome.png</string>
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>SignerIdentity</key>
<string>Apple iPhone OS Application Signing</string>
</dict>
</plist>

I don't use any UILaunchImageFile nor UIInterfaceOrientation keys on my Info.plist (I don't point to any Default.png file, I just throw into the projet files that are correctly named).
I only use UISupportedInterfaceOrientations~ipad and then just include with my project the following files:
Default-LandscapeLeft.png
Default-LandscapeRight.png
Default-Portrait.png
Default-PortraitUpsideDown.png
In your case just use "Default-LandscapeLeft.png" and "Default-LandscapeRight.png" and you should be fine. The only thing graphics-related in my Info.plist is:
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>

Related

iPhone App rejected due to UIRequiredDeviceCapabilities

This is twice that I am getting this message from apple for the reason of rejection.
From Apple
2.3 - Apps that do not perform as advertised by the developer will be rejected
2.3 Details
We attempted to review your app but were unable to install the app on iPhone. The UIRequiredDeviceCapabilities key in the Info.plist is set in such a way that the app will not install on an iPhone .
Next Steps
Please check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for your app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device.
Here is the info.plist that i am submittin. Look at the key 'UIRequiredDeviceCapabilities' where they say the problem is.
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>com.yourvoice.chatomic</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>107</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>f1e34e6abf0c05dfe5254ef3cc5debf97924e90b</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow to use current location?</string>
<key>UIAppFonts</key>
<array>
<string>OpenSans-Light.ttf</string>
<string>OpenSans-Semibold.ttf</string>
<string>OpenSans-Bold.ttf</string>
<string>OpenSans-Italic.ttf</string>
<string>OpenSans-Regular.ttf</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>voip</string>
</array>
<key>UILaunchStoryboardName</key>
<string>ActivityIndicatorView</string>
<key>UIMainStoryboardFile</key>
<string>MainChatomicStoryboard</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>armv6</string>
<string>gps</string>
<string>location-services</string>
<string>wifi</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
You will want to take the <string>armv7</string> and <string>armv6</string> out.
With UIRequiredDeviceCapabilities you are saying that the app only works on devices that have the features listed. As such you're saying that you only support devices that are armv6 and armv7, which is contradictory.
As a note, if your app can run without gps (e.g. on an iPod Touch) then you'll want to take those keys out too, only have them in there if you absolutely require them.

Associate Audio and Video Types with iPhone app

I am trying to make an app that will receive media files from the Mail app by using Long Press > Open in "My app"
I am having trouble associating the files types I want with my app. I am using the Uniform Type Identifiers Reference
This is what my info.plist looks like:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp3</string>
</array>
<key>CFBundleTypeName</key>
<string>MP3 Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mp3</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>avi</string>
</array>
<key>CFBundleTypeName</key>
<string>AVI movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.avi</string>
<string>video/x-msvideo</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>3gp</string>
</array>
<key>CFBundleTypeName</key>
<string>3GPP movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.3gpp</string>
<string>application/octet-stream</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mpg4</string>
<string>mp4</string>
<string>m4v</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG-4 content</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mpeg-4</string>
<string>video/mp4</string>
<string>video/mp4v</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mov</string>
</array>
<key>CFBundleTypeName</key>
<string>QuickTime movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.quicktime-movie</string>
<string>video/quicktime</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
</array>
Out of these, only Mp3 and AVI show the Open In "My app" option. I just get the "Save Video" option that adds the videos to my camera roll. What am I doing wrong?
The formats I want to associate are: AVI, 3GP, MP4, M4V, MOV.
I have also tried this. It works for MP3, WAV, AVI, FLV but still no go for 3GP, MP4, MOV, M4V
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Audio</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.movie</string>
</array>
</dict>
</array>
SO answer to How do I associate file types with an iPhone application?, shows some examples that differ from yours only very slightly. the content of this file looks like it should work, though there are some redundancies according to the documentation:
CFBundleTypeExtensions is MacOS only, and even then, it is
redundant and ignored if LSItemContentTypes is present.
LSTypeIsPackage is MacOS only, and even then, it is redundant
and ignored if LSItemContentTypes is present.
the documentation recommends using a uniform type identifier for
CFBundleTypeName . e.g. for mp4, rather than use MPEG-4 content
as you have, instead, try public.mpeg-4 (internally kUTTypeMPEG4)
still, while i think the cleanup would be a good idea, i think only the last one of these may have a real chance of solving your problem, because the other two should just get ignored.
… which means what i think may actually solve your problem is cleaning your app off the device and out of your cache, quitting xcode, and then re-opening your project, re-building, and running it again. i have experienced problems where Xcode and its deployment mechanism get confused when putting resources on the device. performing this cleanup may straighten things out if some attempt at registration initially failed before you got to this point.
I have installed other apps (e.g TeamViewer, oPlayer etc) that also support Document importing.. They too dont show up in the "Open As .." Action Sheet for the Mail app for MOV, 3GP, M4V etc.
I am guessing that apple doesnt allow some files to be opened by 3rd party apps and wants them handled internally. So all the user can do is save them to the Camera Roll.
The only options that remains is to add functionality to our apps to allow selecting videos from the camera roll. So, Mail > Save Video > Camera Roll > 3rd Party App
What a bummer.
My Final entries in Info.plist
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.3gpp</string>
<string>public.3gpp2</string>
<string>public.mpeg-4</string>
<string>public.avi</string>
<string>com.apple.quicktime-movie</string>
<string>public.mpeg</string>
<string>public.movie</string>
</array>
</dict>
</array>
I am still hoping there is some way around this.. anyone?

icon for iphone app on ipad3

My app targets iphone, but obviously it can also be installed on iPad.
On iPhone it uses the correct icon image; on iPad 2, it also uses the correct icon.
However on iPad 3, instead of using icon as icon, it uses my launch image as icon. Is this the usual behaviour on iPad 3? or is my setting wrong? (I uses the latest SDK, and targets iOS 5.0, if this matters)
Update
I attached the plist file below. I guess I can understand what's wrong... Default#2x.png is the name of the launching image. What puzzles me is that, this does not match what I see in Xcode on the "Summary" screen though. In Xcode on the summary screen:
I have retina icon set to SOF_app_icon.png, and I do not have a non-retina icon set - it says "no image specified";
I have two launching images set: Default.png for non-retina, and Default#2x.png for retina.
Here is the plist file:
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>SOF_app_icon.png</string>
<string>Default#2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.overwaitea.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>NSZombieEnabled</key>
<false/>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>location-services</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>corelocation</key>
<string>YES</string>
</dict>
</plist>
It uses the launch image (i.e. the image displayed while your app is still loading after launch)? That doesn't make any sense. It certainly isn't the normal behavior, and I would guess that you have made a mistake in your Info.plist icon entries.
Note that you need to supply a 2x icon for iPad 3... see the cornucopia of information that Apple supplies.
If you post a copy of your Info.plist (with any sensitive information redacted), along with your icon file names, we can probably nail down exactly what's going wrong.
As a final note, I have noticed that development copies of apps can get slightly out of whack vis-a-vis assets such as icons, seemingly because Xcode is trying to decrease launch time by only copying assets it thinks have changed. For this reason, it's probably a good idea to actually delete the app from the device/simulator and reinstall from scratch just to make sure you aren't seeing stale information.
EDIT: Thanks for posting the Info.plist. This clears up some things.
Let's start with the line:
<string>Default#2x.png</string>
Do you see that, inside your icon files setting, this is telling iOS to use your launch image as an icon? I'm guessing this was a typo, but I want to make sure you aren't confusing what the different plist keys are for.
Had the same problem
All icon files added to the iphone project (including icon-72.png, icon-72#2x.png, Icon-Small-50.png, Icon-Small-50#2x.png).
Than added the iPad files manually to the info.plist file. It showed that order matters.
Putting them at the end didn't work.
My order is now
Icon.png
Icon#2x.png
Icon-72.png
Icon-72#2x.png
and that worked for me.
For the record, Xcode 4.3.1 uses CFBundleIconFiles 3 and 4 for the launch images for apps targeting the iPhone. I cleared the launch images in the summary window and deleted the items in info.plist to be sure I wasn't the one causing the problem, and Xcode always set the launch images the same slots when re-added.
Change
<string>SOF_app_icon.png</string>
<string>Default#2x.png</string>
to
<string>SOF_app_icon.png</string>
<string>SOF_app_icon#2x.png</string>
How you have it configured is telling the device to set the retina icon as the retina version of your "Default" image.
To clarify "Default.png and Default#2x.png" are the standard names for your launch (splash) images.
Solution is simple,
In your plist->icon files-> Default.png and Default#2x.png may be added ! Just remove it from pList,
It Works

iPhone Phonegap Orientation problem

I make a simple application to iPhone with the phonegap library (Phonegap 0.9.6). I like to use the orientation function, but if I rotate the device, the screen don't change.
I tried a few things, but none worked.
I added these lines to _Info.plist:
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
Next try to add these same lines to the PhoneGap.plist.
I try to use javascript, but don't work. Anybody know thw solution?
You need to add these to YOUR_APP_NAME-Info.plist :
For iPad :
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
For iPhone :
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
I had the same problem, the only thing that worked for me was to add this code to my js (outside of deviceready):
window.shouldRotateToOrientation = function(degrees) {
return true;
}
Then add to the xml:
<preference name="Orientation" value="default" />
I had the same issue, you need to manually add to the plist file, as far as i can tell it's not copying from the config.xml due to a cordova issue.
So to get full orientation support on all your apple devices make sure the .plist file matches the below:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>

How to support external UTIs on the iPhone

I have been working on this for awhile for an app that I have been working on. The app is able to open up different files from other apps like mail for example. I have it working on the iPad but I need it to work on the iPhone as well. I ran into a problem with testing it on the iPhone, however, because the exported file extensions that I have in the UTExportedTypeDeclarations section in the info.plist file of the app are not able to be touched in mail on the iPhone.
Here is what I have in the UTExportedTypeDeclarations section:
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.myapp.ext</string>
<key>UTTypeDescription</key>
<string>Generic</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.content</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>ext</string>
</array>
</dict>
</dict>
</array>
I also have this in this in the corresponding CFBundleDocumentTypes :
<dict>
<key>CFBundleTypeName</key>
<string>Generic</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.myapp.ext</string>
</array>
</dict>
In conclusion it is not reading the .ext file extension on the iPhone but it is on the iPad.
Any help would be much appreciated.
Thank you