iPhone App rejected due to UIRequiredDeviceCapabilities - iphone

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.

Related

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?

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

Associating image file document types with iPhone apps

I'm currently developing an app that needed to associate with different file types (PDF and all the image file types) so far I've managed to associate my app with PDF files but the problam is when i tried to do the same with image files it just doesn't work.
is it even possible to associate PNG, JPG etc to you app ?
If it is, am i doing it right ? (the same way i took care of the pdf through the app plist "CFBundleDocumentTypes" )
I'll really appriciate any kind of help
For example, try adding this to your application. Make sure you have an Icon named DocumentIcon.png that is 22 px by 29 px.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>DocumentIcon.png</string>
</array>
<key>CFBundleTypeName</key>
<string>My App Name</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>org.gnu.gnu-zip-archive</string>
</array>
</dict>
</array>
This will work for opening files of type .gz. However, if you change the LSItemContentTypes to public.image or public.jpeg, it won't work.
I am having the same issue... I believe this doesn't work because applications like Mail on the iPhone display images as images and not attachments...I have noticed that if I change my setup to use any other file type this does work.

Splash image renders sideways for iPad app

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>