There're always more than one (xc)schemes in a single Xcode project/workspace.
When you open a project/workspace with Xcode, Xcode will decide an active scheme as the default scheme to be build/run.
And if you select another scheme, Xcode will remember it and the next time you open the project/workspace again, it will select that scheme to be the default scheme.
But I didn't found where did Xcode store the Active Scheme
info, nor did I found any API from third party tools like Xcodeproj
to get the active scheme, only schemes
provided.
So far I only found in xx.xcworkspace/xcuserdata/xx.xcuserdatad
the IDENameString
would change, but is there anything else more robust?