What is the state of non-Objective-C programming for iPhone?

后端 未结 18 2209
孤城傲影
孤城傲影 2020-12-16 11:56

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 kn

相关标签:
18条回答
  • 2020-12-16 12:10

    Objective-C and Cocoa are better for one reason: because that's what Apple wants you to use on the platform. The iPhone approval process is way too black of a box to start messing around with non-endorsed frameworks and tools. Who's to say Apple won't devise a way to see who is building apps with Mono and just rejects them all?

    0 讨论(0)
  • 2020-12-16 12:11

    How about the other built-in language, Javascript?

    Either you can run a web application inside a UIWebView, or you can use a hidden UIWebView to run pieces of Javascript code and examine their return values to drive your native application.

    An advantage over third-party languages and frameworks is that the Apple dev license clearly allows you to download and run javascript programs (as you use their official API to do that).

    Just found this Xcode plug-in that offers HTML&Javascript development of native-looking apps: Nimble Kit. May be worth a look...

    0 讨论(0)
  • 2020-12-16 12:12

    A web app is also a very good alternative if you want to make an app for your web site. A lot of hardware is exposed through some of the up-coming HTML5-APIs, and PhoneGap exposes some more for you.

    You can avoid the Apple approval process if you want by only hosting it on the web, or you can add it to the App Store by using UIWebView to load your web app. PhoneGap can help you with this also.

    There is another question that specifically asks about web application frameworks for iPhone, that lists a lot of good alternative frameworks: Available iPhone Web Application JavaScript UI Library/Frameworks

    Since JavaScript is interpreted by WebKit natively on the iPhone, Apple also approves these apps (depending on quality). The browser on iPhone is one of the best browsers on a mobile handset right now, but they're not the only one. With a little extra work you can make your web app also work on multiple plattforms. Peter-Paul Koch has done a lot of research on the state of the browsers, and also regularly blogs about web development for mobile devices. Check out his scientific results on mobile browsers or read some of his rant (funny and informative): http://www.quirksmode.org/mobile/

    I also like Jonathan Stark's book Building iPhone Apps with HTML, CSS, and JavaScript Building iPhone Apps with HTML, CSS, and JavaScript

    You can even make the app available offline with the help of a manifest file: Safari reference - HTML 5 Offline Application Cache. This is also further described in Jonathan Stark's book so you automatically modify the manifest when a resource is changed. Since the browser downloads all resources specified in the manifest file, it could be compared with updating the app in the App Store. Except it's instant and no approval process ;)

    0 讨论(0)
  • 2020-12-16 12:19

    I've recently written a blog post with a compilation of frameworks used to create iPhone apps in other languages, which you might find useful:

    http://akosma.com/2009/10/29/iphone-apps-without-objective-c/

    0 讨论(0)
  • 2020-12-16 12:20

    I've also looked for alternatives to Objective-C because writing it for me is simply not productive. I'm currently looking into XMLVM (http://xmlvm.org/overview/) as a way to write Java which then becomes Objective-C source code. There are many nice things about this solution but the biggest in my opinion is that it produces Objective-C source code so you are not prevented from attaching your core application to APIs which have not yet been mapped using XMLVM. My intention is to write the core of my applications in Java which is then portable to IPhone and Android, then add platform specific functionality on top of that in either Objective-C or Android-Java.

    0 讨论(0)
  • 2020-12-16 12:23

    There is also the Rhodes framework which is a ruby interpreter allowing you to write Rails style applications with HTML views.

    0 讨论(0)
提交回复
热议问题