iOS Development

Tips on how to declare the reason why my iOS app makes use of UserDefaults in Xcode / App Retailer Join?

Spread the love

Begin with Apple’s documentation for Privateness manifest recordsdata. You must create a privateness manifest file.

So as to add the privateness manifest to your app in Xcode, select File > New File, and scroll right down to the Useful resource part. Choose the App Privateness file kind, click on Subsequent, then click on Create. By default, the file is known as PrivacyInfo.xcprivacy; don’t change the filename. On the prime degree of this property listing file, add the next keys to the dictionary.

For the UserDefaults privateness causes, you want the important thing NSPrivacyAccessedAPITypes. That is described within the above documentation as:

An array of dictionaries that describe the API varieties your app or third-party SDK accesses which have been designated as APIs that require causes to entry. For info on the keys and values to make use of within the dictionaries, see Describing use of required purpose API.

The UserDefaults particular part may be discovered right here.

The next exhibits a minimal instance for indicating that you simply solely person app-specific values in UserDefaults:

enter image description here

The corresponding XML of this plist appears to be like as follows:

<?xml model="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist model="1.0">

It is a lot simpler to create this in Xcode as a plist and never as XML since Xcode lets you choose solely the related keys and values.

My instance exhibits the UserDefaults purpose as CA92.1. You could after all present the worth(s) acceptable to your app.

My instance additionally solely exhibits a naked minimal only for the UserDefaults API. See the linked documentation for different top-level keys you additionally want in addition to different APIs your app may have to offer.

2 thoughts on “Tips on how to declare the reason why my iOS app makes use of UserDefaults in Xcode / App Retailer Join?

  1. Thanks I have recently been looking for info about this subject for a while and yours is the greatest I have discovered so far However what in regards to the bottom line Are you certain in regards to the supply

Leave a Reply

Your email address will not be published. Required fields are marked *