降低iPhone开发障碍的两个应用程序

tech2024-03-14  66

When the iPhone first launched, Steve Jobs announced that the web was the iPhone’s development platform. Despite the many initial groans that there wouldn’t be a true app platform for the device, a healthy ecosystem of web apps created specifically for the iPhone began to appear. Eventually, Jobs and company relented and added a full on platform to the phone allowing anyone to create applications that took advantage of the phones unique, native features. But that left the web application developers out in the cold.

当iPhone首次发布时,史蒂夫·乔布斯(Steve Jobs)宣布网络是iPhone的开发平台。 尽管最初有很多抱怨,认为该设备没有真正的应用程序平台,但专为iPhone创建的健康的Web应用程序生态系统开始出现。 最终,乔布斯和公司做出了让步,并在电话上添加了完整的平台,允许任何人创建利用电话独特的本机功能的应用程序。 但这使Web应用程序开发人员感到冷落。

They faced two options: either learn Objective-C and Cocoa so they could make an iPhone app version of their iPhone web application, or stick to their web app and operate at a disadvantage since they did not have access to many of the iPhone’s native features.

他们面临两种选择:要么学习Objective-C和Cocoa,以便他们可以制作自己的iPhone Web应用程序的iPhone应用程序版本,要么坚持使用自己的Web应用程序并处于不利地位,因为他们无法访问许多iPhone的本机功能。 。

Enter Big Five and PhoneGap. Both projects have essentially the same goal — allow web developers to access the iPhone’s native functions, such as taking photos, geo location, vibration, and the accelerometer via the web — but each takes a slightly different approach.

输入大五和PhoneGap 。 这两个项目的目标基本相同-允许Web开发人员访问iPhone的本机功能,例如通过Web拍摄照片,地理位置,振动和加速度计-但每个方法都略有不同。

五大浏览器方法 (The Big Five Browser Approach)

Big Five is an “extended browser” for the iPhone. Essentially, this is Safari with hooks into the iPhone’s native APIs. Web apps accessed via Big Five, which was developed using the current iPhone SDK and the UIWebKit component, can take advantage of the browser’s access to the APIs to do things like use the accelerometer or GPS by calling on a special JavaScript API file.

五巨头是iPhone的“扩展浏览器”。 本质上,这是具有与iPhone的本机API挂钩的Safari。 通过使用当前iPhone SDK和UIWebKit组件开发的通过Big Five访问的Web应用程序,可以通过调用特殊JavaScript API文件来利用浏览器对API的访问来执行诸如使用加速度计或GPS的操作。

Apps can create a special Big Five URL that can be bookmarked on the iPhone home screen and automatically opened in Big Five instead of regular iPhone Safari.

应用程序可以创建一个特殊的Big Five URL,该URL可以在iPhone主屏幕上加为书签,并在Big Five中自动打开,而不是常规的iPhone Safari。

The problem, though, is that Big Five only works for developers if users have it downloaded. And the biggest barrier to getting it on user iPhones is that Apple has so far rejected it from the App Store. Apple’s stated reason for rejecting the application is that it provides “limited utility to the broad iPhone and iPod touch user community.” In reality, it seems likely that it was rejected over security concerns.

但问题是,只有下载用户下载的软件,“第五大”才对开发人员有效。 而在用户iPhone上获得该产品的最大障碍是,苹果公司迄今拒绝了它在App Store中的销售。 苹果表示拒绝该应用程序的原因是,它“为广大iPhone和iPod touch用户社区提供了有限的实用程序”。 实际上,它似乎很可能出于安全考虑而被拒绝。

PhoneGap“ AIR”方法 (The PhoneGap “AIR” Approach)

PhoneGap is a container for web applications running on the iPhone that allows them to access the accelerometer, GPS, sqLite, and soon camera and vibration controls. Basically, PhoneGap creates a location bar free web browser that points to a specific web application URL, and provides a JavaScript API for accessing native iPhone features.

PhoneGap是运行在iPhone上的Web应用程序的容器,它使它们可以访问加速度计,GPS,sqLite,以及摄像头和振动控件。 基本上,PhoneGap创建一个无位置栏的Web浏览器,该浏览器指向特定的Web应用程序URL,并提供JavaScript API来访问本机iPhone功能。

As I understand it, developers can then package everything up using the PhoneGap SDK into a specialized iPhone application version of their web app. PhoneGap even has a web application of their own that allows developers to “to quickly package their web app into a native iPhone app by providing a URL, a name and icon graphic [which then] automagically create[s] a native iPhone application.” The native iPhone app could then be submitted for App Store inclusion.

据我了解,开发人员可以使用PhoneGap SDK将所有内容打包到其Web应用程序的专用iPhone应用程序版本中。 PhoneGap甚至拥有自己的Web应用程序,允许开发人员“通过提供URL,名称和图标图形,然后自动创建本机iPhone应用程序,将其Web应用程序快速打包到本机iPhone应用程序中。” 然后可以将本机iPhone应用程序提交以包含在App Store中。

AJAX developer Dave Johnson compares PhoneGap to Adobe AIR, though there’s still a lot of work to be done to package it all up. The comparison is sound, however. “The aim of PhoneGap is to bring mobile phone development to web developers just as AIR has brought desktop application development to the web community,” he writes.

AJAX开发人员Dave Johnson 将PhoneGap与Adobe AIR进行了比较 ,尽管要完成全部打包工作仍有很多工作要做。 但是,比较是合理的。 他写道:“ PhoneGap的目标是将手机开发带给Web开发人员,就像AIR将桌面应用程序开发带给Web社区一样。”

结论 (Conclusion)

The benefits of Big Five and Phone Gap are clear. They allow developers to deploy applications on the iPhone (and theoretically their methods could be replicated on other mobile phone platforms) without having to learn a new programming language. iPhone native applications that can take advantage of iPhone APIs but be written in HTML, CSS, and JavaScript make a lot sense for developers and there is understandably a lot of buzz for these applications in the mobile developer community.

大五和电话差距的好处是显而易见的。 它们使开发人员可以在iPhone上部署应用程序(理论上他们的方法可以在其他手机平台上复制),而无需学习新的编程语言。 可以利用iPhone API但可以用HTML,CSS和JavaScript编写的iPhone本机应用程序对开发人员来说很有意义,可以理解的是,在移动开发人员社区中,这些应用程序引起了很多关注。

The next step will be to get Apple on board.

下一步将是使苹果公司加入。

翻译自: https://www.sitepoint.com/two-apps-that-lower-the-iphone-development-barrier/

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)