iOS-自定义配置-“无此模块" [英] iOS - Custom Configuration - "No such module"

查看:79
本文介绍了iOS-自定义配置-“无此模块"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的ios应用中,我试图区分环境,以对适当的环境(DevelopmentStagingProduction)进行Web api调用.

In my ios app, I'm trying to distinguish environments, to make web api calls to the proper environment (Development, Staging and Production).

为此,我创建了一个configuration.plist文件,其中每个环境的端点不同:

For that I have created a configuration.plist file with the different endpoints for each environment and:

  • 复制Debug配置并将其命名为Development Build.
  • 创建了一个名为Development的新方案(复制了Debug方案) 并在信息"标签(Run部分)中选择了Development Build 配置.
  • Duplicated the Debug Configuration and called it Development Build.
  • Created a new Scheme called Development (duplicated the Debug scheme) and in the Info tab (Run section) chose the Development Build configuration.

当我在调试"模式下运行时,一切正常运行.

When I run in Debug mode, everything runs normally.

我正在使用可可豆荚.

如果选择Development方案,则会得到No such module 'JazzHands'

If I select Development scheme, I get a No such module 'JazzHands'

如果我编辑Development方案以使用Debug构建,则可以正常工作.

If I edit the Development scheme to use the Debug build, it works fine.

所以我必须丢失一些东西才能使它不起作用.

So I must be missing some thing for this not to work.

推荐答案

对于遇到此问题的人员,请尝试pod install,这将生成一些带有您的配置名称的.xcconfig文件.清理您的构建文件夹,然后重新构建.

For those running into this question, try pod install this will generate some .xcconfig files with your configuration name. Clean your build folder and build again.

这对我来说与Cocoapods 1.0兼容

This worked for me with Cocoapods 1.0

这篇关于iOS-自定义配置-“无此模块"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆