iOS多环境打包
1.创建并配置新的Build Configuration
Xcode scheme 配制多环境
2.Add User-Defined Setting 添加key bundel_name 为个环境app设置名字
Xcode scheme 配制多环境
3.在info.plist 中 设置bundelname 设置为变量 :$(Bundle_Name)
Xcode scheme 配制多环境
4.为各环境设置bundel id 不让app覆盖
Xcode scheme 配制多环境
5.将各环境添加到schme 可以切换运行

6.执行pod install 添加环境pod的依赖

打开Xcode:

Project - Info -> Configurations -> 添加宏(dev pro test )

打开目录下的info.plist文件:

Bundle display name - $(Bundle_Name)

Targets -> BuildSettings -> Packaging -> Product Bundle Identifier -> 根据不同的环境配置不同的ID

Targets -> BuildSettings -> Use-Defined -> 添加环境变量名称 -> Bundle_Name -> 各个环境配置好。

Product -> Scheme -> ManageScheme -> 添加 -> 输入scheme名称 -> 编辑刚才添加的scheme.
参考链接:https://www.jianshu.com/p/97eb382e87c0

相关文章:

  • 2022-12-23
  • 2022-01-11
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-10-05
  • 2022-02-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2022-01-17
  • 2021-10-21
  • 2022-01-16
相关资源
相似解决方案