iOS: Require Retina Display in plist - ios

This is an odd request, but I would like to be able to require devices to have a retina display in order to build an application. Is there a key and value I can add to my plist to add that build requirement?

You can check if there id a front camera, and set it in the info.plist UIRequiredDeviceCapabilities key.
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>front-facing-camera</string>
</array>
look here for more details:
iPhoneOSKeys
BTW
That will work for iPhone only.

Related

SceneConfiguration Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")

I'm getting this error when trying to run flutter app to IOS devices, this error occurs when launching the application on the device for the first time.
Assuming you don't actually use scenes, this warning can appear for a few reasons. Most common I've noticed is using a LaunchScreen.storyboard sort of thing, they contain scene data. If indeed you don't use scenes. You can get rid of this by being explicit in your Info.plist. Add the following;
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict/>
</dict>
If you are managing your Info.plist with Targets > Info > Custom iOS Target Properties you would set Application Scene Manifest like the picture

uploading application to itunes connect - ERROR 90098

This morning i tried to upload my application to itunes store to review it.
I used the Application Loader from Apple to do this job but, after few minutes, the process failed with this error during the uploading:
ERROR ITMS-90098: This bundle is invalid. The key UIRequiredDeviceCapabilities contains value 'bluetooth-le' which is incompatible with the MinimumOSVersion value '9.0'
I put the key bluetooth-le in the application .plist to force the installation only on the compatible devices. (because the ios app will communicate trought BTLE with a specific device.)
Thanks in advance.
For someone who's interested i solved the problem using a dictionary value in the .plist instead of an array.
In this case specifying the key 'bluetooth-le' with value set to 'true'
everything works fine.
Old .plist
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>bluetooth-le</string>
</array>
New .plist
<key>UIRequiredDeviceCapabilities</key>
<dict>
<key>armv7</key>
<true/>
<key>bluetooth-le</key>
<true/>
</dict>

How to add a Background service in Ionic app

I try to use cordova Background Geolocation to send my position to a server in background. But when i put my app in background after some time it stop working. So I tried BackgroundFetch service https://github.com/christocracy/cordova-plugin-background-fetch but doesn't work: the error is:
You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
how can i add fetch to the list of your supported UIBackgroundModes in my Info.plist?
Just do it as it is. Find the Info.plist in your project and add a pair of key/value like this,
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>
Once you did it, rebuild it and the warning will disappear.

Xamarin.iOS localization of NSLocationWhenInUseUsageDescription

Is there a way to localise the NSLocationWhenInUseUsageDescription in Info.plist in the Xamarin Studio?
Or any possibility to localise the complete Info.plist would be a solution as well.
I tried the following steps as it looks analogue to the
How to localise a string inside the iOS info.plist file? but it does not work for me.
So these are the steps:
In both en.proj and de.proj:
I added an empty file InfoPlist.strings
In Info.plist:
I have set the key of the "NSLocationWhenInUseUsageDescription" to "NSLocationWhenInUseUsageDescriptionMessage".
In InfoPlist.strings:
I added the "NSLocationWhenInUseUsageDescriptionMessage" as key in the strings files and the corresponding transitions in each, but it seems not to work -> the raw string "NSLocationWhenInUseUsageDescriptionMessage" is shown when the user is asked for the permission.
I had similar problem (only I used "Always" instead of "WhenInUse". Here's what worked:
In both en.lproj and de.lproj add the file InfoPlist.strings. Each of the files contains only one line:
"NSLocationAlwaysUsageDescription" = "Your location needed, because...";
In Info.plist, the string doesn't matter anymore, because it will be taken from the InfoPlist.string file. The relevant lines in Info.plist look like this:
<key>NSLocationAlwaysUsageDescription</key>
<string>No text needed here.</string>
Maybe you forgot the semicolon in the strings-files? Or your two folders were named *.proj instead of *.lproj?
We faced a similar issue for the localization of NSLocationWhenInUseUsageDescription. The translation was shown on the iOS simulator but never on real devices. After we fixed our CFBundleLocalizations array from upper case language codes to lower case in the Info.plist the permission description was translated correctly for all languages.
Not correct:
<key>CFBundleLocalizations</key>
<array>
<string>EN</string>
<string>DE</string>
<string>BG</string>
<string>PL</string>
<string>FR</string>
<string>CS</string>
</array>
Correct:
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>de</string>
<string>bg</string>
<string>pl</string>
<string>fr</string>
<string>cs</string>
</array>

Icon already includes gloss effects

I have a problem with the gloss effect in app icon at iOS 5 beta 5, in iOS 4 it's show the effect not gloss, but iOS5 shows the gloss effect. I put the option Icon already includes gloss effects = YES, but simply does not work, and it appears that the application Google+ also has the same problem
iOS 5 has anew "Icon Files (iOS 5)" key in the Info.plist file. Make sure the "Icon already includes gloss effect" boolean in that dict is set to "YES" too. You may need to clear your build folder before the changes take effect in the simulator. It takes a lot of troubleshooting to get it to work on older projects, so you might try erasing the root level key.
First Settings in a your project info-list set key Icon already inculdes gloss effects to YES Boolean value like below screen shot:
after try project Target settings tick the checkbox in the summary tap in the App Icons section
like below screen shot:
it's worked for me!
Welcome in Advance!
It appears this problem is still not fixed in the GM.
I set UIPrerenderedIcon to YES, but the rendered icon includes gloss effect.
Sorry, I confirmed that this problem is solved in the GM. If you would like to erase gross effect, set "Icon already includes gross effect" under "Primary Icons" under "Icon files (iOS 5)" to YES.
There are 2 keys in the Info.plist governing this.
xCode generated the following code for you, but it doesn't offer a GUI for changing this:
Open your Info.plist file (Right Click > Open As > Source Code).
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>myIcon.png</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
set the UIPrerenderedIcon = true and you are good to go (this is NOT the other UIPrerenderedIcon that also exists in this file as a boolean key!).
Just in case anyone stumbles across this due to a problem using an asset catalog in Xcode 5.0, there is a setting in the Attributes Inspector of the asset catalog that should be checked:
Some of you will do these things and still not have retina display or gloss to reflect these changes.
In XCode 4.3.2 and possibly earlier versions, make sure you check the "Summary" tab in your project settings. There you will find a section called "App Icons" that should show both your Icon.png and Icon#2x.png. Make sure you have the "Prerendered Icon" box checked.
Even after all this, you might not have the retina display working. Check the "Info" tab's "Custom iOS Target Properties" section.
Make sure you delete the "Newstand Icons" section if you aren't going to use them or it will stop your app from passing validation when submitting to the AppStore.
In the release notes for iOS5 Beta 6 it says:
FIXED: The UIPrerenderedIcon key (in the Info.plist file) is not
honored in this beta.
Yes, it's an iOS 5 bug. I'm sure it'll be fixed in the GM.
I had the same problem with an unwanted gloss effect using xCode 5.0. I went through all posted answers. Here is what worked for me:
1) Remove "Icon Already Includes Gloss Effects" from Info.plist. I did this because, although this is set to "YES", which should work properly -- for whatever reason, it wasn't working, so I wanted to remove it before adding the correct code.
Here's how to do it:
Click your project name in the navigator (left column) > then in the Editor (middle column) click info. In the field that states "Icon Includes Gloss Effects", click the minus "-" button to delete. This removes the code that is not working, so you will start with a clean palette.
2) Open your Info.plist file -- In the Navigator (left column), find the info.plist file then (Right Click > Open As > Source Code).
3) Your code will look like this:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-120</string>
<string>Icon-72</string>
<string>Icon-57</string>
</array>
</dict>
Now copy the following 2 lines of code, because you will paste them into the code above:
<key>UIPrerenderedIcon</key>
<true/>
Your final code should look like this:
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>YourIconFile</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
This is the best answer I can provide. Worked for me.
What worked for me is to change the "Icon already includes gloss effect" boolean under "Icon Files (iOS 5)" first to NO, compile, then set the boolean to YES and compile.
I set “Icon already includes gloss effects = YES”
In the info.plist, search this part:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>myIcon.png</string>
</array>
</dict>
</dict>
Now, add this 2 lines:
<key>UIPrerenderedIcon</key>
<false/>
At the end, It must to be:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>myIcon.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>

Resources