将C ++库集成到iPhone应用程序中 [英] Integrate C++ library into iPhone app

查看:95
本文介绍了将C ++库集成到iPhone应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以将我现有的C ++库集成到iPhone应用程序中吗?

Can I integrate my exsisting C++ library in an iPhone application?

推荐答案

虽然你不能混合使用C ++在Objective-C中,您可以将它与Objective-C ++混合使用,我相信iPhone也支持它。将C ++代码与iPhone应用程序集成应该不是问题,但如果您想保持安全,那么您应该将代码构建为库,然后从iPhone应用程序链接到它;这样你就不必担心混合Obj-C代码和C ++类了。

While it's true that you can't mix C++ classes in Objective-C, you can mix it with Objective-C++, which I believe is also supported in the iPhone. Integrating C++ code with an iPhone app shouldn't be an issue, but if you want to stay on the safe side, then you should build your code as a library and then link to it from your iPhone app; that way you don't need to worry about mixing Obj-C code and C++ classes.

至于Apple的批准,没有人可以给你一个明确的答案或者可能不会限制您的应用程序包含在商店中,因为Apple对整个过程非常关闭。但是,现在已经非常清楚,某些类型的应用程序无法实现这一目标。即:

As for Apple's approval, nobody can give you a definitive answer as to what may or may not qualify your app for inclusion in the store, since Apple is rather closed about the whole process. However, it's pretty clear by now that it's certain types of applications aren't going to make the cut; namely:


  • 以Apple不喜欢的方式滥用或扭曲iPhone SDK的应用程序。 IE,设置设备的亮度

  • 使用过多的带宽或系统资源(不必要地耗尽电池寿命)

  • 在某处复制Apple的功能(即,制作邮件客户端,网络浏览器等。)

  • 滥用定价等级和方案

  • Apps that "abuse" or twist the iPhone SDK in ways Apple doesn't like. IE, setting the brightness of the device
  • Using too much bandwidth or system resources (draining battery life unnecessarily)
  • Duplicating Apple's functionality somewhere (ie, making a mail client, web browser, etc.)
  • Abusing the pricing tiers and schemes

实际上,最好只是谷歌搜索被禁止的应用程序的例子,以获得更好的感觉。但最重要的是,它不是 你的应用程序做了什么,它是你的应用正在做什么会导致它被禁止。

Actually, it's better to just google for examples of banned apps to get a better feel for it. But the bottom line is, it's not how your app does something, it's what your app is doing which will lead to it being banned.

这篇关于将C ++库集成到iPhone应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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