Titanium SDK 2.0 除了新功能以外 這版修復了 700 多支 bug 所以這個版本比以往的更穩定 品質更好 重點不是前幾個版本 bug 很多 重點是它現在品質更好!!! Titanium Mobile SDK 2.0.1 builds on the strengths of Release 1.8, adding numerous new features, improving parity across different platforms and addressing over 700 issues. This release takes the Titanium platform to the next level Builds on the the strengths of Release 1.8 New Features Improve parity across different platforms Over 700 issues fixed
Titanium 原本就是個很好的跨平台 APP 開發架構,可以用一種程式語言就 能做出 Android 和 iOS 的 App 。 2.0 後, Titanium Mobile 的架構新增了很多元件 , 變成你在 同一個開發平台 就可以製作出不同類型的 App ( 不管是原生的 Android , iOS 程式 ,混合式,或是純 Mobile Web 網頁 一次可以達成 介接了 ACS 雲端服務和 Mobile Web 的支援 及 Market place 模組和 使它的變成更完成的解決方案。。
這次的主角就是 Cloud Services 的部份 A CS 提供了 15 以上的模組可以使用, 能夠輕鬆把後端較複雜的程式加入你的架構,你們只要把腦人的後端程式交給 ACS ,把重點放在前端 App 的設計上就好了。 這些功能包含聊天、打卡、相片集、推播功能、等等 Chat, Checkins, Clients, Emails, PhotoCollections, Photos, Places, Posts, PushNotifications, Reviews, SocialIntegrations, Statuses, Users . 到 6/1 前 全面是免費的 ( ACS is a freemium model, and we are offering unlimited free ACS usage until June 1, 2011. )
Ti 2.0 另一個重要功能就是支援 mobile web ( HTML5 ) 網頁的部份 也就是說透過一種語言除了能夠產生 iOS / Android 原生 App 的 Titanium ,現在可以支援 Mobile Web 一部份的 Titanium Mobile API 跟他是共有的,除了平台專用的 API 或是瀏覧器本身不支援的 Mobile Web implements a cross-platform subset of the Titanium Mobile APIs, excluding any platform-specific APIs and any APIs that require features not available to applications running in a browser.
這個是 iOS / Android App 和 Mobile Web 的一個範例 Not yet implemented Titanium.Database Titanium.Media.AudioPlayer Titanium.Media.Sound Titanium.Network.Socket Titanium.Network.Socket.TCP Titanium.Stream Titanium.UI.SearchBar Titanium.Locale Platform-specific UI Titanium.UI.ButtonBar Titanium.UI.MaskedImage Titanium.UI.3DMatrix Not supported by Browser Titanium.Contacts Layout Ti.UI.SIZE = same layout in Android / iOS / Mobile Web Geolocation Simple mode: for applications with basic location requirements, with two settings, ACCURACY_HIGH and ACCURACY_LOW
以往設計 layout 時遇到的困難就是要考慮不同平台的行為,例如加入一個 label 用 auto 指定寛度後,在 iOS 和 Android 上看起來可能差很多。 從 2.0 之後,所有平台實作同一組 定義好的行為 ,行為統一能夠 確保一致性… . 對於版面 layout 更容易控制 Release 2.0 includes a set of changes to the layout system designed to provide more control over layout and improve the parity between platforms by having all platforms implement a single, well-defined set of behaviors. Views that should fill the parent view by default Views that should size themselves to their content by default Views that should fill in the horizontal direction only (for example, toolbars) Auto Size Views – ‘auto’ = Titanium.UI.FILL Auto Fill Views – ‘auto’ = Titanium.UI.SIZE Auto Fill Width Views – fills available width by default, scales vertically to fit contents ‘ auto’ specifies FILL behavior when it is used as a width value, and SIZE behavior when it is used as a height value views fill the available width by default, and scale vertically to fit their contents
2.0 版後,你可以在所有的平台依你喜歡的單位去夠指定元件的大小和位置 (All platforms now support specifying units for size and position values ) Android: a DIP corresponds to 1 pixel on a 160 DPI display iOS: a DIP corresponds to one pixel on a non-Retina display, which is 163 DPI for iPhone/iPod touch and 132 DPI for the iPad. A DIP corresponds to 2 pixels of width or height on a Retina display.
以往更新 layout 版面的每一個屬性時,都會 trigger 一個 layout cycle 現在只要使用 updateLayout 或是 startLayout 的 method 可以一口氣完成所有的 layout 變化 使效能提升 In previous releases, each update to a layout parameter could trigger a layout cycle startLayout() and finishLayout() place view into deferred layout mode updateLayout() method allows you to update a set of layout parameters in a single operation
Simple Mode: for applications with basic location requirements Manual Mode: : for fine-grained control of location updates More flexible geolocation functionality his release includes several improvements for geolocation on Android, and a new "simple mode" for geolocation that is supported on Android, iOS, and Mobile Web. Simple mode has two accuracy settings, ACCURACY_HIGH and ACCURACY_LOW. This provides a simple, cross-platform mode for configuring location updates. This is the only mode supported on Mobile Web. On iOS and Android, this mode should only be used for applications with basic location requirements. For applications that have more demanding location requirements on Android, there is a new manual mode for fine-grained control of location updates. On iOS, applications can continue to use the existing geolocation capabilities. NOTE: Applications using the existing geolocation capabilities in Android should either switch to simple mode or to manual mode. This release includes several improvements for geolocation on Android, and a new "simple mode" for geolocation that is supported on Android, iOS, and Mobile Web. Simple mode has two accuracy settings, ACCURACY_HIGH and ACCURACY_LOW. This provides a simple, cross-platform mode for configuring location updates. This is the only mode supported on Mobile Web. On iOS and Android, this mode should only be used for applications with basic location requirements. For applications that have more demanding location requirements on Android, there is a new manual mode for fine-grained control of location updates. On iOS, applications can continue to use the existing geolocation capabilities. NOTE: Applications using the existing geolocation capabilities in Android should either switch to simple mode or to manual mode.
Titanium Studio 接把 ACS 整合進來 可以在建立專案時直接啟動 ACS 服務,或者手動加到現有的專案中 (Add cloud services either from the new project wizard or to an existing project)
從 tiapp.xml 編輯器裡直接增加想用的模組… . (Manage directly from within the Titanium Studio GUI via the tiapp.xml editor)
2.0 有個很重要的功能就是 可以直接從 Titanium Studio 將你的 App 上架到 Apple Store 和 Android Marketplace 或打包成 Mobile Web (3 rd party providers can now hook into our publishing workflow. App Stores can register within the interface and allow simplified deployment from inside Titanium Studio to an online location)
未存檔的檔案,也可以有 Content Assist 所謂 Content Assist 就是一個小幫手 告訴你某個 function 怎麼使用, 現在是連你自已定義的相關 function 都可以有這個輔助功能 2.0 後 相關的指示更完整,跟以往不一樣是 會顯示這個 function 支援的平台,例如 iOS/ Android 或以 mobile web 來說 會 show 出不同 browser (Content assist for user-defined functions in unsaved files No need to save files in order to get content assist for your user-defined functions. Added content assist to both hover and Dynamic help for Ti API)
Snippet View 傳承了 Xcode 的功能, 直接可以把想要的 API 拉進 code 來, 不用寫進來。 Server View 用來啟動或關才外部的相關 server A Snippets view that provides easy access to the complete list of snippets shipped with Studio, as well as simple ways to filter, preview and edit the list A Servers view for stopping, starting and restarting external servers used for preview
Jump from a function to its definition via the F3 key Improved help content for Titanium APIs Whole-project error validation Type /** before a JavaScript function to automatically add a documentation header Right-click on a project to open the analytics for that application Scroll away from the bottom of the console to auto-lock
Titanium 2.0 的文件相關 wiki 網站完全升級 (New documentation site) : 更詳細、更多範例 ( Better examples) ,更容易找到你想要的內容 (Easier to find what you need) 另外, Titanium Mobile 開發的書籍也出爐了 連結是藏在官網裡,大家可以到 TTUG 粉絲頁 找到 LINK
對於有在開發延申模組的開發者有福了, 以後模組開發的相關文件只有兩個 pdf 檔, 寫的不夠完整。 2.0 後有相關的原生 API 文件可以參考,不再需要再去另外查詢。 ( T he native APIs that can be used by native Android and iOS modules have been documented ) Android Module API http://builds.appcelerator.com.s3.amazonaws.com/module-apidoc/2.0.0/android/index.html iOS Module API http://builds.appcelerator.com.s3.amazonaws.com/module-apidoc/2.0.0/ios/index.html
designed to provide more control over layout and improve the parity between platforms by having all platforms implement a single, well-defined set of behaviors. Unifying and normalizing the behavior of UI controls across platforms. This effort has resulted in much more consistent behavior between platforms overall, and will give developers more control over the behavior of UI components. However, as we made changes to unify these APIs and achieve cross-platform parity, some behaviors have changed. Particularly around the previously ambiguous “auto” settings, and default behavior for UI components (filling the parent versus sizing to content). Composite layouts to address UI parity issues across different platforms. A migration guide is available to help you migrate your applications The composite layout specification involves several changes to the way the UI system lays out controls, so that all platforms can follow a common layout model. The major changes to the layout system involve: Improved handling for automatic sizing of views Batch layout updates for improved performance Post-layout event generated when layout is complete New precedence order for layout parameters
在所有的平台都能夠指定大小和位置的單位 All platforms now support specifying units for size and position values. The following table lists the supported units: Android: a DIP corresponds to 1 pixel on a 160 DPI display iOS: a DIP corresponds to one pixel on a non-Retina display, which is 163 DPI for iPhone/iPod touch and 132 DPI for the iPad. A DIP corresponds to 2 pixels of width or height on a Retina display.
Titanium Mobile SDK 2.0.1 builds on the strengths of Release 1.8, adding numerous new features, improving parity across different platforms and addressing over 700 issues. This release takes the Titanium platform to the next level Builds on the the strengths of Release 1.8 New Features Improve parity across different platforms Over 700 issues fixed