如何调试模式运行应用程序和释放模式不同的API在IOS [英] How to run application in debug mode and release mode with different api's in ios

查看:181
本文介绍了如何调试模式运行应用程序和释放模式不同的API在IOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我这个issue.I都与一个API开始,并在释放模式运行我在调试模式下的应用我要运行另一个API开始。

Please help me with this issue.I have to run my application in debug mode with one api starting with and in release mode I have to run another api starting with.

在调试模式下我用这样的API http://def.info/api/homeapi/Login ,并在释放模式,我应该像 http://abc.info/api/homeapi/使用Login.If 我想在释放模式或调试模式我改变了我的所有的API根据运行。但我知道这是不是做的正确方法。请
 帮帮我吧。

In debug mode I use like this api http://def.info/api/homeapi/Login and in release mode I should use like http://abc.info/api/homeapi/Login.If I want to run in release mode or debug mode I'm changing all my api's according to that. But I know this is not the correct way to do. Please help me.

推荐答案

让我们尝试:

#ifdef DEBUG
#define LINK_API @"LINK THAT YOU WANT"
#else
#define LINK_API @"LINK THAT YOU WANT"
#endif

这篇关于如何调试模式运行应用程序和释放模式不同的API在IOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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