EasyApp

AppData 配置

了解 AppData 的配置

App 基本信息配置

  • 在 EasyApp 中,我们将一些 App 的基本信息配置放在了 枚举值 AppData 中,除了示例中配置的 App 基本信息,您可以在这里配置您需要的Key,比如您有其他的社交平台、 联系方式等。

  • 像 appVersion、appBuildNumber、appName、appIdentifier、appDisplayName 您不需要修改它们的值。它们一般会用在 App 的设置页面中,比如 App 版本号、构建版本号、App 名称、App 包名、App 显示名称等。

    about

App 基本信息

appVersion - App 版本号

appBuildNumber - App 构建版本号

appName - App 名称

appIdentifier - App 包名

appDisplayName - App 显示名称

社交网站相关

supportEmail - 支持邮箱

xURL - X(Twitter) 地址

websiteURL - App配套网站地址

隐私协议相关

privacyPolicyURL - 隐私政策地址

userAgreementURL - 用户协议地址

termsOfServiceURL - 服务条款地址

EasyAppSwiftUI/Constants/Constants.swift
enum AppData {
	// MARK: - Version

	// This is a string value that is used to store the version of the app.
	public static let appVersion =
		Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String

	// MARK: - Build Number

	// This is a string value that is used to store the build number of the app.
	public static let buildNumber = Bundle.main.infoDictionary?["CFBundleVersion"] as! String

	// MARK: - App Name

	// This is a string value that is used to store the name of the app.
	public static let appName = Bundle.main.infoDictionary?["CFBundleName"] as! String

	// MARK: - App Identifier

	// This is a string value that is used to store the identifier of the app.
	public static let appIdentifier = Bundle.main.infoDictionary?["CFBundleIdentifier"] as! String

	// MARK: - App Build Number

	// This is a string value that is used to store the build number of the app.
	public static let appBuildNumber = Bundle.main.infoDictionary?["CFBundleVersion"] as! String

	// MARK: - App Display Name

	// This is a string value that is used to store the display name of the app.
	public static let appDisplayName = Bundle.main.infoDictionary?["CFBundleDisplayName"] as! String

	// MARK: - supportEmail

	// your support email
	public static let supportEmail = "your support email"

	// MARK: - Website

	// your website
	public static let websiteURL = "app website url"

	// MARK: - X

	// your X
	public static let xURL = "X(Twitter) url"

	// MARK: - Privacy Policy

	// your privacy policy
	public static let privacyPolicyURL = "privacy policy url"

	// MARK: - User Agreement

	// your user agreement
	public static let userAgreementURL = "user agreement url"

	// MARK: - Terms of Service

	// your terms of service
	public static let termsOfServiceURL = "terms of service url"
	
	// 您的其他配置
	...
}

接下来 推荐您阅读如何集成更多服务

Last updated on