简体   繁体   English

获取包装中的info.plist

[英]Get the info.plist in packaging

I added a custom-info.plist to the packaging section under Build settings for a new target. 我在新目标的“构建设置”下的包装部分中添加了一个custom-info.plist。

When I run this target it still grabs [AppName]-info.plist . 当我运行此目标时,它仍会获取[AppName]-info.plist For this custom plist I copied [AppName]-info.plist contents into this custom plist file. 对于此自定义plist,我将[AppName]-info.plist内容复制到了此自定义plist文件中。

Update: 更新:

I created 2 Targets Dev and Staging I created 2 .xcconfig files ENV = "Dev" - Dev.xcconfig ENV = "Staging" - Staging.xcconfig 我创建了2个目标Dev和登台我创建了2个.xcconfig文件ENV =“ Dev”-Dev.xcconfig ENV =“登台”-Staging.xcconfig

Then in my targets for debug I set the DevTarget to Dev.xcconfig and the StagingTarget to Staging.xcconfig 然后在调试目标中,将DevTarget设置为Dev.xcconfig并将StagingTarget设置为Staging.xcconfig

Im my plist file I added the line EnvironmentList = ${ENV} 在我的plist文件中,我添加了EnvironmentList = $ {ENV}行

Dev seems to work, but when I change it to my StagingTarget is its says Dev Dev似乎可以正常工作,但是当我将其更改为StagingTarget时,它说Dev

If you really want to use a different plist file you can set it from your build settings: 如果您确实要使用其他plist文件,则可以从构建设置中进行设置:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM