{"id":14981108,"url":"https://github.com/appbaseio/appbase-swift","last_synced_at":"2025-10-29T04:31:47.795Z","repository":{"id":149037673,"uuid":"156082730","full_name":"appbaseio/appbase-swift","owner":"appbaseio","description":"Swift Library for appbase.io and ElasticSearch","archived":false,"fork":false,"pushed_at":"2019-08-10T12:31:12.000Z","size":104494,"stargazers_count":24,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T07:59:42.267Z","etag":null,"topics":["elasticsearch","elasticsearch-client","ios","swift"],"latest_commit_sha":null,"homepage":"https://swift-elasticsearch.netlify.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appbaseio.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-11-04T13:03:18.000Z","updated_at":"2022-03-07T19:40:21.000Z","dependencies_parsed_at":"2023-04-16T17:31:10.550Z","dependency_job_id":null,"html_url":"https://github.com/appbaseio/appbase-swift","commit_stats":null,"previous_names":["appbaseio-apps/swiftelasticsearch"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/appbaseio/appbase-swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appbaseio","download_url":"https://codeload.github.com/appbaseio/appbase-swift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appbaseio%2Fappbase-swift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281562724,"owners_count":26522686,"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-10-29T02:00:06.901Z","response_time":59,"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":["elasticsearch","elasticsearch-client","ios","swift"],"created_at":"2024-09-24T14:02:55.662Z","updated_at":"2025-10-29T04:31:46.853Z","avatar_url":"https://github.com/appbaseio.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appbase-Swift\n\nA Swift Client Library for building search apps. Supports appbase.io and ElasticSearch.\n\n![](https://i.imgur.com/TksmIyM.png)\n\n### Table of Contents\n\n1. [About Project](#about-project)\n2. [Installation](#installation)\n    * [Dynamic Framework](#dynamic-framework-simplest-way)\n    * [Carthage](#carthage)\n    * [Swift Package Manager](#swift-package-manager)\n3. [Quick Start](#quick-start)\n4. [Docs](#docs)\n\n### About Project\n\nThis project aims to create fast responsive Swift Library, supported for IPhone and Mac apps which provides the functionality of Elastic Search to be integrated in the app.\n\nThe library provides very high performance results i.e. it provides response to user queries in milliseconds of time including the elastic search processing time.\n\n### Installation\n\n#### Dynamic Framework (Simplest way)\n\n* Download the latest release of [SwiftElasticSearch](https://github.com/harsh-2711/SwiftSearch/archive/v0.1.0.zip) from Github and extract the zip \n\n* Navigate to your Xcode's project `General` settings (Click on the the blue icon showing your project's workspace -\u003e General)\n\n* Drag the `SwiftElasticSearch.xcodeproj` file from the extracted folder in the `Embedded Binaries` section and select the `Copy items if needed` checkbox in the prompted dialog box (if it appears) and click Finish\n\n* Go to `Linked Frameworks and Libraries` section and click on the `+` icon\n\n* Click on the `SwiftElasticSearch.framework` to add it to dependencies\n\n* Build the project\n\nHere is the GIF showing all the above steps in action - \n\n![Demo GIF](https://github.com/harsh-2711/Resources/blob/master/SwiftElasticSearchDemo.gif)\n\n#### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds dependencies and provides binary frameworks for direct use.\n\nTo install Carthage, use [Homebrew](https://brew.sh/) package manager and write the following commands :\n\n```\n$ brew update\n$ brew install carthage\n```\nTo integrate SwiftElasticSearch in your Xcode project :\n\n* Switch to your project directory in terminal\n\n* Now make a Cartfile using command :\n\n```\ntouch Cartfile\n```\n* Now open the Cartfile using command :\n\n```\nopen Cartfile\n```\n* Add the following dependency in your Cartfile :\n\n```\ngithub \"appbaseio-apps/SwiftElasticSearch\" ~\u003e \u003cRelease Version\u003e\n```\nThe current latest Release Version is 0.1.0\n\n* Run `carthage update` to build the framework\n\n* Drag the `SwiftElasticSearch.framework` file that is generated inside Build folder of Carthage to your Xcode project\n\n* Build the project\n\n#### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but ElasticSwift does support its use on supported platforms.\n\nTo add SwiftElasticSearch library as dependency, add the following line in the dependencies value of Package.swift : \n\n```\ndependencies: [\n.Package(url: \"https://github.com/harsh-2711/SwiftElasticSearch.git\", \"0.1.0\")\n]\n```\n\n### Quick Start\n\nWorking code example. Please note that each step is dependent on previous step.\n\n#### Step 1: Import library and initiate the SwiftElasticSearch client\n\n```swift\nimport SwiftElasticSearch\n\n// app and authentication configurations\nlet HOST_URL = \"https://scalr.api.appbase.io\"\nlet APPNAME = \"SwiftClientES\"\nlet CREDENTIALS = \"9MrI8sWhQ:7cf68f3b-51f7-45c0-973f-f3e85ad10f4b\"\n\nlet client = Client.init(url: HOST_URL, app: APPNAME, credentials: CREDENTIALS)\n```\n\n#### Step 2: Add some data into the app\n\n```swift\n// Index some movie names\n\nclient.index(type: \"SwiftClientES\", id: \"movie1\", body: [\"title\" : \"Iron Man\"]) { (json, response, error) in\n  // json - provides recieved JSON body\n  // response - provides the received response from the server\n  // error - provides the error encountered if any\n\n  print(json!)\n}\n```\n\n**Console Output**\n\n```swift\n{\n    \"_id\" = movie1;\n    \"_index\" = SwiftClientES;\n    \"_shards\" =     {\n        failed = 0;\n        successful = 2;\n        total = 2;\n    };\n    \"_type\" = SwiftClientES;\n    \"_version\" = 2;\n    created = 0;\n    result = updated;\n}\n```\n\n#### Step 3: Get the posted data\n\n```swift\n\nclient.get(type: \"SwiftClientES\", id: \"movie1\") { (json, response, error) in\n    print(json!)\n}\n```\n\n**Console output**\n\n```swift\n{\n    \"_id\" = movie1;\n    \"_index\" = SwiftClientES;\n    \"_source\" =     {\n        title = \"Iron Man\";\n    };\n    \"_type\" = SwiftClientES;\n    \"_version\" = 2;\n    found = 1;\n}\n```\n\n* For more examples, refer to the tests file [SwiftElasticSearchTests.swift](https://github.com/appbaseio-apps/SwiftElasticSearch/blob/master/SwiftElasticSearchTests/SwiftElasticSearchTests.swift)\n\n* For a fully working example app, refer to the GitHub repository [SwiftElasticSearchDemo](https://github.com/harsh-2711/SwiftElasticSearchDemo)\n\n### Docs\n\nThe documentation of SwiftElasticSearch library is made with the help of [Jazzy](https://github.com/realm/jazzy) library. For contributing to the documentation of this library, follow the given steps:\n\n* Make the necessary changes in the inline code comments\n* If you haven't, install jazzy library by typing the following command in the terminal:\n```\n[sudo] gem install jazzy\n```\n* After installing, navigate to the project directory and type the following to generate the docs.\n```\njazzy\n```\nFor more functionalities like skipping specific files or folders, refer to documentation of the [Jazzy](https://github.com/realm/jazzy)  library:\n* Now add and commit the changes and then submit a pull request :-)\n\n**Hosted docs of SwiftElasticSearch library are available at https://swift-elasticsearch.netlify.com**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappbaseio%2Fappbase-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappbaseio%2Fappbase-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappbaseio%2Fappbase-swift/lists"}