iOS 9的新的改變 iOS SDK Release Notes for iOS 9 說了些改變

大學霸發表於2015-09-22
iOS 9的新的改變 iOS SDK Release Notes for iOS 9 說了些改變

看了下還算能理解!!!有興趣可以看看哈!!!不喜勿噴!!後面的對於廢除的方法什麼有用感覺!!!

ios9 iOS SDK更新內容介紹

重點介紹:

這是一個初步的文件的API或技術發展。蘋果是提供這一資訊來幫助你計劃的採用所述技術和程式設計介面使用品牌產品。此資訊可能發生變化,根據這個文件和軟體實現應與最後的作業系統軟體測試和最終的文件。新版本的文件可以提供未來貝塔的API或技術。

內容:
介紹

iOS SDK 9.0提供了支援開發iOS應用程式。是一套完整的Xcode打包工具,編譯器為iOS和OS x和框架來建立應用這些工具包括Xcode IDE和儀器分析工具,在許多其他人。

使用這個軟體可以為iPhone開發應用程式,iPad,或iPod touch執行iOS 9。您還可以使用包括模擬器測試您的應用程式,它支援iOS 9。iOS SDK 9.0需要Mac電腦執行OS X v10.10.3(約塞米蒂)或更高版本。

這個版本的iOS只適用於安裝在裝置註冊蘋果開發者計劃。嘗試安裝這個版本的iOS以未經授權的方式可以把你的裝置處於不可用狀態。

額外的支援資源的更多資訊,請訪問http://developer.apple.com/programs/ios/。

Bug報告

問題不是筆記和已知問題中提到的部分,請檔案錯誤透過蘋果開發者網站(https://developer.apple.com/bug-reporting/ios/)。此外,你可以討論這些問題和蘋果的iOS SDK 9.0開發者論壇。獲得更多的資訊關於iCloud對於開發人員來說,訪問http://developer.apple.com/icloud。

筆記和已知問題
以下問題涉及到使用iOS SDK 9.0開發程式碼。

應用程式商店
請注意

iOS 9執行UILaunchImages要求;應用程式不能再申報方向相同的啟動影像支援不同的介面。


已知問題
使用者可能被提示兩次憑證第一內購。


蘋果ID

一些使用者將開啟兩因素身份驗證的蘋果ID。關於雙重認證的更多資訊見developer.apple.com/support/two-factor-authentication。

如果你開啟兩因素身份驗證您的蘋果ID,iTunes購買在Mac和Windows和商店購買蘋果電視將需要附加一個6位數字作為驗證碼到你的密碼你第一次使用該裝置。6位程式碼將自動顯示在你的iOS 9或OS X埃爾卡皮坦裝置,或者可以傳送給你信任的電話號碼透過簡訊或電話。

蘋果支付
請注意

郵政編碼的格式返回之前充分授權已經從iOS 8。在某些情況下,它可能是截斷之前返回。


AVFoundation
筆記

AVPlayerItem canUseNetworkResourcesForLiveStreamingWhilePaused財產已被新增。預設值是沒有有關的應用程式或之後的iOS 9.0或OS X 10.11,但對應用程式有關。

儘量減少用電,設定這個屬性沒有如果你不需要播放暫停時保持最新狀態。

AVQueuePlayer現在支援的基於檔案的媒體和HTTP流媒體生活在佇列中。在這之前,你必須確保所有專案相同型別的佇列中。

針對iOS應用程式與9或更高,媒體中斷行為AV(佇列)球員已經改變了。

在iOS 9之前,應用程式可以透過關聯或中斷其他媒體播放客戶新增AVPlayerItem AVPlayer,或者修改當前的時間和日期AVPlayerItem(使用seekToTime:或seekToDate:方法)。在iOS 9中,這些操作中斷只有當AVPlayer物件的回放速度是透過速度改為非零值的屬性或方法。

畫中畫播放可能停止和畫中畫按鈕可能消失在使用AVPlayerViewController影片回放和更換底層AVPlayer物件的當前專案使用replaceCurrentItemWithPlayerItem:。

cancelPictureInPicture方法棄用。

藍芽
已知問題

配對的三浦MFI配件iOS 9裝置無法工作。

解決方法:不要刪除配對iOS更新後9。

CBCentralManager
請注意

retrievePeripherals:和retrieveConnectedPeripherals方法被棄用iOS 7.0和iOS 9.0中移除。應用程式使用這些方法會崩潰在啟動或配對一個附件。


基金會

有新的基礎API可以用來檢測如果裝置處於低功耗模式。看到更新的能效指南iOS應用程式的細節。

水平位置約束應該始終參考左/右或領先/落後於屬性。對iOS應用程式與9 SDK,NSLayoutConstraint將丟擲一個異常,如果你試圖建立一個約束之間的領先/落後於屬性和左/右屬性。

iCloud開車
請注意

CKFetchRecordChangesOperation fetchAllChanges屬性已經被棄用,iOS 9將被刪除。


鍵盤
請注意

設定為使用第三方鍵盤作為預設鍵盤文字輸入並不總是受人尊敬的。


鑰匙鏈
請注意

iCloud金鑰鏈不會同步密碼和信用卡的貝塔iOS 9和OS X埃爾卡皮坦。


音樂
請注意

當使用者插入耳機或藍芽連線或CarPlay在他們的車,他們最喜歡的音樂應用程式出現在鎖定螢幕或汽車展示。
有資格對你的應用程式,它必須釋出到現在玩在發射和始終保持播放狀態。常見的做法在發射是繼續玩跟蹤從去年退出應用程式時。

已知問題

一些追蹤你以前購買的不會玩。
處理:標誌的商店然後籤回。


網路
筆記

當談判一個TLS / SSL連線diffie - hellman金鑰交換,iOS 9需要1024位組或更大。這些連線包括:

安全Web(HTTPS)

企業wi - fi(802.1倍)

安全電子郵件(IMAP、流行、SMTP)

列印伺服器(綠皮書)

DHE_RSA密碼套件現在殘疾為TLS客戶違約的安全傳輸。這可能導致連線故障TLS伺服器只支援DHE_RSA密碼套件。應用程式顯式地啟用密碼套件使用SSLSetEnabledCiphers不受影響,仍將使用DHE_RSA如果顯式地啟用密碼套件。
旅行可以看到一個“Safari不能建立一個安全的連線到伺服器”錯誤頁面。Safari和CFNetwork API的其他客戶(NSURLSession NSURLConnection,CFHTTPStream,CFSocketStream和可可當量)將顯示“CFNetwork SSLHandshake失敗”錯誤控制檯。

隨需應變的資源
已知問題

新的或變更的隨需應變的資源資產包新增或更改作為應用程式的一部分更新可能無法訪問該應用程式。
解決方案:包括新的或更新的資產包直接在應用程式包。

ReplayKit

已知問題
播放影片雖然ReplayKit錄音停止正在進行的錄音和影片無法播放。

恢復

已知問題
如果你設定一個區域不匹配你的語言,從iCloud備份恢復不可能進步。

解決方法:在恢復期間,改變你的地區來匹配你的語言。你可以改變它恢復後就結束了。

Safari
筆記

SFSafariViewController當完成了,它是自動解散。你不再需要關閉它的委託方法safariViewControllerDidFinish:。

“找到頁”現在可以從共享表以及在完成列表中。

請求桌面網站了,現在在分享表而不是最愛。

Web Browser-to-Native應用切換不使用你的應用如果apple-app-site-association檔案不是正確格式化並簽署。有關更多資訊,請參見切換程式設計指南和參考共享網路憑據。

安全傳輸
請注意

DHE_RSA密碼套件現在在安全傳輸,在預設情況下禁用TLS的客戶。這可能導致連線故障TLS伺服器只支援DHE_RSA密碼套件。應用程式顯式地啟用密碼套件使用SSLSetEnabledCiphers不受影響,仍將使用DHE_RSA如果顯式地啟用密碼套件。


UIKit
筆記

如果初始化零nibName價值,ui。nibName一直尋找的nib類似名稱的檢視控制器類,,如果不是未經覆蓋預設值。
iOS 9之前,子類的ui斯威夫特寫的要求相應的nib檔名稱包括模組字首。

提高靈活性的重構,可以省略的nib檔案的模組名稱程式碼執行在iOS 9。ui。nibName仍然喜歡包含模組名稱字首,但回落到一個不合格的名字如果沒有找到nib的完全限定名稱。

在iOS 9中,當layoutIfNeeded傳送到一個檢視和滿足以下所有條件(不常見),我們應用fitting-size約束在UILayoutPriorityFittingSizeLevel(寬/高= 0),而不是所需的尺寸約束(寬/高要求匹配當前大小):
接收方還沒有在一個檢視的子樹,主持一個佈局引擎,如視窗中,檢視控制器的檢視(除非你沒有設定translatesAutoresizingMaskIntoConstraints檢視或建立約束在子樹和一項一項外),表檢視單元格內容檢視,等等。

最後的祖先(即頂層檢視)的接收機translatesAutoresizingMaskIntoConstraints設定為無。
頂層檢視的子檢視不是UIViewController-owned佈局指導,也有translatesAutoresizingMaskIntoConstraints設定為無。

條件下,我們建立一個臨時的佈局引擎從頂層檢視和新增的子樹的所有約束。問題是我們需要新增一些約束,使頂層檢視的大小明確的佈局引擎。iOS之前舊的行為(9),我們將新增約束限制頂層檢視的大小為任何情況下當前的邊界條件下1。這真的沒有意義,當你新增條件2和3,可能導致unsatisfiable-constraints日誌和破碎的佈局。
所以在iOS 9中,對於這個特殊的情況,我們使用fitting-size約束。

這意味著,如果你傳送layoutIfNeeded檢視在這些條件下在iOS 9中,你必須確保你有足夠的約束建立頂層檢視的大小(通常,但並非總是,是接收機)或您必須新增臨時尺寸約束的頂層檢視佈局尺寸你想要傳送layoutIfNeeded之前,和之後刪除它們。
對iOS應用程式與9或更高,UITextView現在將總是正確地收縮其NSTextContainer檢視內的適合當滾動是禁用的。NSTextContainer滿溢的線之外,甚至部分,不呈現。

iOS在以前的版本中,NSTextContainer有時沒有大小限制。這意味著邏輯上的線被錯誤地呈現。如果你看到之前呈現的行結束時你的文字檢視不再呈現連結對iOS應用程式9之後,這種行為改變是可能的原因。你可以補救這個透過UITextView較大,或者透過調整值的文字檢視的底部textContainerInset財產。

有一個重新設計的UI印刷,包括列印預覽(從UIPrintInteractionController或UIActivityViewController)。為應用程式提供印刷物品或只使用內建UIPrintFormatter物件(如UISimpleTextPrintFormatter UIMarkupTextPrintFormatter、UIWebViewPrintFormatter或任何系統提供的UIViewPrintFormatter檢視),沒有額外的需要列印預覽顯示。

應用子類UIPrintPageRenderer或UIPrintFormatter畫內容列印必須建立與iOS 9 SDK預覽顯示。UIPrintPageRenderer已經更新的行為叫drawPageAtIndex:inRect:多次與潛在的不同的頁面大小和利潤率。各種方法在UIPrintPageRenderer可能從一個非主要的執行緒呼叫,但從未同時從多個執行緒。

UIPickerView UIDatePicker現在可調整大小的adaptive-previously,這些觀點將執行預設大小即使你試圖調整它們。這些觀點現在也預設的寬度320點在所有裝置上,而不是在iPhone裝置寬度。

介面依賴舊的預設大小可能會執行編譯時錯誤尋找iOS 9。遇到任何問題可以被完全約束或解決大小選擇檢視所需的大小,而不是依靠隱式的行為。

Webkit
請注意

如域名和unless-domain值字串只匹配的域。匹配的域和子域,開始字串用星號(*)。
本文由大學霸整理,轉載請註明出處,尊重IT人!

原文:iOS SDK Release Notes for iOS 9

Important:
This is a preliminary document for an API or technology in development. Apple is supplying this information to help you plan for the adoption of the technologies and programming interfaces described herein for use on Apple-branded products. This information is subject to change, and software implemented according to this document should be tested with final operating system software and final documentation. Newer versions of this document may be provided with future betas of the API or technology.
Contents:

Introduction
Bug Reporting
Notes and Known Issues
Introduction
iOS SDK 9.0 provides support for developing iOS apps. It is packaged with a complete set of Xcode tools, compilers, and frameworks for creating apps for iOS and OS X. These tools include the Xcode IDE and the Instruments analysis tool, among many others.

With this software you can develop apps for iPhone, iPad, or iPod touch running iOS 9. You can also test your apps using the included Simulator, which supports iOS 9. iOS SDK 9.0 requires a Mac computer running OS X v10.10.3 (Yosemite) or later.

This version of iOS is intended for installation only on devices registered with the Apple Developer Program. Attempting to install this version of iOS in an unauthorized manner could put your device in an unusable state.

For more information and additional support resources, visit http://developer.apple.com/programs/ios/.

Bug Reporting
For issues not mentioned in the Notes and Known Issues section, please file bugs through the Apple Developer website (https://developer.apple.com/bug-reporting/ios/). Additionally, you may discuss these issues and iOS SDK 9.0 in the Apple Developer Forums. To get more information about iCloud for Developers, go to http://developer.apple.com/icloud.

Notes and Known Issues
The following issues relate to using iOS SDK 9.0 to develop code.

App Store
Note
iOS 9 enforces the UILaunchImages requirement; apps can no longer declare the same launch image to support different interface orientations.

Known Issue
Users might be prompted twice for credentials on the first In-App Purchase.

Apple ID
Notes
Some users will be offered to turn on two-factor authentication on their Apple ID. For more information about two-factor authentication see developer.apple.com/support/two-factor-authentication.
If you turn on two-factor authentication on your Apple ID, iTunes purchases on Mac and Windows and store purchases on Apple TV will require you to append a six-digit verification code to the end of your password the first time you use that device. The six-digit code will display automatically on your iOS 9 or OS X El Capitan devices, or can be sent to your trusted phone number via a text message or phone call.
Apple Pay
Note
The format of the postal code that is returned prior to full authorization has changed from iOS 8. In some cases, it may be truncated from what was previously being returned.

AVFoundation
Notes
The canUseNetworkResourcesForLiveStreamingWhilePaused property has been added to AVPlayerItem. The default value is NO for apps linked on or after iOS 9.0 or OS X 10.11, but YES for apps that were linked earlier.
To minimize power usage, set this property to NO if you do not need playback state to stay up to date while paused.

AVQueuePlayer now supports a mixture of file-based media and HTTP Live Streaming media in its queue. Prior to this, you had to ensure that all items in the queue were of the same type.
For apps linked against iOS 9 or later, the media interruption behavior for AV(Queue)Player has changed.
Before iOS 9, apps could interrupt other media-playing clients by associating or adding AVPlayerItem to AVPlayer or by modifying the time or date of the current AVPlayerItem (using the seekToTime: or seekToDate: methods). In iOS 9, these operations interrupt only when AVPlayer object’s playback rate is changed to a non-zero value through the rate property or play method.

Picture in Picture playback might stop and the Picture in Picture button might disappear when using AVPlayerViewController for video playback and replacing the underlying AVPlayer object’s current item using replaceCurrentItemWithPlayerItem:.
The cancelPictureInPicture method is deprecated.
Bluetooth
Known Issue
Pairing a Miura MFI accessory to an iOS 9 device will not work.

Workaround: Do not remove pairing after updating to iOS 9.

CBCentralManager
Note
The retrievePeripherals: and retrieveConnectedPeripherals methods were deprecated in iOS 7.0 and removed in iOS 9.0. Apps that use these methods will crash on launch or upon pairing an accessory.

Foundation
Notes
There is new Foundation API that can be used to detect if the device is in Low Power Mode. See the updated Energy Efficiency Guide for iOS Apps for details.
Horizontal location constraints should consistently reference either left/right or leading/trailing attributes. For apps linked against the iOS 9 SDK, NSLayoutConstraint will throw an exception if you attempt to create a constraint between a leading/trailing attribute and a left/right attribute.
iCloud Drive
Note
The fetchAllChanges property on CKFetchRecordChangesOperation has been deprecated, and will be removed in iOS 9.

Keyboards
Note
The setting to use a third-party keyboard as the default keyboard for text input is not always respected.

Keychain
Note
iCloud Keychain will not sync passwords and credit cards with betas of iOS 9 and OS X El Capitan.

Music
Note
When users plug in headphones or connect to Bluetooth or CarPlay in their car, their favorite music app appears on the lock screen or the car display.

For your app to be eligible for this, it must publish to Now Playing upon launch and consistently maintain a Now Playing state. A common practice upon launch is to continue playing the track from when the app was last exited.

Known Issue
Some tracks you have previously purchased won’t play.

Workaround: Sign out of the Store and then sign back in.

Networking
Notes
When negotiating a TLS/SSL connection with Diffie-Hellman key exchange, iOS 9 requires a 1024-bit group or larger. These connections include:
Secure Web (HTTPS)
Enterprise Wi-Fi (802.1X)
Secure e-mail (IMAP, POP, SMTP)
Printing servers (IPPS)
DHE_RSA cipher suites are now disabled by defaults in Secure Transport for TLS clients. This may cause failure to connect to TLS servers that only support DHE_RSA cipher suites. Applications that explicitly enable cipher suites using SSLSetEnabledCiphers are not affected and will still use DHE_RSA cipher suites if explicitly enabled.
Safari may see a “Safari can’t establish a secure connection to the server” error page. Safari and other clients of CFNetwork API (NSURLSession, NSURLConnection, CFHTTPStream, CFSocketStream and Cocoa equivalent) will show “CFNetwork SSLHandshake failed” error in Console.

On-Demand Resources
Known Issue
New or changed on-demand resource assets packs that are added or changed as part of an app update may be inaccessible to the application.

Workaround: Include the new or updated asset packs directly in the application bundle.

ReplayKit
Known Issue
Playing a video while ReplayKit recording is ON stops the ongoing recording session and the video fails to play.

Restore
Known Issue
If you’ve set a region that doesn’t match your language, restores from iCloud Backup might not progress.

Workaround: During restore, change your region to match your language. You can change it back after the restore is over.

Safari
Notes
When Done is tapped in a SFSafariViewController, it is automatically dismissed. You no longer need to dismiss it in the delegate method safariViewControllerDidFinish:.
“Find on Page” is now available both from the Share sheet as well as in the Completions List.
Request Desktop Site has moved; it’s now in the Share sheet instead of Favorites.
Web Browser–to–Native App Handoff does not work with your app if the apple-app-site-association file isn’t correctly formatted and signed. For more information, see Handoff Programming Guide and Shared Web Credentials Reference.
Secure Transport
Note
DHE_RSA cipher suites are now disabled by default in Secure Transport for TLS clients. This may cause failure to connect to TLS servers that only support DHE_RSA cipher suites. Applications that explicitly enable cipher suites using SSLSetEnabledCiphers are not affected and will still use DHE_RSA cipher suites if explicitly enabled.

UIKit
Notes
If initialized with a nil nibName value, UIViewController.nibName has always looked for a nib with a similar name as the view controller’s class, and defaulted to that value if loadView is not overridden.
Prior to iOS 9, subclasses of UIViewController that were written in Swift would require that their corresponding nib file name include the module prefix.

To improve flexibility in the event of refactoring, you can omit the module name from the nib filename in code that runs in iOS 9. UIViewController.nibName still prefers a name that contains the module prefix, but falls back to an unqualified name if a nib with the fully-qualified name is not found.

In iOS 9, when layoutIfNeeded is sent to a view and all of the following conditions are satisfied (which is not common), we apply fitting-size constraints (width/height = 0 at UILayoutPriorityFittingSizeLevel) instead of required size constraints (width/height required to match current size):
The receiver is not yet in the subtree of a view that hosts a layout engine, such as window, view controller view (unless you have set translatesAutoresizingMaskIntoConstraints to NO on that view—or created constraints that have one item in its subtree and one item outside it), table view cell content view, and so on.
The final ancestor (that is, top-level view) of the receiver has translatesAutoresizingMaskIntoConstraints set to NO.
The top-level view has a subview that is not a UIViewController-owned layout guide that also has translatesAutoresizingMaskIntoConstraints set to NO.
Under condition 1, we create a temporary layout engine from the top-level view and add all the constraints from the subtree to it. The problem is that we need to add some constraints that make the size of the top-level view unambiguous in the layout engine. The old behavior (prior to iOS 9) was that we would add constraints to restrict the size of the top-level view to its current bounds for any situation under condition 1. This really doesn’t make sense when you add conditions 2 and 3 and can result in unsatisfiable-constraints logging and broken layout.
So in iOS 9, for this special case only, we use fitting-size constraints instead.

This means that if you are sending layoutIfNeeded to a view under these conditions in iOS 9, you must be sure that either you have sufficient constraints to establish a size for the top-level view (which usually, though not always, is the receiver) or you must add temporary size constraints to the top-level view of layout size you desire before sending layoutIfNeeded, and remove them afterward.

For apps linked on iOS 9 or later, UITextView will now always correctly constrict its NSTextContainer to the fit inside the view when scrolling is disabled. Overflowing lines that lie outside of an NSTextContainer, even partially, are not rendered.
In previous iOS releases, the NSTextContainer sometimes was not constricted in size. This meant that logically overflowing lines were erroneously rendered. If you are seeing previously rendered lines at the end of your text view no longer rendered after linking your app against iOS 9, this behavior change is the likely cause. You can remedy this by making your UITextView larger, or perhaps by adjusting the bottom value of the text view's textContainerInset property.

There is a redesigned UI for printing that includes a print preview (presented from UIPrintInteractionController or UIActivityViewController). For apps that provide printing items or use only built-in UIPrintFormatter objects (such as UISimpleTextPrintFormatter, UIMarkupTextPrintFormatter, UIWebViewPrintFormatter, or the UIViewPrintFormatter of any system-provided view), nothing additional is needed for the print preview to display.
Apps that subclass UIPrintPageRenderer or UIPrintFormatter to draw content for printing must be built with the iOS 9 SDK for the preview to display. The behavior of UIPrintPageRenderer has been updated to call drawPageAtIndex:inRect: multiple times with potentially different page sizes and margins. Various methods on UIPrintPageRenderer may be called from a non-main thread, but never from multiple threads concurrently.

UIPickerView and UIDatePicker are now resizable and adaptive—previously, these views would enforce a default size even if you attempted to resize them. These views also now default to a width of 320 points on all devices, instead of to the device width on iPhone.
Interfaces that rely on the old enforcement of the default size will likely look wrong when compiled for iOS 9. Any problems encountered can be resolved by fully constraining or sizing picker views to the desired size instead of relying on implicit behavior.

Webkit
Note
The if-domain and unless-domain value strings only match the exact domain. To match the domain and any subdomains, begin the string with the asterisk character (*).

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29597077/viewspace-1805882/,如需轉載,請註明出處,否則將追究法律責任。

相關文章