How do I configure full URLs in xcconfig files
Here's a simple workaround:
WEBSITE_URL = https:/$()/www.example.com
Configure associated domain from .xcconfig
Instead of using a variable for the ASSOCIATED_DOMAIN value, consider specifying a separate entitlements file for each of the schemes.
In the relevant xcconfig file, this can be done by setting:
CODE_SIGN_ENTITLEMENTS = [location of the file].entitlements
Debug configuration file (.xcconfig)
Just open the project navigator and select "Build Settings". If you have specified the config files correctly and added any setting to that file, a new column will appear, one for the xcconfig file for each target and on for the project as whole. The column to the far left is a "sum" of all you settings, and there you can verify that the settings you look for are set.
EDIT: Adding some pictures to show the columns with different config file settings.
Build settings without any property in the projects xcconfig file:
And the same with some settings in the projects xcconfig file:
The same applies for the Target as seen in the following two pictures:
No settings in the targets config file:
Some settings in the targets config file:
Check out this beginners tutorial for more visual examples and a step-by-step guide:
http://www.jontolof.com/cocoa/using-xcconfig-files-for-you-xcode-project/
Good luck!
XCConfig syntax
This is all about bash
, not xcconfig files. The xcconfig
file only establishes a build setting. By default, build settings are exported to run-script build phases as environment variables. That's the only relationship between the two. The format of xcconfig files was only relevant while reading the xcconfig file.
From the bash
man page section on Parameter Expansion:
${parameter/pattern/string}
The pattern is expanded to produce a pattern just as in pathname expansion. Parameter is expanded and the longest match of pattern against its value is replaced with string. […] If string is null, matches of pattern are deleted and the / following pattern may be omitted. […]
So, "${PREPROCESSOR_DEFINTIONS/CRASHLYTICS=1}"
expands PREPROCESSOR_DEFINTIONS
but removes all instances of CRASHLYTICS=1
from the resulting string.
The single =
is not assignment. It's the equals comparison. Bash also supports ==
but, as the man page says:
=
may be used in place of==
for strict POSIX compliance.
So, technically, =
is the more standard.
Thus, the if
is testing if PREPROCESSOR_DEFINTIONS
doesn't contain CRASHLYTICS=1
. If it did contain it, then the expansion with CRASHLYTICS=1
removed would not equal the unmodified expansion.
Of course, this makes sense given the echo
statements in each branch of the if
.
Related Topics
How to Display the Standard Checkmark on a Uicollectionviewcell
iOS Push Notification Banner Shown Twice for a Single Push
Installing Ffmpeg iOS Libraries Armv7, Armv7S, I386 and Universal on MAC with 10.8
Warning: Output of Vertex Shader 'V_Gradient' Not Read by Fragment Shader
How to Implement a Box or Gaussian Blur on iOS
When Exactly Do Implicit Animations Take Place in iOS
Change Uiimageview Size to Match Image with Autolayout
How to Play Video Stream with Mpmovieplayercontroller in iOS
"Could Not Find Developer Disk Image"
Removing New Line Characters from Nsstring
How to Draw a Line in the Simplest Way in Swift
Xcode 6 Upload App with Error: Itunes Store Operation Failed Error Description Not Available
Decrease the Width of the Last Line in Multiline Uilabel
Error: Cuicatalog: Invalid Asset Name Supplied: (Null), or Invalid Scale Factor:2.000000