ios 10 新特性


ios 新特性


中文版?

開發(fā)者


ios? 10 主要做了最app的擴展基于iMessage 和 mapapp 的慷吊,sirikit開放了很多娇斑,最主要的通知被統(tǒng)一了起來。

一:


If your app plays media and you use the MPPlayableContentManager APIs, iOS 10 helps you let users view album art and play media through your app on the lock screen.

If your ride-sharing app uses the MKDirectionsRequest API, iOS 10 can display it in the app switcher when the user is likely to want a ride. To register as a ride-share provider, specify the MKDirectionsModeRideShare value for the MKDirectionsApplicationSupportedModes key in your Info.plist file.

You can create a Sticker pack without writing any code: Simply drag images into the Sticker Pack folder inside the Stickers asset catalog in Xcode.

二:

To develop an iMessage app, you use the APIs in the Messages framework (Messages.framework). To learn about the Messages framework, see Messages Framework Reference. For general information about creating app extensions, see App Extension Programming Guide.

Implement an iMessage app.

Add the com.apple.developer.associated-domains key to your app’s entitlements.

三:User Notifications? 整合了通知白修,在UserNotifications
框架

iOS 10 introduces the User Notifications framework (UserNotifications.framework), which supports the delivery and handling of local and remote notifications. You use the classes of this framework to schedule the delivery of local notifications based on specific conditions, such as time or location. Apps and app extensions can use this framework to receive and potentially modify local and remote notifications when they are delivered to the user’s device.

lso introduced in iOS 10, the User Notifications UI framework (UserNotificationsUI.framework) lets you customize the appearance of local and remote notifications when they appear on the user’s device

這個框架允許開發(fā)者自定義遠程和本地通知的界面。

四:新增API可以將語音識別轉(zhuǎn)換為文本

iOS 10 introduces a new API that supports continuous speech recognition and helps you build apps that can recognize speech and transcribe it into text

Using the APIs in the Speech framework (Speech.framework), you can perform speech transcription of both real-time and recorded audio


五: 新增權(quán)限重斑,日歷兵睛,相冊,語音識別 更多權(quán)限窥浪,訪問 Security and Privacy Enhancements

As with accessing other types of protected data, such as Calendar and Photos data, performing speech recognition requires the user’s permission (for more information about accessing protected data classes, see Security and Privacy Enhancements). In the case of speech recognition, permission is required because data is transmitted and temporarily stored on Apple’s servers to increase the accuracy of recognition. To request the user’s permission, you must add the?

語音識別必須添加的鍵值

NSSpeechRecognitionUsageDescription key to your app’s Info.plist file and provide content that describes your app’s usage.

六:擴展了顏色祖很,整合了顏色,

Wide Color

UIKit standardizes on working in a new extended sRGB color space, making it easy to mix sRGB colors with colors in other, wider color gamuts without a significant performance penalty.

七:環(huán)境敏感漾脂,加一對鍵值

Adapting to the True Tone Display

The True Tone display uses ambient light sensors to automatically adjust the color and intensity of the display to match the lighting conditions of the current environment. To ensure that your app works well with the standard color shift provided by True Tone, add the new UIWhitePointAdaptivityStyle key to your Info.plist file to describe your app’s primary visual content. For example

If your app is a photo editing app, color fidelity is more important than automatic adjustment to the environmental white point. In this case, you can use the UIWhitePointAdaptivityStylePhoto style to reduce the strength of True Tone shift applied by the system.

If your app is a reading app, conformance with the environmental white point is helpful to users. In this case, you can use the UIWhitePointAdaptivityStyleReading style to increase the strength of True Tone shift applied by the system.

八:應用搜索功能

iOS 10 and the Core Spotlight framework introduce several enhancements to app search:

In-app searching

Search continuation

Crowdsourcing deep link popularity with differential privacy

Visualization of validation results

The new CSSearchQuery class supports in-app searches of content that you index using existing Core Spotlight APIs. Using this API can eliminate the need to maintain your own separate search index and lets you take advantage of Spotlight’s powerful search technology and matching rules to allow users to search for content without leaving your app, just as they do within Mail, Messages, and Notes.

In iOS 9, using search APIs (such as Core Spotlight, NSUserActivity, and web markup) to index content within your app let users search for that content using the Spotlight and Safari search interfaces. In iOS 10, you can use new Core Spotlight symbols to let users continue a search they began in Spotlight when they open your app. To enable this feature, add the CoreSpotlightContinuation key to your Info.plist file, give it the value YES, and update your code to handle an activity continuation of type CSQueryContinuationActionType. The user info dictionary in the NSUserActivity object that you receive in your application:continueUserActivity:restorationHandler: method includes the CSSearchQueryString key, whose value is a string that represents the user’s query.

九:支付:

developer.applepay 移步網(wǎng)站

十:安全隱私加強 Security and Privacy Enhancements

iOS 10 introduces several changes and additions that help you improve the security of your code and maintain the privacy of user data. To learn more about these items, see https://developer.apple.com/security/.

The new NSAllowsArbitraryLoadsInWebContent key for your Info.plist file gives you a convenient way to allow arbitrary web page loads to work while retaining ATS protections for the rest of your app. To learn more about this key, see NSAppTransportSecurity.

廢棄了 CDSA APIs

The SecKey API includes improvements for asymmetric key generation. Use the SecKey API instead of the deprecated Common Data Security Architecture (CDSA) APIs.


The RC4 symmetric cipher suite is now disabled by default for all SSL/TLS connections, and SSLv3 is no longer supported in the Secure Transports API. It’s recommended that you stop using the SHA-1 and 3DES cryptographic algorithms as soon as possible. RC4對稱加密套件現(xiàn)在是默認情況下禁用所有的SSL / TLS連接假颇,以及SSLv3中不再支持安全傳輸API建議你停止使用SHA-1和3DES加密算法

十一:粘貼板

UIPasteboard

The UIPasteboard class supports the Clipboard feature, which lets users copy and paste between devices, and includes API you can use to restrict a pasteboard to a specific device and set an expiration timestamp after which the pasteboard is cleared. Additionally, named pasteboards are no longer persistent—instead, you should use shared containers—and the “Find” pasteboard (that is, the pasteboard identified by the UIPasteboardNameFind constant) is unavailable.

You must statically declare your app’s intended use of protected data classes by including the appropriate purpose string keys in your Info.plist file. For example, you must include the NSCalendarsUsageDescription key to access the user’s Calendar data. If you don’t include the relevant purpose string keys, your app exits when it tries to access the data.

To learn more about creating app extensions in general, see App Extension Programming Guide.


十二:
Core Data

NSPersistentStoreCoordinator now maintains a connection pool for SQLite stores. Root NSManagedObjectContext objects (those without parent MOCs) transparently support concurrent fetching and faulting without serializing against each other.

NSManagedObjectContext objects with SQLite stores in WAL journal_mode support a new feature called query generations. These allow a MOC to be pinned to a version of the database at a point in time and perform all future fetching and faulting against that version of the database. Pinned MOCs are moved to the most recent transaction with any save, and query generations do not survive the process's life time.

The new NSPersistentContainer class provides your app with a high-level integration point that maintains references to your NSPersistentStoreCoordinator, NSManagedObjectModel, and other configuration resources.

Core Data now has tighter integration with Xcode and automatically generates and updates your NSManagedObject subclasses.

NSManagedObject includes several additional convenience methods, making it easier to fetch and create subclasses. NSManagedObject subclasses that have a 1:1 relationship with an entity now support entity.

Core Data introduces several API adjustments that provide better integration with Swift, including parameterized NSFetchRequest objects.

For more information, see Core Data Framework Reference.

十三:Core Image

Core Image kernel code can now request a specific output pixel format.

Core Image introduces five new filters:

CINinePartTiled

CINinePartStretched

CIHueSaturationValueGradient

CIEdgePreserveUpsampleFilter

CIClamp

Core Motion

The Core Motion framework (CoreMotion.framework) includes pedometer events, which enable apps to receive fast real-time notifications when users pause and resume while running. On supported devices, apps can use CMPedometer APIs to register to receive live pedometer events while running in the foreground or the background.

十四:Foundation 框架

The new NSDateInterval class defines a programmatic interface for calculating the duration of a time interval and determining whether a date falls within it, as well as comparing date intervals and checking to see whether they intersect.

The NSLocale class defines many new properties that you can use to get information about a locale and how it can be displayed.

The new NSMeasurement class helps you convert measurements into different units, and calculate the sum or difference between two measurements. The new NSMeasurementFormatter class helps you create localized representations of measurements when displaying quantities of units to the user.

The new NSUnit class and concrete NSDimension subclasses help you represent specific units of measure.

十五:UIKit框架

The new UIApplication method openURL:options:completionHandler:, which is executed asynchronously and calls the specified completion handler on the main queue (this method replaces openURL:). openUrl替換

十六:通知的改變

NSNotification.h

AddedNSNotificationCenter.defaultCenter

AddedNSNotificationName

Modified-[NSNotification initWithName:object:userInfo:]

Declaration

From- (instancetype)initWithName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo

To- (instancetype)initWithName:(NSNotificationName)name object:(id)object userInfo:(NSDictionary *)userInfo

ModifiedNSNotification.name

Declaration

From@property(readonly, copy) NSString *name

To@property(readonly, copy) NSNotificationName name

Modified+[NSNotification notificationWithName:object:]

Declaration

From+ (instancetype)notificationWithName:(NSString *)aName object:(id)anObject

To+ (instancetype)notificationWithName:(NSNotificationName)aName object:(id)anObject

Modified+[NSNotification notificationWithName:object:userInfo:]

Declaration

From+ (instancetype)notificationWithName:(NSString *)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo

To+ (instancetype)notificationWithName:(NSNotificationName)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo

Modified-[NSNotificationCenter addObserver:selector:name:object:]

Declaration

From- (void)addObserver:(id)observer selector:(SEL)aSelector name:(NSString *)aName object:(id)anObject

To- (void)addObserver:(id)observer selector:(SEL)aSelector name:(NSNotificationName)aName object:(id)anObject

Modified-[NSNotificationCenter addObserverForName:object:queue:usingBlock:]

Declaration

From- (id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block

To- (id)addObserverForName:(NSNotificationName)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block

Modified-[NSNotificationCenter postNotificationName:object:]

Declaration

From- (void)postNotificationName:(NSString *)aName object:(id)anObject

To- (void)postNotificationName:(NSNotificationName)aName object:(id)anObject

Modified-[NSNotificationCenter postNotificationName:object:userInfo:]

Declaration

From- (void)postNotificationName:(NSString *)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo

To- (void)postNotificationName:(NSNotificationName)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo

Modified-[NSNotificationCenter removeObserver:name:object:]

Declaration

From- (void)removeObserver:(id)observer name:(NSString *)aName object:(id)anObject

To- (void)removeObserver:(id)observer name:(NSNotificationName)aName object:(id)anObject

NSNotificationQueue.h

AddedNSNotificationQueue.defaultQueue

Modified-[NSNotificationQueue enqueueNotification:postingStyle:coalesceMask:forModes:]

Declaration

From- (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle coalesceMask:(NSNotificationCoalescing)coalesceMask forModes:(NSArray *)modes

To- (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle coalesceMask:(NSNotificationCoalescing)coalesceMask forModes:(NSArray *)modes


十七:NSString的改變

NSString.h

AddedNSString.availableStringEncodings

AddedNSString.defaultCStringEncoding

AddedNSStringEncodingDetectionOptionsKey

AddedNSStringTransform

Modified-[NSString compare:options:range:]

Declaration

From- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)compareRange

To- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare

Modified-[NSString compare:options:range:locale:]

Declaration

From- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)compareRange locale:(id)locale

To- (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare locale:(id)locale

Modified-[NSString rangeOfCharacterFromSet:options:range:]

Declaration

From- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask range:(NSRange)searchRange

To- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch

Modified-[NSString rangeOfString:options:range:]

Declaration

From- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)searchRange

To- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch

Modified-[NSString rangeOfString:options:range:locale:]

Declaration

From- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)searchRange locale:(NSLocale *)locale

To- (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch locale:(NSLocale *)locale

Modified-[NSString stringByApplyingTransform:reverse:]

Declaration

From- (NSString *)stringByApplyingTransform:(NSString *)transform reverse:(BOOL)reverse

To- (NSString *)stringByApplyingTransform:(NSStringTransform)transform reverse:(BOOL)reverse

Modified+[NSString stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:]

Declaration

From+ (NSStringEncoding)stringEncodingForData:(NSData *)data encodingOptions:(NSDictionary *)opts convertedString:(NSString * _Nullable *)string usedLossyConversion:(BOOL *)usedLossyConversion

To+ (NSStringEncoding)stringEncodingForData:(NSData *)data encodingOptions:(NSDictionary *)opts convertedString:(NSString * _Nullable *)string usedLossyConversion:(BOOL *)usedLossyConversio

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市骨稿,隨后出現(xiàn)的幾起案子笨鸡,更是在濱河造成了極大的恐慌,老刑警劉巖坦冠,帶你破解...
    沈念sama閱讀 206,214評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件形耗,死亡現(xiàn)場離奇詭異,居然都是意外死亡辙浑,警方通過查閱死者的電腦和手機激涤,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,307評論 2 382
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來判呕,“玉大人昔期,你說我怎么就攤上這事》鹦” “怎么了?”我有些...
    開封第一講書人閱讀 152,543評論 0 341
  • 文/不壞的土叔 我叫張陵累澡,是天一觀的道長梦抢。 經(jīng)常有香客問我,道長愧哟,這世上最難降的妖魔是什么奥吩? 我笑而不...
    開封第一講書人閱讀 55,221評論 1 279
  • 正文 為了忘掉前任,我火速辦了婚禮蕊梧,結(jié)果婚禮上霞赫,老公的妹妹穿的比我還像新娘。我一直安慰自己肥矢,他們只是感情好端衰,可當我...
    茶點故事閱讀 64,224評論 5 371
  • 文/花漫 我一把揭開白布叠洗。 她就那樣靜靜地躺著,像睡著了一般旅东。 火紅的嫁衣襯著肌膚如雪灭抑。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,007評論 1 284
  • 那天抵代,我揣著相機與錄音腾节,去河邊找鬼。 笑死荤牍,一個胖子當著我的面吹牛案腺,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播康吵,決...
    沈念sama閱讀 38,313評論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼劈榨,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了涎才?” 一聲冷哼從身側(cè)響起鞋既,我...
    開封第一講書人閱讀 36,956評論 0 259
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎耍铜,沒想到半個月后邑闺,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,441評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡棕兼,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 35,925評論 2 323
  • 正文 我和宋清朗相戀三年陡舅,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片伴挚。...
    茶點故事閱讀 38,018評論 1 333
  • 序言:一個原本活蹦亂跳的男人離奇死亡靶衍,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出茎芋,到底是詐尸還是另有隱情颅眶,我是刑警寧澤,帶...
    沈念sama閱讀 33,685評論 4 322
  • 正文 年R本政府宣布田弥,位于F島的核電站涛酗,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏偷厦。R本人自食惡果不足惜商叹,卻給世界環(huán)境...
    茶點故事閱讀 39,234評論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望只泼。 院中可真熱鬧剖笙,春花似錦、人聲如沸请唱。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,240評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至酪夷,卻和暖如春榴啸,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背晚岭。 一陣腳步聲響...
    開封第一講書人閱讀 31,464評論 1 261
  • 我被黑心中介騙來泰國打工鸥印, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人坦报。 一個月前我還...
    沈念sama閱讀 45,467評論 2 352
  • 正文 我出身青樓库说,卻偏偏與公主長得像,于是被迫代替她去往敵國和親片择。 傳聞我的和親對象是個殘疾皇子潜的,可洞房花燭夜當晚...
    茶點故事閱讀 42,762評論 2 345

推薦閱讀更多精彩內(nèi)容