ios 10 主要做了最app的扩展基于iMessage 和 mapapp 的,sirikit开放了很多,最主要的通知被统一了起来。
一:
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
这个框架允许开发者自定义远程和本地通知的界面。
四:新增API可以将语音识别转换为文本
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
五: 新增权限,日历,相册,语音识别 更多权限,访问 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.
七:环境敏感,加一对键值
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 移步网站
十:安全隐私加强 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对称加密套件现在是默认情况下禁用所有的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