About Info.plist file and Xcode 5 - ios

I have some questions regarding the information I should include in my project's Info.plist file before submitting the app:
A) About CFBundleIcons: I see this key when I open the file in Xcode as source code and the xml format is displayed but, when I open it as property list, I only see an Icon files (iOS 5) entry, is that correct? On the other hand, I've changed the app icons I firstly had in the General tab of the target settings, and the Info.plist file keeps listing the old app icons as well, and the new icons I added do not have the .png extension in their name... should I handle this information manually, or did I something wrong when I changed the icons in the target's settings? Should the names include the png extension? Should I list all versions of an icon (standard and #2x), or just the name for the standard is enough?
B) Regarding UIRequiresPersistentWifi key, Apple's docs say that
Include this key if your app requires a Wi-Fi connection
I'm not sure if I have to include this key: my app performs network operations but they could be done via WWAN, not only via Wi-Fi. And not all my app's features need network connection to be performed.
C) About UIRequiredDeviceCapabilities key. I have in turn some questions here: Apple says that
The value of the UIRequiredDeviceCapabilitieskey is either an array or a dictionary that contains additional keys identifying features your app requires (or specifically prohibits).
What do they mean when they say "features your app requires": those features which the app won't work at all without them, or all those features that your app can use? For example: my app includes an option for listening the device's location. It is an optional functionality, users can enable and disable it. I check [CLLocationManager locationServicesEnabled] when the user enables the option. I've no set the location-services value in the plist file and the app has been tested and the feature works, and the compiler has never complained. Should I include the value if I want to submit the app?
Something similar happens with another capabilities, for example microphone and still-camera. I use UIImagePickerController at some point of the app, as well as the microphone for speech recognition, but that are also optional functions of the app that the user has to select, they don't affect its overall operation. And I neither have included such values in the plist yet and they are working...
Thanks in advance

A: If you want to publish iPhone app only you need provide the 2 icon's(#1x, #2x),Now I think #1x is not for necessary, if you want to publish Both iPad & iPhone, you may need to provide 4 icon. But if you dont care about the quality 1 icon is OK.
B:This line UIRequiresPersistentWifi is not necessary.
C:Same as B) This line UIRequiresPersistentWifi is not necessary. if you have more require from iOS system.

Related

App Store Connect Warns - Invalid Document Configuration

I have submitted a Single View Swift iOS application to App Store Connect. The application is not Document Based.
The application uploads successfully, but I get the following warning in an email from Apple. I can still test the application through Test Flight, but I want to eliminate the warning.
"Invalid Document Configuration - Document Based Apps should support either the Document Browser (UISupportsDocumentBrowser = YES) or implement Open In Place (LSSupportsOpeningDocumentsInPlace = YES/NO)."
I just ran into the same problem; I don't know why, since I barely change anything since the previous version of my app.
Anyway, my app doesn't support the Document Browser, so the first half of the error message doesn't apply. That left me with the second half. I looked up LSSupportsOpeningDocumentsInPlace's documentation and still wasn't clear on how it works, so I decided to try both options. My app supports it's own document type, and when a user opens an appropriate file iOS shows an action sheet with the option "Copy to Leio" (my app). After setting LSSupportsOpeningDocumentsInPlace to YES, iOS wouldn't show that action sheet anymore; it would just open my app and do nothing. So I set it to NO; now the app works as it did before and I'm not getting that error message anymore. If you don't handle any document types I suppose you could set the option either way.
Edit: There's some more information about that option here.
So there you go. If your app were to edit a document, would it edit the original document, or would it make a copy and deal with that? Set the option accordingly. If you really don't do anything like that I'd guess setting the option to NO would be the safest bet, and I think that's how my app behaved when I hadn't set that option at all.
Since your app is not Document based just set UISupportsDocumentBrowser and/or LSSupportsOpeningDocumentsInPlace (reference and documentation) to NO in your plist. This should resolve the warning.
I had the same problem with the warning from App Store Connect. After changes these two keys to NO and resubmitting the warning was gone.
Typical Requirement
If your application is not document based (which would typically be the case if you get this new warning) and if furthermore you are already opening files in your documents directory, then all you need is:
LSSupportsOpeningDocumentsInPlace = YES
This answer does not apply if you are not opening documents in place (i.e. make a copy), or of course, if you so desire to support document browser, as seen in #rivera's comment.
If you are using UIDocumentInteractionController in your app, set
UISupportsDocumentBrowser = YES
in your project's info.plist; otherwise, set
UISupportsDocumentBrowser = NO
It appears that if you have CFBundleDocumentTypes in your apps Info.plist, even if the array is empty, this warning is triggered when you submit your app. If your app doesn't support any document types remove that key and you won't get the warning.
I also faced the same issue recently while uploading the app to TestFlight, The below solution worked for me,
In your app's Info.plist file, the UISupportsDocumentBrowser key is set to YES, declaring document browser support for your app.
For more info, please refer Setting Up a Document Browser App
Here are where you find the settings in Xcode 13:

iOS, config files and sandboxing

My understanding is that because of sandboxing, it isn't possible to view any text file (ie config file) associated with an iOS app using another app. Something quite simple with Android. Am I mistaken?
I am trying to implement a text config file with a Unity iOS app that gets loaded and parsed once when the application boots.
This config file would also be able to be edited and saved manually on that actual iOS device.
(addendum)
In Unity there is PersistentDataPath which resolves to /var/mobile/Container/Data/Application/foo/Documents
Is there an iOS supported file explorer app that will allow me view and edit files in this location (without jailbreaking)?
Use can check iOS App Groups. It allows multiple apps access to shared containers and allow interprocess communication. There is no so much documentation about this, but maybe that's what you're looking for. At least you can share NSUserDefaults between the apps.
NSUserDefaults it's a most simple way to save any (not big) configurations for your app. For manual editing: if your app on the device signed with developer certificate, you can connect through any iOS supported file explorer app and edit it. But after release, from App Store, your app installed in restricted/private path, so it's not possible, if only you don't have a jailbreak.
Initial configuration you can put into your app bundle, and at the first run just copy them to NSUserDefaults.
Short answer: There are utilities such as iExplorer - https://macroplant.com - that allow "file manager" type access. However...
Long answer: If your app requires users to buy (or get) other software to modify configuration files, the chances of Apple approving it are slim to none.
The appropriate thing to do is to provide a User Interface in your own app which allows the user to modify / update the settings.

Why doesn't my Info.plist work?

The project is not recognising the Info.plist correctly.
For example, I want to use the camera or the photo library in the app and even though I added the keys to the Info.plist, I see an error indicating that I need to add those keys.
Recently I used a URL in the app and added App Transport Security Settings to Allow Arbitrary Loads and the app shows me an error for this too.

Do I need to add a privacy "purpose string" to my app's Info.plist to allow it to run on iOS 10?

General Query
Does precise documentation exist for which API methods/properties require privacy "purpose strings" in iOS 10?
Specific Query
I have an app that links against the CoreBluetooth framework that accesses only the following methods/properties:
CBCentralManager:
state
- retrieveConnectedPeripheralsWithServices:
CBPeripheral:
name
In the documentation, I have found the following vague statements (emphases mine):
An iOS app linked on or after iOS 10.0 must include in its Info.plist file the usage description keys for the types of data it needs to access or it will crash. To access Bluetooth peripheral data specifically, it must include NSBluetoothPeripheralUsageDescription.
[...]
When the system prompts the user to allow usage, the value that you provide for this key is displayed as part of the alert.
[...]
To protect user privacy, an iOS app linked on or after iOS 10.0, and which accesses the Bluetooth interface, must statically declare the intent to do so. Include the NSBluetoothPeripheralUsageDescription key in your app’s Info.plist file and provide a purpose string for this key. If your app attempts to access the Bluetooth interface without a corresponding purpose string, your app exits.
[...]
The data and features that require user permission are described in Table 1-2.
(Table 1.2 states that NSBluetoothPeripheralUsageDescription is required to access "Bluetooth peripherals")
My app does not currently exit when it calls the APIs listed. Neither does it "prompt the user to allow usage".
However, this blog post suggests that the lack of a crash does not indicate that no purpose string is required.
(Despite the fact that my app is not "linked on or after iOS 10.0" (the current version has been in the store since before iOS 10 existed), it does crash citing a missing NSCameraUsageDescription when it attempts to access the camera.)
Furthermore, my reading of the documentation above suggests that I should be including an entry for NSBluetoothPeripheralUsageDescription.
Is there any other documentation that I've missed that lists which actual API calls are covered by which privacy purpose strings?
Do I need to add an entry for NSBluetoothPeripheralUsageDescription to my Info.plist?
Is there any harm in adding such an entry if it turns out not to be required?
Yes you're definitely need it, it was optional in pre-ios10 but now you have to explicit add the comment into the info.plist
IF you're build with iOS10. It will crash the app but If you build with pre-ios 10 it's fine. It's based on Xcode build not based on Device version
So basically, next time you update the app you need to add it.
and By the way, I couldn't find document for it, this is my own experience that we have when shifting from iOS9 to iOS10

Does the CFBundleURLIconFile key have any purpose in iOS?

In an app's Info.plist the developer has the opportunity to declare custom URL schemes supported by the app. The developer may also associate each scheme with an Apple Icon Image (icns) file in the bundle that will serve as an icon.
I have never seen these URL icons used anywhere, and I can't imagine how they even would be used. Is there any purpose to setting them?
That is not an iOS thing, but is instead intended for OS X/macOS.
You can read some about it here on the macOS Human Interface Guidelines page.

Resources