iOS开发(OC)

xcode配置多个打包环境

2021-03-03  本文已影响0人  zrock_chen

如果有使用 cocoapods的话,需要执行 pod install 否则会报错

补充

Swift项目中还需要设置 Swift Complier - Custom Flags -> Active Compilation Condition

image.png
#if DEBUG // 开发环境
    
    NSLog(@"------DEBUG-------");
    
 //dosomething...
#elif pre_debug  // 本地开发环境

    NSLog(@"------pre_debug-------");
    
#else
    
    NSLog(@"------release-------");
    
#endif
上一篇 下一篇

猜你喜欢

热点阅读