简体   繁体   English

有没有办法使用C ++进行iPhone开发?

[英]Is there a way to use C++ for iPhone development?

Sorry if this is mentioned somewhere, couldn't find any info about it. 抱歉,如果在某处提到此内容,找不到任何相关信息。 Post a comment if you find a duplicate. 如果发现重复,请发表评论。

This is not about whether it's possible at all to compile a C++ program for the iPhone (which I suppose is possible). 这与是否有可能为iPhone编译C ++程序(我认为是可能的)无关。

Basically the question is, can you bridge between Objective C and C++ ?, and if it is possible, would it be feasible to wrap the entire Cocoa Touch API for iPhone with a nice C++ library? 基本上,问题是,您能在Objective CC ++之间架起桥梁吗?如果可能的话,是否可以用一个不错的C ++库包装用于iPhone的整个Cocoa Touch API

I know nothing about Objective C, and I would really like the idea of bringing my current skills in C++ to the iPhone. 我对Objective C一无所知,我真的很想将我目前的C ++技能带到iPhone中。

EDIT : Very similar question here 编辑 :非常类似的问题在这里

This question is very close to duplicating your own. 这个问题非常接近复制您自己的问题。

However, I would suggest spending a little more time with Objective-C. 但是,我建议您花一些时间在Objective-C上。 I had done C++ development myself before learning Objective-C, and it was a pretty smooth transition. 在学习Objective-C之前,我已经完成了C ++开发,这是一个相当平稳的过渡。 Many of the core concepts are the same, and all of your base C skills will translate across. 许多核心概念是相同的,并且您所有的基本C技能都可以转换。 I think that once you get a little ways into it, you'll find that direct Objective-C interaction with the Cocoa frameworks is really the way to go on the Mac and iPhone. 我认为,一旦您对它有所了解,就会发现与Cocoa框架进行直接的Objective-C交互确实是在Mac和iPhone上进行的方式。 There are many great resources for getting started, like the ones I list here . 有很多很棒的入门资源,例如我在此处列出的资源。

Admittedly, there are some cases where it's preferred to have a cross-platform C++ engine behind the scenes, and an Objective-C / Cocoa UI. 诚然,在某些情况下,最好在后台使用跨平台C ++引擎和Objective-C / Cocoa UI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM