开发者

Compile C# into objective-C

Now that monotouch is banned, I was wondering if there is a way to translate C# (or some other language) into Objective-C? I won't mind using Apple's API as long as I don't have to declare my variables in 3-4 stages (ivar-property-synthesize-dealloc). All I want is a less wordy language, to concentrat开发者_JAVA技巧e on my intent and not on the compiler syntax.


You should pause to see what actually happens instead of assuming Monotouch is banned.

Or, learn Objective-C. It's good for the mind to learn a new language anyway. And the frameworks will make more sense to you.


You could always define your own meta language for objects, write your intended meaning, parse that file, and paste the newly manufactured code into XCode.

And if you're really dead-set against ObjC and XCode, Apple has given you your ultimatum: use it or leave.


If it turns out the way people are suggesting it will turn out, then the answer to your question doesn't actually solve your problem.

The SDK agreement make specific mention to the 'originality' of the Objective-C (and other languages). Translating from C# to Objective-C breaches this requirement that applications be originally written in Objective-C.

Secondly, Monotouch already supports full AOT compilation.


Translating would be against Apples policy because your code must be originally coded in C, Obj -C, C++.

Coming from originally learning Java its really not that hard. Is the declaration of variables in multiple places really your main objection? Its easy to do and gives you tight control over your program. It is also suspected that iPhone OS 4 needs native code to be able to multitask properly. It makes sense as well otherwise they would of amended the current licence agreement if they wanted to stop Adobe.


This is something I wrote last year and may help you with the transition - Objective C by example for a C# developer, assuming Monotouch is actually forbidden.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜