简体   繁体   中英

Will variables from all the xcconfig files be bundled with the app?

I have three xcconfig files, Debug.xcconfig which consists , APPURL = "Debug"

Release.xcconfig which consists , APPURL = "Release"

Production.xcconfig which consists , APPURL = "Production"

and added APPURL : $(APPURL) key value pair in the app's plist file

So now user defined variables will be added in app's build settings for all the three configurations something like below

APPURL = "Debug"

APPURL = "Release"

APPURL = "Production"

Can anyone please answer , all the three user defined variables will be bundled with the app? OR

Does it bundle the respective variable based on the configuration selected while building the app?

For example does it bundle only APPURL = "Release" if app is build for release configuration?

It will only have one APPURL key in the plist, and that will have the value from the configuration's .xcconfig file.

However, you don't have to take my word for it. You can see for yourself by archiving the product with the desired configuration, then find the product's .app folder and open up the Info.plist that will be inside it.

For example, if I archive a product, then from the Organizer I can right-click on the archive and select "Show in Finder".

Then from there I can right-click and select "Show Package Contents".

Drill down into Products-Applications and you'll find your .app file. Right click on that and select "Show Package Contents".

There, you will find the app's Info.plist . Double-click on that to open it and you can see for yourself what the contents are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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