Swiftpack.co - Package - watson-developer-cloud/restkit

RestKit for Watson Developer Cloud Swift SDK

Carthage Compatible CLA assistant


RestKit is a dependency used in the IBM Watson Swift SDK. It provides the networking layer used by the Swift SDK to communicate between your iOS app and Watson services. For more information on IBM Watson services, visit the IBM Watson homepage.


  • Xcode 9.3+
  • Swift 4.2+
  • iOS 10.0+


RestKit can be installed with Cocoapods, Carthage, or Swift Package Manager.


You can install Cocoapods with RubyGems:

$ sudo gem install cocoapods

If your project does not yet have a Podfile, use the pod init command in the root directory of your project. To install RestKit using Cocoapods, add the following to your Podfile (substituting MyApp with the name of your app).


target 'MyApp' do
    pod 'IBMWatsonRestKit', '~> 3.0.3'

Then run the pod install command, and open the generated .xcworkspace file. To update to a newer release of RestKit, use pod update RestKit.

For more information on using Cocoapods, refer to the Cocoapods Guides.


You can install Carthage with Homebrew:

$ brew update
$ brew install carthage

If your project does not have a Cartfile yet, use the touch Cartfile command in the root directory of your project. To install RestKit using Carthage, add the following to your Cartfile.

github "watson-developer-cloud/restkit" ~> 3.0.3

Then run the following command to build the dependencies and frameworks:

$ carthage update --platform iOS

Follow the remaining Carthage installation instructions here. Make sure to drag-and-drop the built RestKit.framework into your Xcode project and import it in the source files that require it.

Swift Package Manager

Add the following to your Package.swift file to identify RestKit as a dependency. The package manager will clone RestKit when you build your project with swift build.

dependencies: [
    .package(url: "https://github.com/watson-developer-cloud/restkit", from: "3.0.3")


We would love any and all help! If you would like to contribute, please read our CONTRIBUTING documentation with information on getting started.


This library is licensed under Apache 2.0. Full license text is available in LICENSE.

This SDK is intended for use with an Apple iOS product and intended to be used in conjunction with officially licensed Apple development tools.


Stars: 3


Used By

Total: 0


3.0.3 - 2019-06-13 15:18:11

Bug Fixes

  • Allow date values to be specified with or without fractional seconds

3.0.2 - 2019-06-03 16:44:02

Bug Fixes

  • Refactor bluemix to cloud.ibm
  • Add detect secrets files to gitignore

3.0.1 - 2019-04-11 23:38:56

Bug Fixes

  • Improve error response handling for IAM authentication (57c534f (https://github.com/watson-developer-cloud/restkit/commit/57c534f))

3.0.0 - 2019-03-27 23:38:43


  • Add RestError.deserialization
  • Return RestResponse with response headers for error responses
  • Add metadata associated value to RestError.other
  • Add build step to run Swiftlint

Bug Fixes

  • Capture IAM token to avoid reauthentication

2.0.0 - 2018-11-30 21:40:00

  • Update the supported versions of Xcode, Swift, and iOS
  • Improve the usefulness of RestResponse
  • Improve the usefulness of RestError. Replace usage of Error with RestError.
  • Remove RestRequest.responseString(). Use RestRequest.response() instead.
  • Better error handling for RestRequest.responseObject()
  • Get rid of default value for RestRequest.userAgent

- 2018-10-09 20:02:06

  • Add new append method to MultipartFormData that properly converts a file to Data, then appending the data to the request body.

- 2018-09-10 17:32:42


  • Improves the bug fix from version 1.1.0. RestRequest.userAgent should be set instead of RestRequest.sdkVersion.

- 2018-09-04 17:16:22


  • Incorrect Watson SDK version was being used in the "User-agent" header for all network requests. This value should now be set using the new RestRequest.sdkVersion property.

- 2018-09-04 17:13:47

This is the first standalone version. RestKit was previously integrated directly with the IBM Watson Swift SDK up until version v0.32.0.