Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AppInfo

Stores the localized values that describe an Apple application in its property list.
Read time 2 minutesLast updated 7 days ago

Definition

public class AppInfo

Remarks

These are the strings the operating system shows while the application is not running, such as the name under the icon and the permission prompts. Unity reads this object when it builds for an Apple platform, resolves each value in every enabled locale, and hands the results to the installed Apple platform support, which writes them into the generated Xcode project. Without that platform support the values cannot be written and the build says so. Each property names the property list key it holds the value for. A value is resolved once per locale, so it cannot use Smart Strings; the operating system reads the built files without Unity running. Configure it before building, and reach it through LocalizationSettings.AppleAppInfo. No property ever reads as null: assigning null stores an empty value instead, so a property can always be read and configured without a null check.
Configure the Apple application name and permission prompts before a build.

Examples

using Unity.Localization;using Apple = Unity.Localization.Apple;namespace Unity.Localization.Samples{ public class AppleAppInfoExample { public void Run(Apple.AppInfo appInfo) { appInfo.ShortName.SetReference("App Strings", "App Short Name"); appInfo.DisplayName.SetReference("App Strings", "App Display Name"); appInfo.CameraUsageDescription.SetReference("App Strings", "Why We Need The Camera"); } }}

Properties

Property

Description

CameraUsageDescriptionThe reason the application asks for access to the camera.
DisplayNameThe full user-visible name of the application.
LocationUsageDescriptionThe reason the application asks for the device location while it is in the foreground.
MicrophoneUsageDescriptionThe reason the application asks for access to the microphone.
ShortNameThe short user-visible name of the application.
UserTrackingUsageDescriptionThe reason the application asks to track the user or the device.