Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
只有当项目在特定的构建配置中运行(发生在发布中,不在调试中)时,有没有办法在 Xcode 中运行后操作脚本。
非常感谢
是的; 在您的脚本中,$CONFIGURATION将设置变量:
$CONFIGURATION
#!/bin/sh if [ "$CONFIGURATON" != "Release" ]; then exit 0 fi # Does stuff only in Release build
请参阅此 SO question以获取您可能感兴趣的其他 Xcode 变量的列表。