Skip to content
Samantha Marshall edited this page Jun 19, 2016 · 2 revisions

and

The and keyword is used exclusively in conjunction with if statements to declare multiple conditions for assigning a variable.

setting PRODUCT_NAME {
	if arch=i386 and sdk=iphone {
		libSimulator32
	}
	if arch=x86_64 and sdk=iphone {
		libSimulator64
	}
	if arch=armv7 and sdk=iphone {
		libPhone32
	}
	if arch=arm64 and sdk=iphone {
		libPhone64
	}
}

Will, in-turn, generate the following in the .xcconfig file:

PRODUCT_NAME[arch=i386,sdk=iphone] = libSimulator32
PRODUCT_NAME[arch=x86_64,sdk=iphone] = libSimulator64
PRODUCT_NAME[arch=armv7,sdk=iphone] = libPhone32
PRODUCT_NAME[arch=arm64,sdk=iphone] = libPhone64
Clone this wiki locally