{"id":28764993,"url":"https://github.com/cloudinary/cloudinary_ios","last_synced_at":"2026-01-08T14:13:39.615Z","repository":{"id":5308692,"uuid":"6490389","full_name":"cloudinary/cloudinary_ios","owner":"cloudinary","description":"Cloudinary iOS SDK","archived":false,"fork":false,"pushed_at":"2025-05-12T07:28:14.000Z","size":37043,"stargazers_count":168,"open_issues_count":14,"forks_count":108,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-06-10T20:05:57.421Z","etag":null,"topics":["cloud","cloudinary-sdk","cocoapods","hacktoberfest","image-processing","ios","objective-c","sdk","swift","upload"],"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/cloudinary.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}},"created_at":"2012-11-01T13:47:41.000Z","updated_at":"2025-06-07T14:47:04.000Z","dependencies_parsed_at":"2024-04-14T12:33:11.092Z","dependency_job_id":"733eff27-29b3-4f6f-96c5-5a81a94fa511","html_url":"https://github.com/cloudinary/cloudinary_ios","commit_stats":{"total_commits":356,"total_committers":37,"mean_commits":9.621621621621621,"dds":0.75,"last_synced_commit":"50c62491e3f26e2281ae8665b2b2e0c511db2b84"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/cloudinary/cloudinary_ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fcloudinary_ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fcloudinary_ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fcloudinary_ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fcloudinary_ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudinary","download_url":"https://codeload.github.com/cloudinary/cloudinary_ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fcloudinary_ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260336371,"owners_count":22993742,"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","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":["cloud","cloudinary-sdk","cocoapods","hacktoberfest","image-processing","ios","objective-c","sdk","swift","upload"],"created_at":"2025-06-17T10:13:18.689Z","updated_at":"2026-01-08T14:13:39.602Z","avatar_url":"https://github.com/cloudinary.png","language":"Swift","readme":"Cloudinary iOS SDK\n=========================\n[![Build Status](https://api.travis-ci.com/cloudinary/cloudinary_ios.svg?branch=master)](https://app.travis-ci.com/github/cloudinary/cloudinary_ios)\n## About\nThe Cloudinary iOS SDK allows you to quickly and easily integrate your application with Cloudinary.\nEffortlessly optimize and transform your cloud's assets.\n\n### Additional documentation\nThis Readme provides basic installation and usage information.\nFor the complete documentation, see the [iOS SDK Guide](https://cloudinary.com/documentation/ios_integration).\n\n## Table of Contents\n- [Key Features](#key-features)\n- [Version Support](#Version-Support)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Setup](#Setup)\n    - [Transform and Optimize Assets](#Transform-and-Optimize-Assets)\n    - [File Upload](#File-Upload)\n    - [File Download](#File-Download)\n\n## Key Features\n- [Transform](https://cloudinary.com/documentation/ios_video_manipulation#video_transformation_examples) and [optimize](https://cloudinary.com/documentation/ios_image_manipulation#image_optimizations) assets.\n\n## Version Support\n| SDK Version    | iOS 9+    |   iOS 8   |\n|----------------|-----------|-----------|\n| 2.0.0 - 2.10.1 | V         | V         |\n| 3.0.0 - 5.x.x  | V         | X         |\n\n## Installation\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Swift and Objective-C Cocoa projects. \nTo install CocoaPods:\n\n```bash\nsudo gem install cocoapods\n```\nIf you don't have a `Podfile` in your project yet, add it by running the command:\n```bash\npod init\n```\n\nAdd the Cloudinary SDK to your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget 'MyApp' do\n  pod 'Cloudinary', '~\u003e 5.0'\nend\n```\n\nThen, run the command:\n\n```bash\npod install\n```\n\n### Carthage\n\nCreate `Cartfile`\n```bash\ntouch Cartfile\n```\n\nOpen `Cartfile` and enter the following line\n\n```bash\ngithub \"cloudinary/cloudinary_ios\" ~\u003e 5.0\n```\n\nThen, run the command:\n\n```bash\ncarthage update --use-xcframeworks\n```\nA `Cartfile.resolved` file and a `Carthage` directory will appear in the same directory where your `.xcodeproj` or `.xcworkspace` is.\nDrag the built `.xcframework` bundles from `Carthage/Build` into the `Frameworks and Libraries` section of your application’s Xcode project.\n\n### Swift Package Manager\n* File \u003e Add Packages... \u003e\n* Add https://github.com/cloudinary/cloudinary_ios.git\n* Select \"Up to Next Major\" with \"5.0.0\"\n\n### Working with the Cloudinary iOS SDK Manually\n\nIf you prefer not use a dependency manager, you can add Cloudinary manually by adding it as a submodule to your project:\n\nOpen Terminal and navigate to your project's top level directory.\n\nIf your project is not initialized as a git repository, run the command:\n\n```bash\ngit init\n```\n\nTo add cloudinary as a git submodule, run the command:\n\n```bash\ngit submodule add https://github.com/cloudinary/cloudinary_ios.git\n```\n\n#### Embedded Framework\n\n1. Drag `Cloudinary.xcodeproj` into the Project Navigator of your application's Xcode project. It should appear under your application's blue project icon.\n2. Select `Cloudinary.xcodeproj` and make sure the deployment target matches that of your application target.\n3. Select your application project. Under 'TARGETS' select your application, open the 'General' tab, click on the `+` button under the 'Embedded Binaries' and Select 'Cloudinary.framework'.\n\n## Usage \n### Setup\nTo use the API, you will need a CLDCloudinary instance, which is initialized with an instance of CLDConfiguration.\n\nThe CLDConfiguration must have its `cloudName` and `apiKey` properties set. Other properties are optional. \n\nSee [API, URLs and access identifiers](https://cloudinary.com/documentation/api_and_access_identifiers) for more details.\n\nThere are several ways to initialize CLDConfiguration. You can simply call its constructor with the desired params:\n```swift\nlet config = CLDConfiguration(cloudName: \"CLOUD_NAME\", apiKey: \"API_KEY\")\n```\n\nAnother way is by passing a URL of the form: cloudinary://API_KEY:API_SECRET@CLOUD_NAME\n```swift\nlet config = CLDConfiguration(cloudinaryUrl: \"cloudinary://\u003cAPI_KEY\u003e:\u003cAPI_SECRET\u003e@\u003cCLOUD_NAME\u003e\")\n```\n\nYou can also add the same URL as an environment parameters under `CLOUDINARY_URL`, then initialize CLDConfiguration using its static initializer\n```swift\nlet config = CLDConfiguration.initWithEnvParams()\n```\n\nNow you can create a CLDCloudinary instance to work with\n```swift\nlet cloudinary = CLDCloudinary(configuration: config)\n```\n\n### Transform and Optimize Assets\nThe following example generates a URL on an uploaded `sample` image:\n```swift\ncloudinary.createUrl().generate(\"sample.jpg\")\n\n// http://res.cloudinary.com/CLOUD_NAME/image/upload/sample.jpg\n```\n\nThe following example generates an image URL of an uploaded `sample` image while transforming it to fill a 100x150 rectangle:\n\n```swift\nlet transformation = CLDTransformation().setWidth(100).setHeight(150).setCrop(.crop)\ncloudinary.createUrl().setTransformation(transformation).generate(\"sample.jpg\")\n\n// http://res.cloudinary.com/CLOUD_NAME/image/upload/c_fill,h_150,w_100/sample.jpg\n```\n\nAnother example, embedding a smaller version of an uploaded image while generating a 90x90 face detection based thumbnail:\n\n```swift\nlet transformation = CLDTransformation().setWidth(90).setHeight(90).setCrop(.Thumb).setGravity(.Face)\ncloudinary.createUrl().setTransformation(transformation).generate(\"sample.jpg\")\n\n// http://res.cloudinary.com/CLOUD_NAME/image/upload/c_thumb,g_face,h_90,w_90/sample.jpg\n```\n\nYou can provide either a Facebook name or a numeric ID of a Facebook profile or a fan page.  \n\nEmbedding a Facebook profile to match your graphic design is very simple:\n\n```swift\nlet url = cloudinary.createUrl().setTransformation(CLDTransformation().setWidth(90).setHeight(130).setGravity(.Face).setCrop(.Fill)).setType(.Facebook).generate(\"billclinton.jpg\")\n\n// http://res.cloudinary.com/CLOUD_NAME/image/facebook/c_fill,g_face,h_130,w_90/billclinton.jpg\n```\n\nYou can also chain transformations together:\n\n```swift\nlet transformation = CLDTransformation().setWidth(100).setHeight(150).chain().setCrop(.Fit)\nlet url = cloudinary.createUrl().setTransformation().generate(\"sample.jpg\")\n\n// http://res.cloudinary.com/CLOUD_NAME/image/facebook/h_150,w_100/c_fit/sample.jpg\n```\n\n### File Upload\n\n##### 1. Signed upload\n\nUploading to your cloud is very straightforward.\n\nIn the following example the file located at `fileUrl` is uploaded to your cloud:\n\n```swift\ncloudinary.createUploader().upload(file: fileUrl)\n```\n\n`fileUrl` can point to either a local or a remote file.\n\nYou can also upload data:\n\n```swift\ncloudinary.createUploader().upload(data: data)\n```\n\nThe uploaded image is assigned a randomly generated public ID, which is returned as part of the response.\n\nYou can pass  an instance of `CLDUploadRequestParams` for extra parameters you'd want to pass as part of the upload request. For example, you can specify your own public ID instead of a randomly generated one.\n                                                                                                                             \nFor a full list of available upload parameters, see [the Upload API Reference](https://cloudinary.com/documentation/image_upload_api_reference#upload) documentation.\n\nYou can also pass a `progress` closure that is called periodically during the data transfer, and a `completionHandler` closure to be called once the request has finished, holding either the response object or the error.\n\n\nIn the following example, we apply an incoming transformation as part of the upload request, the transformation is applied before saving the image in the cloud.\nWe also specify a public ID and pass closures for the upload progress and completion handler.\n```swift\nlet params = CLDUploadRequestParams()\nparams.setTransformation(CLDTransformation().setGravity(.NorthWest))\nparams.setPublicId(\"my_public_id\")\nlet request = cloudinary.createUploader().upload(file: fileUrl, params: params, progress: { (bytes, totalBytes, totalBytesExpected) in\n    // Handle progress\n    }) { (response, error) in\n        // Handle response\n}\n```\n\n##### 2. Unsigned uploads using [Upload Presets.](https://cloudinary.com/documentation/ios_image_and_video_upload#unsigned_upload)\nYou can create an upload preset in your Cloudinary account console, defining rules that limit the formats, transformations, dimensions and more.\nOnce the preset is defined, it's name is supplied when calling upload. An upload call will only succeed if the preset name is used and the resource is within the preset's pre-defined limits.\n\nThe following example uploads a local resource, assuming a preset named 'sample_preset' already exists in the account:\n```swift\nlet request = cloudinary.createUploader().upload(url: file, uploadPreset: \"sample_preset\", params: CLDUploadRequestParams()).response({\n    (response, error) in\n    // Handle response\n})\n```\n\nEvery upload request returns a CLDUploadRequest instance, allowing options such as cancelling, suspending or resuming it.\n\n### File Download\n\nThe SDK provides some convenient methods for downloading files from your cloud:\n\n```swift\ncloudinary.createDownloader().fetchImage(url)\n```\n\nYou can also pass a `progress` closure that is called periodically during the data transfer, and a `completionHandler` closure to be called once the request has finished, holding either the fetched UIImage or an error.\n\n```swift\nlet request = cloudinary.createDownloader().fetchImage(url, progress: { (bytes, totalBytes, totalBytesExpected) in\n            // Handle progress\n            }) { (responseImage, error) in\n                // Handle response\n        }\n```\n\nEvery download request returns an instance implementing CLDNetworkDataRequest, allowing options such as cancelling, suspending or resuming it.\n\nThe downloaded image is cached both to the memory and the disk (customizable). The disk cache size is limited and can be changed.\n\n## Contributions\nSee [contributing guidelines](/CONTRIBUTING.md).\n\n## Get Help\nIf you run into an issue or have a question, you can either:\n- [Open a Github issue](https://github.com/cloudinary/cloudinary_ios/issues) (for issues related to the SDK)\n- [Open a support ticket](https://cloudinary.com/contact) (for issues related to your account)\n\n## About Cloudinary\nCloudinary is a powerful media API for websites and mobile apps alike, Cloudinary enables developers to efficiently manage, transform, optimize, and deliver images and videos through multiple CDNs. Ultimately, viewers enjoy responsive and personalized visual-media experiences—irrespective of the viewing device.\n\n## Additional Resources\n- [Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs.\n- [DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube.\n- [Cloudinary Academy](https://training.cloudinary.com/): Free self-paced courses, instructor-led virtual courses, and on-site courses.\n- [Code Explorers and Feature Demos](https://cloudinary.com/documentation/code_explorers_demos_index): A one-stop shop for all code explorers, Postman collections, and feature demos found in the docs.\n- [Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next.\n- [Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers.\n- [Cloudinary Account Registration](https://cloudinary.com/users/register/free): Free Cloudinary account registration.\n- [Cloudinary Website](https://cloudinary.com)\n\n## Licence\nReleased under the MIT license.\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudinary%2Fcloudinary_ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudinary%2Fcloudinary_ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudinary%2Fcloudinary_ios/lists"}