{"id":22096509,"url":"https://github.com/uphold/uphold-sdk-ios","last_synced_at":"2025-07-24T22:32:07.224Z","repository":{"id":290323293,"uuid":"37058008","full_name":"uphold/uphold-sdk-ios","owner":"uphold","description":"Uphold iOS SDK","archived":true,"fork":false,"pushed_at":"2018-05-23T14:22:27.000Z","size":404,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-07T03:08:06.062Z","etag":null,"topics":["api","sdk","uphold"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uphold.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-06-08T09:32:10.000Z","updated_at":"2025-04-23T09:52:57.000Z","dependencies_parsed_at":"2025-04-28T08:36:11.737Z","dependency_job_id":null,"html_url":"https://github.com/uphold/uphold-sdk-ios","commit_stats":null,"previous_names":["uphold/uphold-sdk-ios"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/uphold/uphold-sdk-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuphold-sdk-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuphold-sdk-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuphold-sdk-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuphold-sdk-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/uphold-sdk-ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fuphold-sdk-ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266913680,"owners_count":24005579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","sdk","uphold"],"created_at":"2024-12-01T04:11:21.312Z","updated_at":"2025-07-24T22:32:06.845Z","avatar_url":"https://github.com/uphold.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uphold SDK for iOS [![Build Status](https://travis-ci.org/uphold/uphold-sdk-ios.svg?branch=master)](https://travis-ci.org/uphold/uphold-sdk-ios) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/UpholdSdk.svg)](https://cocoapods.org/pods/UpholdSdk)\n\nUphold is a next generation platform that allows anyone to transfer and exchange value for free, instantly and securely.\n\nThe Uphold SDK for iOS provides an easy way for developers to integrate iOS applications with the [Uphold API](https://uphold.com/en/developer/api).\n\n## Requirements\n\n    * Xcode 8\n    * Swift 3\n    * Carthage or CocoaPods\n\n## Installation\n\n### Using [CocoaPods](https://cocoapods.org)\n\n1. Add to your `Podfile`.\n\n    ```\n    platform :ios, '10.0'\n    use_frameworks!\n\n    # To use Uphold's production environment.\n    pod 'UpholdSdk/Production'\n\n    # To use Uphold's sandbox environment:\n    # pod 'UpholdSdk/Sandbox'\n    ```\n\n2. Run `pod install`.\n\n### Using [Carthage](https://github.com/Carthage/Carthage)\n\n1. Add to your `Cartfile`.\n\n    ```\n    github \"uphold/uphold-sdk-ios\" ~\u003e 0.17.0\n    ```\n\n2. Run `carthage update --platform iOS` specifying the build configuration to use Uphold's different environments.\n\n    ```\n    # To use Uphold's production environment.\n    carthage update --platform iOS --configuration ProductionRelease\n\n    # To use Uphold's sandbox environment:\n    # carthage update --platform iOS --configuration SandboxRelease\n    ```\n\n## Basic usage\n\nIn order to learn more about the Uphold API, please visit the [developer website](https://uphold.com/en/developer).\n\nTo use the SDK you must first register an Application and obtain a unique `CLIENT_ID` and `CLIENT_SECRET` combination. We recommend your first app be [registered in the Sandbox environment](https://sandbox.uphold.com/dashboard/profile/applications/developer/new), so you can safely play around during development.\n\nFrom the application page in your account you can get the `client id`, `client secret` , configure the `redirect URI` and the desired `scopes`.\n\n### Authenticate User\n\nIn order to allow users to be re-directed back to the application after the authorization process, you’ll need to associate your custom `scheme` with your app by adding the following keys into the [`Info.plist`](https://github.com/uphold/uphold-sdk-ios/blob/master/SampleApplication/Info.plist) file:\n\n* CFBundleURLTypes - The list of URLs types to be handled by the application.\n    * CFBundleURLSchemes - The custom application schemes.\n\nFor instance, our demo application has the following configuration:\n\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n    \u003carray\u003e\n        \u003cdict\u003e\n            \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n            \u003carray\u003e\n                \u003cstring\u003euphold-demo\u003c/string\u003e\n            \u003c/array\u003e\n        \u003c/dict\u003e\n    \u003c/array\u003e\n```\n\nWe start the authentication process by instantiating the UpholdClient and then calling the `beginAuthorization` method:\n\n```swift\n/// LoginViewController.swift\n\nlet upholdClient = UpholdClient()\nlet authorizationViewController = upholdClient.beginAuthorization(self, clientId: CLIENT_ID, scopes: scopes, state: state)\n```\n\nIn the `AppDelegate` class you'll need to implement the method `application(application: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -\u003e Bool` that is called when the user completes the authorization process.\n\n```swift\n/// AppDelegate.swift\n\nfunc application(application: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -\u003e Bool {\n    loginViewController.completeAuthorization(url)\n\n    return true\n}\n```\n\nTo complete the authorization process you'll need to call the `completeAuthorization` method from the `upholdClient` and get the user bearer token from the authentication response.\n\n```swift\n/// LoginViewController.swift\n\nupholdClient.completeAuthorization(authorizationViewController, clientId: CLIENT_ID, clientSecret: CLIENT_SECRET, grantType: \"authorization_code\", state: state, uri: url).then { (response: AuthenticationResponse) -\u003e () in\n    // Get the user bearer token from the authenticationResponse.\n}\n```\n\nTo get the current user information, just instantiate the Uphold client with the user bearer token and then call the `getUser()` function:\n\n```swift\nlet upholdClient = UpholdClient(bearertoken: bearerToken)\n\nupholdClient.getUser().then { (user: User) -\u003e () in\n    /// The user information is available at the user object.\n}\n```\n\nNote: Don't forget to add keychain sharing capabilities in your application's target inside the `Capabilities` tab.\n\n### Get user cards with chaining\n\n```swift\nlet upholdClient = UpholdClient(bearerToken: bearerToken)\n\nupholdClient.getUser().then { (user: User) -\u003e Promise\u003c[Card]\u003e in\n    return user.getCards()\n.then { (cards: [Card]) -\u003e () in\n    /// Do something with the list of cards.         \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.\n}\n```\n\n### Get user cards\n\n```swift\nuser.getCards().then { (cards: [Card]) -\u003e () in\n    /// Do something with the list of cards.        \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.            \n}\n```\n\n### Create a new card for the user\n\n```swift\nlet cardRequest: CardRequest = CardRequest(currency: \"foo\", label: \"BTC\", settings: CardSettings(position: 1, starred: true))\n\n// Or just create a card without specifying the card settings.\n// let cardRequest: CardRequest = CardRequest(currency: \"foo\", label: \"BTC\")\n\nuser.createCard(cardRequest).then { (card: Card) -\u003e () in\n    /// Do something with the card.        \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.            \n}\n```\n\n### Create a new address for a card\n\n```swift\nlet addressRequest: AddressRequest = AddressRequest(network: \"bitcoin\")\n\ncard.createAddress(addressRequest).then { (address: Address) -\u003e () in\n    /// Do something with the address of the card.        \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.            \n}\n```\n\n### Get ticker\n\n```swift\n/// Instantiate the client. In this case, we don't need an\n/// AUTHORIZATION_TOKEN because the Ticker endpoint is public.\nlet upholdClient = UpholdClient()\n\n/// Get tickers.\nupholdClient.getTickers().then { (rateList: [Rate]) -\u003e () in\n    /// Do something with the rates list.\n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.\n}\n```\n\nOr you could get a ticker for a specific currency:\n\n```swift\n/// Get tickers for BTC.\nupholdClient.getTickersByCurrency(\"BTC\").then { (rateList: [Rate]) -\u003e () in\n    /// Do something with the rates list.\n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.\n}\n```\n\n### Create and commit a new transaction\n\n```swift\nlet transactionDenominationRequest = TransactionDenominationRequest(amount: \"1.0\", currency: \"BTC\")\n\n/// A transaction to a destination (card id, crypto address, email, phone number or username).\nlet transactionTransferRequest = TransactionTransferRequest(denomination: transactionDenominationRequest, destination: \"foo@bar.com\")\n\ncard.createTransaction(transactionTransferRequest).then { (transaction: Transaction) -\u003e () in\n    /// Commit the transaction.\n    transaction.commit(TransactionCommitRequest(\"Commit message\"))\n}.error({ (error: ErrorType) -\u003e Void in\n    /// Do something with the error.            \n})\n\n/// A transaction to a destination (card id, crypto address, email, phone number or username) with reference.\nlet transactionTransferRequest = TransactionTransferRequest(denomination: transactionDenominationRequest, destination: \"foo@bar.com\", reference: \"123456\")\n\ncard.createTransaction(transactionTransferRequest).then { (transaction: Transaction) -\u003e () in\n    /// Commit the transaction.\n    transaction.commit(TransactionCommitRequest(\"Commit message\"))\n}.error({ (error: ErrorType) -\u003e Void in\n    /// Do something with the error.            \n})\n\n/// A deposit from an ACH or SEPA account.\nlet transactionDepositRequest = TransactionDepositRequest(denomination: transactionDenominationRequest, origin: \"accountId\")\n\ncard.createTransaction(transactionDepositRequest).then { (transaction: Transaction) -\u003e () in\n    /// Commit the transaction.\n    transaction.commit(TransactionCommitRequest(\"Commit message\"))\n}.error({ (error: ErrorType) -\u003e Void in\n    /// Do something with the error.\n})\n\n/// A deposit from a credit card.\nlet transactionCardDepositRequest = TransactionCardDepositRequest(denomination: transactionDenominationRequest, origin: \"creditCardId\", securityCode: \"1234\")\n\ncard.createTransaction(transactionCardDepositRequest).then { (transaction: Transaction) -\u003e () in\n    /// Commit the transaction.\n    transaction.commit(TransactionCommitRequest(\"Commit message\"))\n}.error({ (error: ErrorType) -\u003e Void in\n    /// Do something with the error.\n})\n```\n\nIf you want to commit the transaction on the creation process, call the `createTransaction` method with the first parameter set to `true`.\n\n```swift\ncard.createTransaction(true, transactionRequest: transactionRequest)\n```\n\n### Get all public transactions\n\n```swift\n/// Instantiate the client. In this case, we don't need an\n/// AUTHORIZATION_TOKEN because the Ticker endpoint is public.\nlet upholdClient = UpholdClient()\nlet paginator: Paginator\u003cTransaction\u003e = client.getReserve().getTransactions()\n\n/// Get the list of transactions.\npaginator.elements.then { (transactions: [Transaction]) -\u003e () in\n    /// Do something with the list of transactions.            \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.         \n}\n\n/// Get the next page of transactions.\npaginator.getNext().then { (transactions: [Transaction]) -\u003e () in\n    /// Do something with the list of transactions.         \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.         \n}\n```\n\nOr you could get a specific public transaction:\n\n```swift\n/// Get one public transaction.\nupholdClient.getReserve().getTransactionById(\"a97bb994-6e24-4a89-b653-e0a6d0bcf634\").then { (transaction: Transaction) -\u003e () in\n    /// Do something with the list of transactions.     \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.      \n}\n```\n\n### Get reserve status\n\n```swift\n/// Instantiate the client. In this case, we don't need an\n/// AUTHORIZATION_TOKEN because the Ticker endpoint is public.\nlet upholdClient = UpholdClient()\n\n/// Get the reserve summary of all the obligations and assets within it.\nclient.getReserve().getStatistics().then { (reserveStatistics: [ReserveStatistics]) -\u003e () in\n    /// Do something with the reserve statistics.    \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.     \n}\n```\n\n### Pagination\nSome endpoints will return a paginator. Here are some examples on how to handle it:\n\n```swift\n/// Get public transactions paginator.\nlet paginator: Paginator\u003cTransaction\u003e = client.getReserve().getTransactions()\n\n/// Get the first page of transactions.\npaginator.elements.then { (transactions: [Transaction]) -\u003e () in\n    /// Do something with the list of transactions.            \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.         \n}\n\n/// Check if the paginator has a valid next page.\npaginator.hasNext().then { (hasNext: Bool) -\u003e () in\n    /// Do something with the hasNext.     \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.         \n}\n\n/// Get the number of paginator elements.\npaginator.count().then { (count: Int) -\u003e () in\n    /// Do something with the count.    \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.     \n}\n\n/// Get the next page.\npaginator.getNext().then { (transactions: [Transaction]) -\u003e () in\n    /// Do something with the list of transactions.         \n}.error { (error: ErrorType) -\u003e Void in\n    /// Do something with the error.         \n}\n```\n\n## Uphold SDK sample\n\nCheck the [sample application](https://github.com/uphold/uphold-sdk-ios/tree/master/SampleApplication) to explore an application using the Uphold iOS SDK.\n\n#### Building\n\nTo build the sample application you need the [Xcode](https://developer.apple.com/xcode/download/). Steps to build:\n\n1. Clone the repository.\n2. Get the project dependencies:\n\n ```\n carthage bootstrap --platform iOS\n ```\n\n3. Open the sample project `SampleApplication.xcodeproj`.\n4. Add keychain sharing capabilities.\n5. Build and run the app from inside Xcode.\n\nThe sample application is configured to use the [sandbox environment](https://sandbox.uphold.com), make sure you use a sandbox account to perform the login.\n\n## Contributing \u0026 Development\n\n#### Contributing\n\nHave you found a bug or want to suggest something? Please search the [issues](https://github.com/uphold/uphold-sdk-ios/issues) first and, if it is new, go ahead and [submit it](https://github.com/uphold/uphold-sdk-ios/issues/new).\n\n#### Develop\n\nIt will be awesome if you can help us evolve `uphold-sdk-ios`. Want to help?\n\n1. [Fork it](https://github.com/uphold/uphold-sdk-ios).\n2. Hack away.\n3. Run the tests.\n5. Create a [Pull Request](https://github.com/uphold/uphold-sdk-ios/compare).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fuphold-sdk-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fuphold-sdk-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fuphold-sdk-ios/lists"}