如何设置xcode debug release test dev 等模式

debug release

debug release模式默认就有。Debug模式在开发的时候用, Release在TestFlight 或 App Store使用。

当你点击  (cmd + R) 运行程序到模拟器或者真机上的时候,跑的就是debug模式。

 在弹框中选择 Run => Info => Build Configuration选择中进行Debug 和 Release的切换

其他模式

 点击+。 duplicate 一个,改个名字Test, QA或者其他的,再回到scheme,会发现多出来了模式

有什么用?

同一个设备安装不同环境的包

给不同的编译模式,设置不同的包名,就可以在同一个设备上安装不同环境的包

不同的Product Name名

 

代码中使用

 

参考

How to Setup Configurations and Schemes in XCode

https://medium.com/geekculture/what-are-debug-and-release-modes-in-xcode-how-to-check-app-is-running-in-debug-mode-8dadad6a3428

猜你喜欢

转载自blog.csdn.net/linzhiji/article/details/128158567