Skip to content

Releases: leancloud/swift-sdk

v13.0.0

18 Oct 03:47
d3db715

Choose a tag to compare

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

11 Oct 09:02
4cb58b4

Choose a tag to compare

LeanCloud Swift SDK 12.0.0 is now released, finally! 🎉

This version implements the following features:

  • File hosting. You can use the type LCFile to 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

26 Apr 09:31
52af57a

Choose a tag to compare

Optimization and fixed bugs

  • 升级 Alamofire 到 4.7
  • 适配 Xcode 9.3

Release 11.0.0

16 Oct 08:33

Choose a tag to compare

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

28 Sep 02:52

Choose a tag to compare

All APIs have been conformed to Swift 3 API design guideline.

The last stable version for Swift 2.3

28 Sep 02:47

Choose a tag to compare

Fixed

  • The use of undeclared type 'Float80' on ARM.

Changed

  • Renamed two query constraints about geography location.
    • NearbyPointWithRange is renamed to LocatedNear.
    • NearbyPointWithRectangle is renamed to LocatedWithin.
    • NearbyPoint is removed, use LocatedNear instead.

Convertible protocol makes API easier to use

04 Sep 15:36

Choose a tag to compare

  • Add convertible protocol.

    Now, API accepts LCValueConvertible (or its sub-protocol) instead of LCType as its arguments. Following Swift built-in types have been extended to conform LCValueConvertible:

    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

01 Sep 08:42

Choose a tag to compare

Fixed

  • Date has incorrect value when constructed by init?(JSONValue: AnyObject?).

Protocol-oriented data type

10 Aug 01:53

Choose a tag to compare

Added

  • Now, each LeanCloud data type has JSONValue and JSONString.

    These handy properties are aimed for type transformation. For example, an LCType object can be transformed to [String] using object.JSONValue as? [String].

Improved

  • Make LCType as a protocol instead of a class. All LeanCloud data types confirm this protocol.

Add SMS client

15 Jul 14:40

Choose a tag to compare

Added

  • SMS client, which can be used to send short message to mobile phone.

Updated

  • Unify APIs relevant to verification code for user.