First, make a new scheme (or edit the current one) and change the executable to Terminal.app:
Then, under the "Arguments" tab, make sure "Base Expansions On" is set to your App. Then put open -a ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}
?
?
The command will get expanded to something like open -a /Users/Me/Library/Developer/Xcode/DerivedData/MyProj-abcdefghijklmnopqrrstuvwxyz/Build/Products/Debug-iphonesimulator/Universal.app
open -a
is how you open an App from the command line.
Edit: Use ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}
instead (see comments).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…