Releases: leancloud/swift-sdk
v13.0.0
LeanCloud Swift SDK 13.0.0 is out! 🚀
This version implements an important feature called Installation.
You can analyze your app's installations with a few lines of code:
let installation = LCApplication.default.currentInstallation
installation.deviceToken = "{ The device token returned by APNs }"
_ = installation.save { result in /* nop */ }That's it! 🍻
Then, you can use the installations to send push notification to user later on.
v12.0.0
LeanCloud Swift SDK 12.0.0 is now released, finally! 🎉
This version implements the following features:
- File hosting. You can use the type
LCFileto host files on LeanCloud. - All async network APIs are improved to allow to cancel, suspend and resume request. This improvement also provides better support for various async paradigms.
v11.0.1
Optimization and fixed bugs
- 升级 Alamofire 到 4.7
- 适配 Xcode 9.3
Release 11.0.0
Updated
- The project Migrated to Swift 4.0
- The Travis CI config to work with Xcode 9
Fixed
- Some bugs of memory leak in
Runtime.swift
The first release for Swift 3
All APIs have been conformed to Swift 3 API design guideline.
The last stable version for Swift 2.3
Fixed
- The use of undeclared type 'Float80' on ARM.
Changed
- Renamed two query constraints about geography location.
NearbyPointWithRangeis renamed toLocatedNear.NearbyPointWithRectangleis renamed toLocatedWithin.NearbyPointis removed, useLocatedNearinstead.
Convertible protocol makes API easier to use
-
Add convertible protocol.
Now, API accepts
LCValueConvertible(or its sub-protocol) instead ofLCTypeas its arguments. Following Swift built-in types have been extended to conformLCValueConvertible:Built-in type LeanCloud data type NSNull LCNull Int LCNumber UInt LCNumber Int8 LCNumber UInt8 LCNumber Int16 LCNumber UInt16 LCNumber Int32 LCNumber UInt32 LCNumber Int64 LCNumber UInt64 LCNumber Float LCNumber Float80 LCNumber Double LCNumber Bool LCBool NSNumber LCNumber or LCBool String LCString NSString LCString Array LCArray NSArray LCArray Dictionary LCDictionary NSDictionary LCDictionary NSData LCData NSDate LCDate
Note that, the NSNumber can be converted to either LCNumber or LCBool, depends on how it is constructed. If number is constructed by+[NSNumber numberWithBool:] or -[NSNumber initWithBool:], it will be converted to LCBool, LCNumber otherwise.
You can also extend other types to conform the convertible protocol.
Fix incorrect date value
Fixed
- Date has incorrect value when constructed by
init?(JSONValue: AnyObject?).
Protocol-oriented data type
Added
-
Now, each LeanCloud data type has
JSONValueandJSONString.These handy properties are aimed for type transformation. For example, an
LCTypeobject can be transformed to[String]usingobject.JSONValue as? [String].
Improved
- Make
LCTypeas a protocol instead of a class. All LeanCloud data types confirm this protocol.
Add SMS client
Added
- SMS client, which can be used to send short message to mobile phone.
Updated
- Unify APIs relevant to verification code for user.