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 (*).