How to specify the app orientation for Xcode in cmakelists?

Is there a way to specify the app supported orientations for Xcode from cmakelists, so that we don’t have to change it each time we regenerate the xcodeproj file ?

You can add the supported orientations to the Info.plist file, which is located in proj.ios_mac/ios/ for iOS. For example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
... other keys....
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationLandscapeRight</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
	</array>
</dict>
</plist>
1 Like