gpt4 book ai didi

ios - 在 Xcode 7 中使用 Bundle Identifier 而不是 Product Bundle Identifier

转载 作者:可可西里 更新时间:2023-11-01 03:03:45 26 4
gpt4 key购买 nike

升级到 Xcode 7 后,我注意到 CFBundleIdentifier 已开始指向在 Build Settings/Packaging 中找到的产品捆绑标识符,而不是 Info.Plist 中的捆绑标识符。有什么办法可以改回来吗?或者它会简单地指向 Bundle Identifier,即在 Product Bundle Identifier 字段中写入 $(BUNDLE_IDENTIFIER) 吗?

最佳答案

您应该将 $(PRODUCT_BUNDLE_IDENTIFIER) 保留在您的 Info.plist 中,并在 Build Settings > Product Bundle Identifier 中设置您的产品包标识符,其值类似于 com.mydomain.myappname.

来自 Xcode 7.0 发行说明:

The new build setting Product Bundle Identifier (PRODUCT_BUNDLE_IDENTIFIER) is the recommended place to set the Bundle Identifier for a target. The target’s Info.plist should be configured to use this build setting by referencing it as $(PRODUCT_BUNDLE_IDENTIFIER) in the value for the CFBundleIdentifier key.

Xcode offers to configure this for you when you accept the “Upgrade to recommended settings” project modernization in the issue navigator, unless your target preprocesses its Info.plist file. In that case you will need to configure this setting manually. This change is backwards-compatible to older versions of Xcode.

This change is required to make certain features work, such as On Demand Resources, if your target preprocesses its Info.plist file. (20887827)

关于ios - 在 Xcode 7 中使用 Bundle Identifier 而不是 Product Bundle Identifier,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33122484/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com