iPhone的非目标C编程的状态是什么? [英] What is the state of non-Objective-C programming for iPhone?

查看:86
本文介绍了iPhone的非目标C编程的状态是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在花了三周的时间学习了我的Objective-C和Cocoa编程后,我的任务是研究iPhone开发的替代方案.

After spending three weeks learning Objective-C and Cocoa programming for my work, I've been tasked with researching alternatives to it for iPhone development.

我知道两个现有的替代方案,以及一个未来的可能性.

I know of two existing alternatives, and one future possibility.

C#

  • Xamarin (以前是MonoTouch)是具有绑定的C#.NET实现适用于iPhone的特定功能,例如触摸屏和加速度计.它与Xcode和Interface Builder集成在一起,还允许进行自定义的Objective-C绑定.

Java

  • alcheMo-for-iPhone 生成从J2ME源代码为iPhone编译的C ++代码.它还提供触摸屏和加速度计绑定.

Flash/ActionScript 3

我想知道是否有人对此有经验.我们公司正在考虑使用这些解决方案来重用代码,而不是在Objective-C中重新编写相同的功能.

I'd like to know if anyone has experience with any of these. Our company is looking into re-using code using these solutions if possible, rather than re-writing the same functionality in Objective-C.

编辑:我知道不使用Objective-C和提供的框架的弊端.我想从经验丰富的人员那里获得关于可能的解决方案的意见,而不是为什么Objective-C更好的原因.

I know the drawbacks of not using Objective-C and the provided frameworks. I would like input as to possible solutions from people with experience doing this rather than reasons why Objective-C is better.

推荐答案

我会非常怀疑iPhone上的非ObjC语言.不一定是因为要克服一些巨大的技术障碍(您可以编译几乎所有您想使用的iPhone,甚至可以通过一些调整使其运行),但是有两个重要的原因:

I'd be pretty skeptical of non-ObjC languages on the iPhone. Not necessarily because there's some huge technical hurdle to be surmounted (you can compile pretty much whatever you want down to the iPhone, and even get it to run with some tweaking), but for two other important reasons:

  • 框架.尽管您列出的内容具有触摸屏和加速度计绑定,但您很可能会丢失诸如蓝牙连接和游戏套件,音频框架,应用内购买等内容.要用另一种语言来重现Apple提供的所有内容,将是非常困难的,如果您选择其他方式,然后又需要其中一种框架,则可能会遇到麻烦.
  • 应用提交.如果要在App Store上获取应用程序,则可能应该坚持使用ObjC.苹果对它们允许的功能非常挑剔,并且使用其他语言可能会误导一些评论家.
  • Frameworks. While the things you listed have touch screen and accelerometer bindings, you'll most likely be missing things like Bluetooth connectivity and the Game Kit, audio frameworks, In-App Purchase, and the like. It'd be pretty difficult to reproduce everything Apple offers in another language, and if you choose a different way and then wind up needing one of those frameworks you may be stuck.
  • App submission. If you want to get apps on the App Store, you should probably stick with ObjC. Apple is notoriously picky about what they allow through, and using a different language might strike some reviewer the wrong way.

您还将在代码签名/证书之类的事情上遇到更多麻烦,更不用说调试了(令我感到奇怪的是,MonoTouch将调试作为一项功能来宣传,而不是将某些事情视为理所当然的事情.语言).

You'll also have a lot more trouble with things like code signing/certificates, not to mention debugging (it struck me as strange that MonoTouch is advertising debugging as a feature, rather than something that's kind of taken for granted within the language).

总而言之,如果可以的话,我会坚持使用ObjC.通常,对于所有相关人员来说,这都更加容易.

All in all, I'd stick with ObjC if you can. It's generally just easier for all concerned.

更新:2010年9月新的iOS使用条款包含第三方开发,广告平台

这篇关于iPhone的非目标C编程的状态是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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